Setuptools requirements:
PEP 302 style zipimport module Added in r3463
number of misc. Jython bug fixes most already committed
We don't have:
tarfile module. This requires a small patch to PyString to work
- a valid sys.executable. required by setuptools and distutils for spawning subprocesses. It's impossible to determine argv[0] from java: I'm thinking the jython executable should pass this information along to Jython (java -Dpython.executable=$0)
- distutils: requires a number of small patches:
- - distutils metadata for the os.name == 'java' (like path names, default bdist type, etc) - a jython spawn-like function: "error: don't know how to spawn programs on platform 'java'". os.system works as a replacement - a valid sys.executable
- tempfile.mkstemp
- - I have patch #1783692 implementing mkstemp/NamedTemporaryFile with Java's secure File.createTempFile
- imp.acquire/release_lock
- This is just a simple lock, but may have to be called by internal imp operations. I'm not sure
- A few small upstream patches to setuptools, this includes:
- use tempfile.NamedTemporaryFile instead of tempfile.mkstemp (Java/Jython doesn't allow usage of file descriptors). This will also remove a usage of os.open - wrap uses of os.chmod in hasattr(os, 'chmod') - sandbox may assume os.open (and maybe others) exist - setuptools cut and pasted shutil's rmtree from CPython 2.3, which uses lstat to check for directories. This may need to change to os.path.isdir (Jython might be able to do lstat, though)