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
parent 1c2dff74
......@@ -2,6 +2,12 @@
CHANGES
=======
------
0.6.33
------
* Fix 2 errors with Jython 2.5.
------
0.6.32
------
......
......@@ -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,
......
import os, sys, __builtin__, tempfile, operator, pkg_resources
_os = sys.modules[os.name]
if os.name == "java":
import org.python.modules.posix.PosixModule as _os
else:
_os = sys.modules[os.name]
try:
_file = file
except NameError:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment