summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Freeland <andy.freeland@redjack.com>2015-09-10 01:03:42 -0400
committerAndy Freeland <andy.freeland@redjack.com>2015-09-10 01:14:16 -0400
commit94416707fd59a65f4a8f7f70541d6b3fc018b626 (patch)
treef1e48c749f6078241976cd4605e5b1fb95517bac
parent9aec33a0cf4a3bcd152d3d142946a98530588af4 (diff)
downloadpython-setuptools-git-94416707fd59a65f4a8f7f70541d6b3fc018b626.tar.gz
Add support for python_platform_implementation environment marker
This patch adds support for the 'python_platform_implementation' environment marker as defined by PEP-0426: https://www.python.org/dev/peps/pep-0426/#environment-markers
-rw-r--r--pkg_resources/__init__.py1
-rw-r--r--pkg_resources/api_tests.txt3
2 files changed, 4 insertions, 0 deletions
diff --git a/pkg_resources/__init__.py b/pkg_resources/__init__.py
index 42ddcf7c..639dc4a6 100644
--- a/pkg_resources/__init__.py
+++ b/pkg_resources/__init__.py
@@ -1403,6 +1403,7 @@ class MarkerEvaluation(object):
'python_version': lambda: platform.python_version()[:3],
'platform_version': platform.version,
'platform_machine': platform.machine,
+ 'platform_python_implementation': platform.python_implementation,
'python_implementation': platform.python_implementation,
}
diff --git a/pkg_resources/api_tests.txt b/pkg_resources/api_tests.txt
index 1c852e81..d28db0f5 100644
--- a/pkg_resources/api_tests.txt
+++ b/pkg_resources/api_tests.txt
@@ -420,3 +420,6 @@ Environment Markers
>>> em("python_version > '2.5'")
True
+
+ >>> im("platform_python_implementation=='CPython'")
+ False