diff options
author | Monty Taylor <mordred@inaugust.com> | 2015-07-10 10:11:49 -0400 |
---|---|---|
committer | Monty Taylor <mordred@inaugust.com> | 2015-07-10 21:24:35 +0000 |
commit | 61a3a1ecdf99c680e509742fdc6c441b499af130 (patch) | |
tree | 5e9f2443ce4a8c164caa8bf5c08b8aed0d77eb83 | |
parent | 827bc98de50f6eb2902826892d9203184081836c (diff) | |
download | pbr-61a3a1ecdf99c680e509742fdc6c441b499af130.tar.gz |
Wrap env markers in parens1.3.0
If there are boolean conditions in the env marker, the existing join
causes the extra tag to only be applied to the first of them, causing
carnage.
Change-Id: I7b735befae76b330f923276e1c48ef23816774d4
-rw-r--r-- | pbr/tests/test_packaging.py | 4 | ||||
-rw-r--r-- | pbr/tests/test_util.py | 2 | ||||
-rw-r--r-- | pbr/util.py | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/pbr/tests/test_packaging.py b/pbr/tests/test_packaging.py index 81701d1..c6b2e7d 100644 --- a/pbr/tests/test_packaging.py +++ b/pbr/tests/test_packaging.py @@ -454,8 +454,8 @@ class TestRequirementParsing(base.BaseTestCase): # anonymous section instead of the empty string. Weird. expected_requirements = { None: ['bar'], - ":python_version=='2.6'": ['quux<1.0'], - "test:python_version=='2.7'": ['baz>3.2'], + ":(python_version=='2.6')": ['quux<1.0'], + "test:(python_version=='2.7')": ['baz>3.2'], "test": ['foo'] } setup_py = os.path.join(tempdir, 'setup.py') diff --git a/pbr/tests/test_util.py b/pbr/tests/test_util.py index 7a4c6bd..5999b17 100644 --- a/pbr/tests/test_util.py +++ b/pbr/tests/test_util.py @@ -48,7 +48,7 @@ class TestExtrasRequireParsingScenarios(base.BaseTestCase): baz<1.6 :python_version=='2.6' """, 'expected_extra_requires': { - "test:python_version=='2.6'": ['foo', 'baz<1.6'], + "test:(python_version=='2.6')": ['foo', 'baz<1.6'], "test": ['bar']}}), ('no_extras', { 'config_text': """ diff --git a/pbr/util.py b/pbr/util.py index 929a234..644bcd8 100644 --- a/pbr/util.py +++ b/pbr/util.py @@ -418,7 +418,7 @@ def setup_cfg_to_setup_kwargs(config): for req_group in all_requirements: for requirement, env_marker in all_requirements[req_group]: if env_marker: - extras_key = '%s:%s' % (req_group, env_marker) + extras_key = '%s:(%s)' % (req_group, env_marker) else: extras_key = req_group extras_require.setdefault(extras_key, []).append(requirement) |