Issue #367 wontfix
Since distribute 0.6.33, importing
setuptools.sandbox fails on Jython 2.5.0 and 2.5.1 by following exception.
% python Jython 2.5.1 (Release_2_5_1:6813, Sep 26 2009, 13:47:54) [OpenJDK 64-Bit Server VM (Oracle Corporation)] on java1.7.0_21 Type "help", "copyright", "credits" or "license" for more information. >>> import setuptools.sandbox Traceback (most recent call last): File "<stdin>", line 1, in <module> File "setuptools/sandbox.py", line 3, in <module> import org.python.modules.posix.PosixModule as _os ImportError: No module named posix
This seems that the problem was caused by the incompatibility of location of posix module. But I'm not sure how I can fix this reliably.
import os, sys, __builtin__, tempfile, operator, pkg_resources if os.name == "java": import org.python.modules.posix.PosixModule as _os else: _os = sys.modules[os.name] try: _file = file except NameError: _file = None