def __init__(self, repos, cfg, label, flavor, extraMacros={},
              laReposCache = None, srcdirs = None):
     Recipe.__init__(self, cfg, laReposCache=laReposCache, srcdirs=srcdirs)
     self.repos = repos
     self.files = {}
     self.paths = {}
     self.label = label
     self.flavor = flavor
     self.macros.update(extraMacros)
     self.requestedFiles = {}
Exemple #2
0
 def __init__(self, repos, cfg, branch, flavor, extraMacros={}):
     Recipe.__init__(self, cfg)
     self.repos = repos
     self.redirections = _Redirections()
     self.flavor = flavor
     if branch is not None:
         self.macros.binarybranch = str(branch)
         self.macros.update(extraMacros)
         # this allows override of binarybranch externally (used by rMake)
         self.branch = versions.VersionFromString(self.macros.binarybranch)
     else:
         self.branch = None
     self.rules = {}
 def __init__(self, repos, cfg, branch, flavor, extraMacros={}):
     Recipe.__init__(self, cfg)
     self.repos = repos
     self.redirections = _Redirections()
     self.flavor = flavor
     if branch is not None:
         self.macros.binarybranch = str(branch)
         self.macros.update(extraMacros)
         # this allows override of binarybranch externally (used by rMake)
         self.branch = versions.VersionFromString(self.macros.binarybranch)
     else:
         self.branch = None
     self.rules = {}
Exemple #4
0
 def __init__(self,
              repos,
              cfg,
              label,
              flavor,
              extraMacros={},
              laReposCache=None,
              srcdirs=None):
     Recipe.__init__(self, cfg, laReposCache=laReposCache, srcdirs=srcdirs)
     self.repos = repos
     self.files = {}
     self.paths = {}
     self.label = label
     self.flavor = flavor
     self.macros.update(extraMacros)
     self.requestedFiles = {}
    def __init__(self, cfg, laReposCache, srcdirs, extraMacros={},
                 crossCompile=None, lightInstance=False):
        Recipe.__init__(self, cfg, lightInstance=lightInstance,
                        laReposCache = laReposCache, srcdirs = srcdirs)
        self.fileFinder = lookaside.FileFinder(self.name, self.laReposCache,
                                           localDirs=self.srcdirs,
                                           multiurlMap=self.multiurlMap,
                                           mirrorDirs=cfg.mirrorDirs,
                                           cfg=cfg)
        self._build = []

        # lightInstance for only instantiating, not running (such as checkin)
        self._lightInstance = lightInstance
        if not hasattr(self,'_buildFlavor'):
            self._buildFlavor = cfg.buildFlavor

        self._policyPathMap = {}
        self._policies = {}
        self._policyMap = {}
        self._componentReqs = {}
        self._componentProvs = {}
        self._derivedFiles = {} # used only for derived packages
        self.byDefaultIncludeSet = frozenset()
        self.byDefaultExcludeSet = frozenset()
        self._repos = None
        self.hostmacros = self.macros.copy()
        self.targetmacros = self.macros.copy()
        # Mapping from trove name to scripts
        self._scriptsMap = {}

        self._provideGroup = {} # used by User build action to indicate if
        # group should also be provided

        # allow for architecture not to be set -- this could happen
        # when storing the recipe e.g.
        for key in cfg.macros:
            self.macros._override(key, cfg['macros'][key])

        self.macros.name = self.name
        self.macros.version = self.version
        if '.' in self.version:
            self.macros.major_version = '.'.join(self.version.split('.')[0:2])
        else:
            self.macros.major_version = self.version
        self.packages = { self.name : True }
        self.manifests = set()
        if extraMacros:
            self.macros.update(extraMacros)

        self._isCrossCompileTool = False
        self._isCrossCompiling = False
        if crossCompile is None:
            crossCompile = getCrossCompileSettings(self._buildFlavor)

        if crossCompile:
            self.setCrossCompile(crossCompile)
        else:
            self.macros.update(use.Arch._getMacros())
            self.macros.setdefault('hostarch', self.macros['targetarch'])
            self.macros.setdefault('buildarch', self.macros['targetarch'])
        if not hasattr(self, 'keepBuildReqs'):
            self.keepBuildReqs = []

        if self.needsCrossFlags() and self.keepBuildReqs is not True:
            crossSuffixes = ['devel', 'devellib']
            crossTools = ['gcc', 'libgcc', 'binutils']
            if (not hasattr(self, 'keepBuildReqs')
                or not hasattr(self.keepBuildReqs, '__iter__')):
                # if we're in the "lightReference" mode, this might
                # return some bogus object...
                self.keepBuildReqs = set()
            newCrossRequires = \
                [ x for x in self.buildRequires
                   if (':' in x and x.split(':')[-1] in crossSuffixes
                       and x.split(':')[0] not in crossTools
                       and x not in self.keepBuildReqs) ]
            self.buildRequires = [ x for x in self.buildRequires
                                   if x not in newCrossRequires ]
            self.crossRequires.extend(newCrossRequires)

        # define by default %(pyver)s to match system's
        # python, so that it only has to be (manually) changed
        # if we are using a different python
        if 'pyver' not in self.macros:
            self.macros.pyver = str(sys.version_info[0]) + '.' \
                + str(sys.version_info[1])

        self.mainDir(self.nameVer(), explicit=False)
        self._autoCreatedFileCount = 0
