diff options
author | Andy Freeland <andy.freeland@redjack.com> | 2015-09-10 01:03:42 -0400 |
---|---|---|
committer | Andy Freeland <andy.freeland@redjack.com> | 2015-09-10 01:03:42 -0400 |
commit | b284f0d59144e667e030e732d0bb10092a5b0399 (patch) | |
tree | 4c264c2cc0e030cf673ac2a8e4ea3dc3308473a0 /pkg_resources | |
parent | 64fed57579ccc2803d0b6f30425458427df12767 (diff) | |
download | python-setuptools-bitbucket-b284f0d59144e667e030e732d0bb10092a5b0399.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
Diffstat (limited to 'pkg_resources')
-rw-r--r-- | pkg_resources/__init__.py | 1 | ||||
-rw-r--r-- | pkg_resources/api_tests.txt | 3 |
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 |