diff options
author | Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com> | 2012-11-26 22:24:45 +0100 |
---|---|---|
committer | Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com> | 2012-11-26 22:24:45 +0100 |
commit | 3b6b1d147dae6ba825d0597d88abfda4cc3d295a (patch) | |
tree | 5f831ac5ce11250f1e05bcc26023657274233ce0 /_markerlib | |
parent | 1c2dff7451101c9cfb37e4ae16eb23ef17332f5a (diff) | |
download | external_python_setuptools-3b6b1d147dae6ba825d0597d88abfda4cc3d295a.tar.gz external_python_setuptools-3b6b1d147dae6ba825d0597d88abfda4cc3d295a.tar.bz2 external_python_setuptools-3b6b1d147dae6ba825d0597d88abfda4cc3d295a.zip |
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.)
--HG--
branch : distribute
extra : rebase_source : c245820df5090ac5d005ebb7d6c4419145afce53
Diffstat (limited to '_markerlib')
-rw-r--r-- | _markerlib/markers.py | 11 |
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, |