Exemple #6
0
    def __init__(self,
                 cfg,
                 laReposCache,
                 srcdirs,
                 extraMacros={},
                 crossCompile=None,
                 lightInstance=False):
        Recipe.__init__(self,
                        cfg,
                        lightInstance=lightInstance,
                        laReposCache=laReposCache,
                        srcdirs=srcdirs)
        self.fileFinder = lookaside.FileFinder(self.name,
                                               self.laReposCache,
                                               localDirs=self.srcdirs,
                                               multiurlMap=self.multiurlMap,
                                               mirrorDirs=cfg.mirrorDirs,
                                               cfg=cfg)
        self._build = []

        # lightInstance for only instantiating, not running (such as checkin)
        self._lightInstance = lightInstance
        if not hasattr(self, '_buildFlavor'):
            self._buildFlavor = cfg.buildFlavor

        self._policyPathMap = {}
        self._policies = {}
        self._policyMap = {}
        self._componentReqs = {}
        self._componentProvs = {}
        self._derivedFiles = {}  # used only for derived packages
        self.byDefaultIncludeSet = frozenset()
        self.byDefaultExcludeSet = frozenset()
        self._repos = None
        self.hostmacros = self.macros.copy()
        self.targetmacros = self.macros.copy()
        # Mapping from trove name to scripts
        self._scriptsMap = {}

        self._provideGroup = {}  # used by User build action to indicate if
        # group should also be provided

        # allow for architecture not to be set -- this could happen
        # when storing the recipe e.g.
        for key in cfg.macros:
            self.macros._override(key, cfg['macros'][key])

        self.macros.name = self.name
        self.macros.version = self.version
        if '.' in self.version:
            self.macros.major_version = '.'.join(self.version.split('.')[0:2])
        else:
            self.macros.major_version = self.version
        self.packages = {self.name: True}
        self.manifests = set()
        if extraMacros:
            self.macros.update(extraMacros)

        self._isCrossCompileTool = False
        self._isCrossCompiling = False
        if crossCompile is None:
            crossCompile = getCrossCompileSettings(self._buildFlavor)

        if crossCompile:
            self.setCrossCompile(crossCompile)
        else:
            self.macros.update(use.Arch._getMacros())
            self.macros.setdefault('hostarch', self.macros['targetarch'])
            self.macros.setdefault('buildarch', self.macros['targetarch'])
        if not hasattr(self, 'keepBuildReqs'):
            self.keepBuildReqs = []

        if self.needsCrossFlags() and self.keepBuildReqs is not True:
            crossSuffixes = ['devel', 'devellib']
            crossTools = ['gcc', 'libgcc', 'binutils']
            if (not hasattr(self, 'keepBuildReqs')
                    or not hasattr(self.keepBuildReqs, '__iter__')):
                # if we're in the "lightReference" mode, this might
                # return some bogus object...
                self.keepBuildReqs = set()
            newCrossRequires = \
                [ x for x in self.buildRequires
                   if (':' in x and x.split(':')[-1] in crossSuffixes
                       and x.split(':')[0] not in crossTools
                       and x not in self.keepBuildReqs) ]
            self.buildRequires = [
                x for x in self.buildRequires if x not in newCrossRequires
            ]
            self.crossRequires.extend(newCrossRequires)

        # define by default %(pyver)s to match system's
        # python, so that it only has to be (manually) changed
        # if we are using a different python
        if 'pyver' not in self.macros:
            self.macros.pyver = str(sys.version_info[0]) + '.' \
                + str(sys.version_info[1])

        self.mainDir(self.nameVer(), explicit=False)
        self._autoCreatedFileCount = 0