Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
setuptools
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jérome Perrin
setuptools
Commits
04d10ff0
Commit
04d10ff0
authored
Mar 31, 2016
by
Jason R. Coombs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bypass environment marker evaluation in requirements resolution. Ref #523.
parent
e7a27ca0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
2 deletions
+14
-2
CHANGES.txt
CHANGES.txt
+6
-0
pkg_resources/__init__.py
pkg_resources/__init__.py
+4
-2
pkg_resources/tests/test_resources.py
pkg_resources/tests/test_resources.py
+1
-0
setuptools/tests/test_egg_info.py
setuptools/tests/test_egg_info.py
+3
-0
No files found.
CHANGES.txt
View file @
04d10ff0
...
...
@@ -2,6 +2,12 @@
CHANGES
=======
v20.6.7
-------
* Issue #523: Disabled support for environment markers
introduced in v20.5.
v20.6.6
-------
...
...
pkg_resources/__init__.py
View file @
04d10ff0
...
...
@@ -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
...
...
pkg_resources/tests/test_resources.py
View file @
04d10ff0
...
...
@@ -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.
...
...
setuptools/tests/test_egg_info.py
View file @
04d10ff0
...
...
@@ -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'"],"""
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment