Remove all 2.7 filtering
ordereddict and importlib used to break when attempted to install on python 2.7 - but this situation seems to have improved in modern pip/setuptools. Remove the logic and support for this. Change-Id: I49d9c9ee3108ad7ec9537f3fcec62e84d4de1680
This commit is contained in:
parent
c2aab3b27f
commit
ee94082d48
|
@ -49,9 +49,6 @@ from pbr import extra_files
|
|||
TRUE_VALUES = ('true', '1', 'yes')
|
||||
REQUIREMENTS_FILES = ('requirements.txt', 'tools/pip-requires')
|
||||
TEST_REQUIREMENTS_FILES = ('test-requirements.txt', 'tools/test-requires')
|
||||
# part of the standard library starting with 2.7
|
||||
# adding it to the requirements list screws distro installs
|
||||
BROKEN_ON_27 = ('importlib', 'ordereddict')
|
||||
|
||||
|
||||
def get_requirements_files():
|
||||
|
@ -153,10 +150,6 @@ def parse_requirements(requirements_files=None):
|
|||
elif re.match(r'\s*-f\s+', line):
|
||||
line = None
|
||||
reason = 'Index Location'
|
||||
elif (project_name and
|
||||
project_name in BROKEN_ON_27 and sys.version_info >= (2, 7)):
|
||||
line = None
|
||||
reason = 'Python 2.6 only dependency'
|
||||
|
||||
if line is not None:
|
||||
requirements.append(line)
|
||||
|
|
|
@ -304,20 +304,6 @@ class ParseRequirementsTest(base.BaseTestCase):
|
|||
fh.write("-f foobar")
|
||||
self.assertEqual([], packaging.parse_requirements([self.tmp_file]))
|
||||
|
||||
def test_parse_requirements_removes_versioned_ordereddict(self):
|
||||
self.useFixture(fixtures.MonkeyPatch('sys.version_info', (2, 7)))
|
||||
with open(self.tmp_file, 'w') as fh:
|
||||
fh.write("ordereddict==1.0.1")
|
||||
self.assertEqual([], packaging.parse_requirements([self.tmp_file]))
|
||||
|
||||
def test_parse_requirements_keeps_versioned_ordereddict(self):
|
||||
self.useFixture(fixtures.MonkeyPatch('sys.version_info', (2, 6)))
|
||||
with open(self.tmp_file, 'w') as fh:
|
||||
fh.write("ordereddict==1.0.1")
|
||||
self.assertEqual([
|
||||
"ordereddict==1.0.1"],
|
||||
packaging.parse_requirements([self.tmp_file]))
|
||||
|
||||
def test_parse_requirements_override_with_env(self):
|
||||
with open(self.tmp_file, 'w') as fh:
|
||||
fh.write("foo\nbar")
|
||||
|
|
Loading…
Reference in New Issue