From c986a17be967fee897897cb8abc86b27d2426f75 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Wed, 20 Jun 2012 12:39:51 -0400 Subject: Skip argparse when injecting requirements. Also adds some unit tests parse_requirements. Change-Id: I3d8625d4627c7933d73059a63f96e19f8d9647ab --- openstack/common/setup.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'openstack') diff --git a/openstack/common/setup.py b/openstack/common/setup.py index 429ba35..6b34417 100644 --- a/openstack/common/setup.py +++ b/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) -- cgit