aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/dist.py
diff options
context:
space:
mode:
authorpje <none@none>2013-05-04 16:21:50 -0400
committerpje <none@none>2013-05-04 16:21:50 -0400
commite7d341af8987659ae1fa79701515c16238fe22f6 (patch)
tree2c650b1a0f73cc48f412124c00c20d8764aecb5f /setuptools/dist.py
parent46d1c4ed7df5722771e382a55fb79d9f1d16e389 (diff)
downloadexternal_python_setuptools-e7d341af8987659ae1fa79701515c16238fe22f6.tar.gz
external_python_setuptools-e7d341af8987659ae1fa79701515c16238fe22f6.tar.bz2
external_python_setuptools-e7d341af8987659ae1fa79701515c16238fe22f6.zip
Backport experimental environment marker support from the trunk
--HG-- branch : setuptools-0.6
Diffstat (limited to 'setuptools/dist.py')
-rw-r--r--setuptools/dist.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/setuptools/dist.py b/setuptools/dist.py
index c1218ef2..582cc557 100644
--- a/setuptools/dist.py
+++ b/setuptools/dist.py
@@ -47,7 +47,6 @@ def assert_string_list(dist, attr, value):
raise DistutilsSetupError(
"%r must be a list of strings (got %r)" % (attr,value)
)
-
def check_nsp(dist, attr, value):
"""Verify that namespace packages are valid"""
assert_string_list(dist,attr,value)
@@ -69,6 +68,10 @@ def check_extras(dist, attr, value):
"""Verify that extras_require mapping is valid"""
try:
for k,v in value.items():
+ if ':' in k:
+ k,m = k.split(':',1)
+ if pkg_resources.invalid_marker(m):
+ raise DistutilsSetupError("Invalid environment marker: "+m)
list(pkg_resources.parse_requirements(v))
except (TypeError,ValueError,AttributeError):
raise DistutilsSetupError(
@@ -77,9 +80,6 @@ def check_extras(dist, attr, value):
"requirement specifiers."
)
-
-
-
def assert_bool(dist, attr, value):
"""Verify that value is True, False, 0, or 1"""
if bool(value) != value: