diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2016-03-31 10:25:44 -0400 |
---|---|---|
committer | Jason R. Coombs <jaraco@jaraco.com> | 2016-03-31 10:25:44 -0400 |
commit | 04d10ff025e1cbef7ec93a2008c930e856045c8a (patch) | |
tree | 67327643514eee52422a77e27177325705485451 | |
parent | e7a27ca0a3ba06f69836872342089e7333f24a3a (diff) | |
download | external_python_setuptools-04d10ff025e1cbef7ec93a2008c930e856045c8a.tar.gz external_python_setuptools-04d10ff025e1cbef7ec93a2008c930e856045c8a.tar.bz2 external_python_setuptools-04d10ff025e1cbef7ec93a2008c930e856045c8a.zip |
Bypass environment marker evaluation in requirements resolution. Ref #523.
-rw-r--r-- | CHANGES.txt | 6 | ||||
-rw-r--r-- | pkg_resources/__init__.py | 6 | ||||
-rw-r--r-- | pkg_resources/tests/test_resources.py | 1 | ||||
-rw-r--r-- | setuptools/tests/test_egg_info.py | 3 |
4 files changed, 14 insertions, 2 deletions
diff --git a/CHANGES.txt b/CHANGES.txt index 8bc59a1b..dee622ac 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -2,6 +2,12 @@ CHANGES ======= +v20.6.7 +------- + +* Issue #523: Disabled support for environment markers + introduced in v20.5. + v20.6.6 ------- diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py index 2f35b34d..eb84f4ba 100644 --- a/pkg_resources/__init__.py +++ b/pkg_resources/__init__.py @@ -804,8 +804,10 @@ class WorkingSet(object): continue # If the req has a marker, evaluate it -- skipping the req if # it evaluates to False. - if req.marker and not req.marker.evaluate(): - continue + # https://github.com/pypa/setuptools/issues/523 + _issue_523_bypass = True + if not _issue_523_bypass and req.marker and not req.marker.evaluate(): + continue dist = best.get(req.key) if dist is None: # Find the best distribution and add it to the map diff --git a/pkg_resources/tests/test_resources.py b/pkg_resources/tests/test_resources.py index 3a8c8e54..791d8ee3 100644 --- a/pkg_resources/tests/test_resources.py +++ b/pkg_resources/tests/test_resources.py @@ -182,6 +182,7 @@ class TestDistro: msg = 'Foo 0.9 is installed but Foo==1.2 is required' assert vc.value.report() == msg + @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_environment_markers(self): """ Environment markers are evaluated at resolution time. diff --git a/setuptools/tests/test_egg_info.py b/setuptools/tests/test_egg_info.py index fd5f26fc..d37567b4 100644 --- a/setuptools/tests/test_egg_info.py +++ b/setuptools/tests/test_egg_info.py @@ -104,6 +104,7 @@ class TestEggInfo(object): 'setup.py': setup_script, }) + @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_install_requires_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """install_requires=["barbazquux;python_version<'2'"],""") @@ -114,12 +115,14 @@ class TestEggInfo(object): requires_txt).read().split('\n') assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_setup_requires_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """setup_requires=["barbazquux;python_version<'2'"],""") self._run_install_command(tmpdir_cwd, env) assert glob.glob(os.path.join(env.paths['lib'], 'barbazquux*')) == [] + @pytest.mark.xfail(reason="Functionality disabled; see #523") def test_tests_require_with_markers(self, tmpdir_cwd, env): self._setup_script_with_requires( """tests_require=["barbazquux;python_version<'2'"],""") |