summaryrefslogtreecommitdiff
path: root/_markerlib/markers.py
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2012-11-26 22:24:45 +0100
committerArfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com>2012-11-26 22:24:45 +0100
commitfc4ed80c10a038eebe1f4e6a30de5c87bddb867b (patch)
treec5dff1cef7bee49bc8327325450f0a4237e0f071 /_markerlib/markers.py
parentf46d27cad4983ac0c7cc8fba5664137fb5466f54 (diff)
downloadpython-setuptools-bitbucket-fc4ed80c10a038eebe1f4e6a30de5c87bddb867b.tar.gz
Fix 2 errors with Jython 2.5.
(Now there remain 1 failure and 2 errors with Jython 2.5 and 1 failure and 5 errors with Jython 2.7.)
Diffstat (limited to '_markerlib/markers.py')
-rw-r--r--_markerlib/markers.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/_markerlib/markers.py b/_markerlib/markers.py
index 23091e64..c93d7f3b 100644
--- a/_markerlib/markers.py
+++ b/_markerlib/markers.py
@@ -25,7 +25,16 @@ import weakref
_builtin_compile = compile
-from platform import python_implementation
+try:
+ from platform import python_implementation
+except ImportError:
+ if os.name == "java":
+ # Jython 2.5 has ast module, but not platform.python_implementation() function.
+ def python_implementation():
+ return "Jython"
+ else:
+ raise
+
# restricted set of variables
_VARS = {'sys.platform': sys.platform,