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
28efa26a
Commit
28efa26a
authored
Jul 20, 2013
by
Daniel Holth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add _-separated keys to environment markers
parent
d01d1da2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
_markerlib/markers.py
_markerlib/markers.py
+4
-0
setuptools/tests/test_markerlib.py
setuptools/tests/test_markerlib.py
+4
-0
No files found.
_markerlib/markers.py
View file @
28efa26a
...
...
@@ -49,6 +49,10 @@ _VARS = {'sys.platform': sys.platform,
'extra'
:
None
# wheel extension
}
for
var
in
list
(
_VARS
.
keys
()):
if
'.'
in
var
:
_VARS
[
var
.
replace
(
'.'
,
'_'
)]
=
_VARS
[
var
]
def
default_environment
():
"""Return copy of default PEP 385 globals dictionary."""
return
dict
(
_VARS
)
...
...
setuptools/tests/test_markerlib.py
View file @
28efa26a
...
...
@@ -19,20 +19,24 @@ class TestMarkerlib(unittest.TestCase):
self
.
assertTrue
(
interpret
(
""
))
self
.
assertTrue
(
interpret
(
"os.name != 'buuuu'"
))
self
.
assertTrue
(
interpret
(
"os_name != 'buuuu'"
))
self
.
assertTrue
(
interpret
(
"python_version > '1.0'"
))
self
.
assertTrue
(
interpret
(
"python_version < '5.0'"
))
self
.
assertTrue
(
interpret
(
"python_version <= '5.0'"
))
self
.
assertTrue
(
interpret
(
"python_version >= '1.0'"
))
self
.
assertTrue
(
interpret
(
"'%s' in os.name"
%
os_name
))
self
.
assertTrue
(
interpret
(
"'%s' in os_name"
%
os_name
))
self
.
assertTrue
(
interpret
(
"'buuuu' not in os.name"
))
self
.
assertFalse
(
interpret
(
"os.name == 'buuuu'"
))
self
.
assertFalse
(
interpret
(
"os_name == 'buuuu'"
))
self
.
assertFalse
(
interpret
(
"python_version < '1.0'"
))
self
.
assertFalse
(
interpret
(
"python_version > '5.0'"
))
self
.
assertFalse
(
interpret
(
"python_version >= '5.0'"
))
self
.
assertFalse
(
interpret
(
"python_version <= '1.0'"
))
self
.
assertFalse
(
interpret
(
"'%s' not in os.name"
%
os_name
))
self
.
assertFalse
(
interpret
(
"'buuuu' in os.name and python_version >= '5.0'"
))
self
.
assertFalse
(
interpret
(
"'buuuu' in os_name and python_version >= '5.0'"
))
environment
=
default_environment
()
environment
[
'extra'
]
=
'test'
...
...
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