Exemple #1
0
 def __init__(self, config):
     self.config = config
     if self.package_name is None:
         self.package_name = "%s-%s" % (self.name, self.version)
     if not hasattr(self, 'repo_dir'):
         self.repo_dir = os.path.join(self.config.local_sources,
                                      self.package_name)
     self.repo_dir = os.path.abspath(self.repo_dir)
     self.build_dir = os.path.join(self.config.sources, self.package_name)
     self.build_dir = os.path.abspath(self.build_dir)
     self.deps = self.deps or []
     self.platform_deps = self.platform_deps or {}
     self._steps = self._default_steps[:]
     if self.config.target_platform == Platform.WINDOWS:
         self._steps.append(BuildSteps.GEN_LIBFILES)
     if self.config.target_platform == Platform.DARWIN:
         self._steps.append(BuildSteps.RELOCATE_OSX_LIBRARIES)
     FilesProvider.__init__(self, config)
     try:
         self.stype.__init__(self)
         self.btype.__init__(self)
     except TypeError:
         # should only work with subclasses that really have Build and
         # Source in bases
         pass
     self.decorate_build_steps()
    def __init__(self, config):
        self.config = config
        if self.licenses is None:
            self.licenses = []
        if self.deps is None:
            self.deps = []
        if self.platform_deps is None:
            self.platform_deps = {}

        if self.package_name is None:
            self.package_name = "%s-%s" % (self.name, self.version)
        if not hasattr(self, 'repo_dir'):
            self.repo_dir = os.path.join(self.config.local_sources,
                    self.package_name)
        self.repo_dir = os.path.abspath(self.repo_dir)
        self.build_dir = os.path.join(self.config.sources, self.package_name)
        self.build_dir = os.path.abspath(self.build_dir)
        self.deps = self.deps or []
        self.platform_deps = self.platform_deps or {}
        self._steps = self._default_steps[:]
        if self.config.target_platform == Platform.WINDOWS:
            self._steps.append(BuildSteps.GEN_LIBFILES)
        FilesProvider.__init__(self, config)
        try:
            self.stype.__init__(self)
            self.btype.__init__(self)
        except TypeError:
            # should only work with subclasses that really have Build and
            # Source in bases
            pass
Exemple #3
0
 def __init__(self, config, env):
     self.config = config
     if self.package_name is None:
         self.package_name = "%s-%s" % (self.name, self.version)
     if not hasattr(self, 'repo_dir'):
         self.repo_dir = os.path.join(self.config.local_sources,
                                      self.package_name)
     self.repo_dir = os.path.abspath(self.repo_dir)
     self.build_dir = os.path.join(self.config.sources, self.package_name)
     self.build_dir = os.path.abspath(self.build_dir)
     self.deps = self.deps or []
     if self.config.prefix_is_build_tools():
         if self.btype == build.BuildType.MESON:
             self.deps.append('meson')
         elif self.btype == build.BuildType.CMAKE:
             self.deps.append('cmake')
     self.env = env.copy()
     if self.bash_completions and config.target_platform in [
             Platform.LINUX
     ]:
         config.bash_completions.update(self.bash_completions)
         self.deps.append('bash-completion')
     self.platform_deps = self.platform_deps or {}
     self._steps = self._default_steps[:]
     if self.config.target_platform == Platform.WINDOWS:
         self._steps.append(BuildSteps.GEN_LIBFILES)
     if self.config.target_platform == Platform.DARWIN:
         self._steps.append(BuildSteps.RELOCATE_OSX_LIBRARIES)
     if self.config.target_platform == Platform.DARWIN and \
             self.config.prefix == self.config.build_tools_prefix:
         self._steps.append(BuildSteps.CODE_SIGN)
     FilesProvider.__init__(self, config)
     try:
         self.stype.__init__(self)
         self.btype.__init__(self)
     except TypeError:
         # should only work with subclasses that really have Build and
         # Source in bases
         pass
     self.decorate_build_steps()