diff options
author | Monty Taylor <mordred@inaugust.com> | 2012-06-20 07:46:43 -0700 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2012-06-20 13:25:32 -0700 |
commit | cfb437e72052ab65bc8d3d0748827c65c6d894bb (patch) | |
tree | a57f92146cd1aba950c2f15c6881ecf57029c982 | |
parent | 31f949f54bf213e4a51ba59a54b49865121651f2 (diff) | |
download | python-keystoneclient-cfb437e72052ab65bc8d3d0748827c65c6d894bb.tar.gz |
Skip argparse when injecting requirements.
Python 2.7 doesn't need argparse. Although pip installs are fine installing
it, listing the requirement in install_requires causes havoc for distro
installs which do not explicitly install argparse for 2.7 as a package.
Fixes bug 1013953
Change-Id: I0275d02e15c8fd2e63b88213ac32f6dd18e2fd26
-rw-r--r-- | keystoneclient/openstack/common/setup.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/keystoneclient/openstack/common/setup.py b/keystoneclient/openstack/common/setup.py index 429ba35..6b34417 100644 --- a/keystoneclient/openstack/common/setup.py +++ b/keystoneclient/openstack/common/setup.py @@ -22,6 +22,7 @@ Utilities with minimum-depends for use in setup.py import os import re import subprocess +import sys from setuptools.command import sdist @@ -76,6 +77,10 @@ def parse_requirements(requirements_files=['requirements.txt', # -f lines are for index locations, and don't get used here elif re.match(r'\s*-f\s+', line): pass + # argparse is part of the standard library starting with 2.7 + # adding it to the requirements list screws distro installs + elif line == 'argparse' and sys.version_info >= (2, 7): + pass else: requirements.append(line) |