Skip to content

Commit 9441670

Browse files
author
Andy Freeland
committed
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
1 parent 9aec33a commit 9441670

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

pkg_resources/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -1403,6 +1403,7 @@ class MarkerEvaluation(object):
14031403
'python_version': lambda: platform.python_version()[:3],
14041404
'platform_version': platform.version,
14051405
'platform_machine': platform.machine,
1406+
'platform_python_implementation': platform.python_implementation,
14061407
'python_implementation': platform.python_implementation,
14071408
}
14081409

pkg_resources/api_tests.txt

+3
Original file line numberDiff line numberDiff line change
@@ -420,3 +420,6 @@ Environment Markers
420420

421421
>>> em("python_version > '2.5'")
422422
True
423+
424+
>>> im("platform_python_implementation=='CPython'")
425+
False

0 commit comments

Comments
 (0)