def _add_egg_repos(self, url, product_metadata): if 'egg_repos' in product_metadata: repos = ['{}/{}/'.format(url, path) for path in product_metadata['egg_repos']] else: repos = [url] self.enst.chain.repos.extend(repos) if not product_metadata['subscribed']: for repo in repos: self.enst.chain.unsubscribed_repos[repo] = product_metadata for cname, project in product_metadata['eggs'].iteritems(): for distname, data in project['files'].iteritems(): name, version, build = dist_naming.split_eggname(distname) spec = dict(metadata_version='1.1', name=name, version=version, build=build, python=data.get('python', '2.7'), packages=data.get('depends', []), size=data.get('size')) add_Reqs_to_spec(spec) assert spec['cname'] == cname, distname dist = repos[data.get('repo', 0)] + distname self.enst.chain.index[dist] = spec self.enst.chain.groups[cname].append(dist)
def _add_egg_repos(self, url, index): if "egg_repos" in index: repos = [url + "/" + path + "/" for path in index["egg_repos"]] else: repos = [url] self.enst.chain.repos.extend(repos) for cname, project in index["eggs"].iteritems(): for distname, data in project["files"].iteritems(): name, version, build = dist_naming.split_eggname(distname) spec = dict( metadata_version="1.1", name=name, version=version, build=build, python=data.get("python", "2.7"), packages=data.get("depends", []), ) add_Reqs_to_spec(spec) assert spec["cname"] == cname, distname dist = repos[data.get("repo", 0)] + distname self.enst.chain.index[dist] = spec self.enst.chain.groups[cname].append(dist)