Use zipballs instead of git urls.

Additionally, update openstack.common.setup

Change-Id: I6e72ac890ed93ab5201fe99f63fd579a9d9db89b
This commit is contained in:
Monty Taylor 2012-06-13 11:33:56 -04:00 committed by Brian Waldon
parent e9dd69cca6
commit e3f3d68127
2 changed files with 21 additions and 4 deletions

View File

@ -33,8 +33,8 @@ def parse_mailmap(mailmap='.mailmap'):
for l in fp:
l = l.strip()
if not l.startswith('#') and ' ' in l:
canonical_email, alias = [x for x in l.split(' ') \
if x.startswith('<')]
canonical_email, alias = [x for x in l.split(' ')
if x.startswith('<')]
mapping[alias] = canonical_email
return mapping
@ -61,9 +61,19 @@ def parse_requirements(requirements_files=['requirements.txt',
'tools/pip-requires']):
requirements = []
for line in get_reqs_from_files(requirements_files):
# For the requirements list, we need to inject only the portion
# after egg= so that distutils knows the package it's looking for
# such as:
# -e git://github.com/openstack/nova/master#egg=nova
if re.match(r'\s*-e\s+', line):
requirements.append(re.sub(r'\s*-e\s+.*#egg=(.*)$', r'\1',
line))
# such as:
# http://github.com/openstack/nova/zipball/master#egg=nova
elif re.match(r'\s*https?:', line):
requirements.append(re.sub(r'\s*https?:.*#egg=(.*)$', r'\1',
line))
# -f lines are for index locations, and don't get used here
elif re.match(r'\s*-f\s+', line):
pass
else:
@ -75,11 +85,18 @@ def parse_requirements(requirements_files=['requirements.txt',
def parse_dependency_links(requirements_files=['requirements.txt',
'tools/pip-requires']):
dependency_links = []
# dependency_links inject alternate locations to find packages listed
# in requirements
for line in get_reqs_from_files(requirements_files):
# skip comments and blank lines
if re.match(r'(\s*#)|(\s*$)', line):
continue
# lines with -e or -f need the whole line, minus the flag
if re.match(r'\s*-[ef]\s+', line):
dependency_links.append(re.sub(r'\s*-[ef]\s+', '', line))
# lines that are only urls can go in unmolested
elif re.match(r'\s*https?:', line):
dependency_links.append(line)
return dependency_links

View File

@ -26,10 +26,10 @@ iso8601>=0.1.4
# commit hash so we can code to a constant version of keystone.
# Trying to hit a moving target causes our local unittests to fail
# when they should remain unaffected.
-e git://github.com/openstack/keystone.git@ab6be05068068b0902db44b1d60f56eea4fe1215#egg=keystone
https://github.com/openstack/keystone/zipball/ab6be05068068b0902db44b1d60f56eea4fe1215#egg=keystone
# For Swift storage backend.
-e git://github.com/openstack/python-swiftclient.git@dec11f6ec9#egg=python-swiftclient
https://github.com/openstack/python-swiftclient/zipball/dec11f6ec9#egg=python-swiftclient
# Note you will need gcc buildtools installed and must
# have installed libxml headers for lxml to be successfully