# -*- coding: utf-8 -*-

$WARNING

$IMPORTS

import copy
import logging
# create logger
logger = logging.getLogger(__name__)
# logger.debug('level %d' %  (logger.getEffectiveLevel()))


class $PRODUCTNAME($PARENTS):
    """ $CLASSDOC

    Generally a Product (inheriting BaseProduct) has project-wide attributes and can be extended to define a plethora of specialized products.
    """


    def __init__(self,
$INITARGS
                 **kwds):
        """ Initializes instances with more metadata as attributes, set to default values.

        Put description keyword argument here to allow e.g. BaseProduct("foo") and description='foo'
        """
        if 'metasToBeInstalled' in kwds:
            # This class is being called probably from super() in a subclass
            metasToBeInstalled = kwds['metasToBeInstalled']
            del kwds['metasToBeInstalled']

            # must be the first line to initiate meta and get description
            super().__init__(
                metasToBeInstalled=metasToBeInstalled, **kwds)
            return
        # this class is being called directly

        # list of local variables.
        metasToBeInstalled = copy.copy(locals())
        for x in ('self', '__class__', 'kwds'):
            metasToBeInstalled.pop(x)

        global ProductInfo
        self.zInfo = ProductInfo

        #print('@1 zInfo', id(self.zInfo['metadata']), id(self), id(self.zInfo),
        #      self.zInfo['metadata']['version'], list(metasToBeInstalled.keys()))

        # must be the first line to initiate meta and get description
        super().__init__(
            metasToBeInstalled=metasToBeInstalled, **kwds)

        super().installMetas(mtbi=metasToBeInstalled, prodInfo=ProductInfo)
        #print(self.meta.keySet(), id(self.meta))


$PROPERTIES



$PRODUCTINFO
