예제 #1
0
    def __init__(self, *args, **kwargs):
        """Initialize either as EasyBlock or as Extension."""

        self.is_extension = False

        if isinstance(args[0], EasyBlock):
            # make sure that extra custom easyconfig parameters are known
            extra_params = self.__class__.extra_options()
            kwargs['extra_params'] = extra_params

            Extension.__init__(self, *args, **kwargs)

            # name and version properties of EasyBlock are used, so make sure name and version are correct
            self.cfg['name'] = self.ext.get('name', None)
            self.cfg['version'] = self.ext.get('version', None)
            # We can't inherit the 'start_dir' value from the parent (which will be set, and will most likely be wrong).
            # It should be specified for the extension specifically, or be empty (so it is auto-derived).
            self.cfg['start_dir'] = self.ext.get('options',
                                                 {}).get('start_dir', None)
            self.builddir = self.master.builddir
            self.installdir = self.master.installdir
            self.modules_tool = self.master.modules_tool
            self.module_generator = self.master.module_generator
            self.is_extension = True
            self.unpack_options = None
        else:
            EasyBlock.__init__(self, *args, **kwargs)
            self.options = copy.deepcopy(self.cfg.get(
                'options', {}))  # we need this for Extension.sanity_check_step

        self.ext_dir = None  # dir where extension source was unpacked
    def __init__(self, *args, **kwargs):
        """Initialize either as EasyBlock or as Extension."""

        self.is_extension = False

        if isinstance(args[0], EasyBlock):
            Extension.__init__(self, *args, **kwargs)
            # name and version properties of EasyBlock are used, so make sure name and version are correct
            self.cfg['name'] = self.ext.get('name', None)
            self.cfg['version'] = self.ext.get('version', None)
            self.builddir = self.master.builddir
            self.installdir = self.master.installdir
            self.modules_tool = self.master.modules_tool
            self.is_extension = True
            self.unpack_options = None

            # make sure that extra custom easyconfig parameters are known
            extra_params = self.__class__.extra_options()
            self.cfg.extend_params(extra_params, overwrite=False)
        else:
            EasyBlock.__init__(self, *args, **kwargs)
            self.options = copy.deepcopy(self.cfg.get(
                'options', {}))  # we need this for Extension.sanity_check_step

        self.ext_dir = None  # dir where extension source was unpacked
    def __init__(self, *args, **kwargs):
        """Initialize either as EasyBlock or as Extension."""

        self.is_extension = False

        if isinstance(args[0], EasyBlock):
            # make sure that extra custom easyconfig parameters are known
            extra_params = self.__class__.extra_options()
            kwargs['extra_params'] = extra_params

            Extension.__init__(self, *args, **kwargs)

            # name and version properties of EasyBlock are used, so make sure name and version are correct
            self.cfg['name'] = self.ext.get('name', None)
            self.cfg['version'] = self.ext.get('version', None)
            # We can't inherit the 'start_dir' value from the parent (which will be set, and will most likely be wrong).
            # It should be specified for the extension specifically, or be empty (so it is auto-derived).
            self.cfg['start_dir'] = self.ext.get('options', {}).get('start_dir', None)
            self.builddir = self.master.builddir
            self.installdir = self.master.installdir
            self.modules_tool = self.master.modules_tool
            self.module_generator = self.master.module_generator
            self.is_extension = True
            self.unpack_options = None
        else:
            EasyBlock.__init__(self, *args, **kwargs)
            self.options = copy.deepcopy(self.cfg.get('options', {}))  # we need this for Extension.sanity_check_step

        self.ext_dir = None  # dir where extension source was unpacked
    def __init__(self, *args, **kwargs):
        """Initialize either as EasyBlock or as Extension."""

        self.is_extension = False

        if isinstance(args[0], EasyBlock):
            Extension.__init__(self, *args, **kwargs)
            # name and version properties of EasyBlock are used, so make sure name and version are correct
            self.cfg["name"] = self.ext.get("name", None)
            self.cfg["version"] = self.ext.get("version", None)
            self.builddir = self.master.builddir
            self.installdir = self.master.installdir
            self.is_extension = True
        else:
            EasyBlock.__init__(self, *args, **kwargs)
            self.options = copy.deepcopy(self.cfg.get("options", {}))  # we need this for Extension.sanity_check_step

        self.ext_dir = None  # dir where extension source was unpacked
예제 #5
0
    def __init__(self, *args, **kwargs):
        """Initialize either as EasyBlock or as Extension."""

        self.is_extension = False

        if isinstance(args[0], EasyBlock):
            Extension.__init__(self, *args, **kwargs)
            # name and version properties of EasyBlock are used, so make sure name and version are correct
            self.cfg['name'] = self.ext.get('name', None)
            self.cfg['version'] = self.ext.get('version', None)
            self.builddir = self.master.builddir
            self.installdir = self.master.installdir
            self.is_extension = True
            self.unpack_options = None
        else:
            EasyBlock.__init__(self, *args, **kwargs)
            self.options = copy.deepcopy(self.cfg.get(
                'options', {}))  # we need this for Extension.sanity_check_step

        self.ext_dir = None  # dir where extension source was unpacked
    def __init__(self, *args, **kwargs):
        """Initialize either as EasyBlock or as Extension."""

        self.is_extension = False

        if isinstance(args[0], EasyBlock):
            Extension.__init__(self, *args, **kwargs)
            # name and version properties of EasyBlock are used, so make sure name and version are correct
            self.cfg['name'] = self.ext.get('name', None)
            self.cfg['version'] = self.ext.get('version', None)
            self.builddir = self.master.builddir
            self.installdir = self.master.installdir
            self.is_extension = True
            self.unpack_options = None

            # make sure that extra custom easyconfig parameters are known
            extra_params = self.__class__.extra_options()
            self.cfg.extend_params(extra_params, overwrite=False)
        else:
            EasyBlock.__init__(self, *args, **kwargs)
            self.options = copy.deepcopy(self.cfg.get('options', {}))  # we need this for Extension.sanity_check_step

        self.ext_dir = None  # dir where extension source was unpacked