def build_external_deps_rpms(channel, options): # let's build the external reqs RPMS req_file = os.path.join(os.getcwd(), '%s-reqs.txt' % channel) if not os.path.exists(req_file): print("Can't find the req file for the %s channel." % channel) sys.exit(0) # if not dev, check for pinned versions. if channel != 'dev': non_pinned = get_non_pinned(req_file) if len(non_pinned) > 0: deps = ', '.join(non_pinned) raise DependencyError('Unpinned dependencies: %s' % deps) # we have a requirement file, we can go ahead and feed pypi2rpm with it with open(req_file) as f: for line in f.readlines(): line = line.strip() if not line or line.startswith('#'): continue project, version = split_version(line) build_rpm(project=project, dist_dir=options.dist_dir, version=version, index=options.index, download_cache=options.download_cache)
def build_external_deps_rpms(channel, options): # let's build the external reqs RPMS req_file = os.path.join(os.getcwd(), '%s-reqs.txt' % channel) if not os.path.exists(req_file): print("Can't find the req file for the %s channel." % channel) sys.exit(0) # we have a requirement file, we can go ahead and feed pypi2rpm with it with open(req_file) as f: for line in f.readlines(): project, version = split_version(line) build_rpm(project=project, dist_dir=options.dist_dir, version=version, index=options.index)