[Distutils] setuptools on jython
Philip Jenvey
pjenvey at groovie.org
Sat Jan 12 04:57:29 CET 2008
Jython trunk has made a lot of progress on setuptools support. The
gory details are here:
http://wiki.python.org/jython/SetuptoolsOnJython
The final few issues require some changes to setuptools itself:
o usage of os.chmod. most uses are actually wrapped in an os.name ==
'posix', or except AttributeError checks, but one was missed (Jython
lacks os.chmod)
o a unit test assumed CPython dict ordering
I've attached a patch against the 0.6 branch for both of these issues.
Though there's one more issue that'll be more difficult to deal with:
setuptools uses marshal.load to read variables (via co_names and
co_consts) from a module's bytecode (pyc/o) without importing it.
Jython and IronPython don't compile to .pyc, nor do their code
objects support co_names and co_consts, so this isn't portable.
marshal.load is used in a couple places:
o setuptools.depends.extract_constant, which is only used in
setuptools by Require.get_version(). I don't know when this is used
or what it's used for
o to find un-zip_safe variables/calls when a distribution doesn't
specify zip_safetyness. Probably the easiest way to deal with this is
to just fallback to zip_safe=False on these platforms
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jython_compat-r59690.diff
Type: application/octet-stream
Size: 2254 bytes
Desc: not available
Url : http://mail.python.org/pipermail/distutils-sig/attachments/20080111/84191a15/attachment.obj
-------------- next part --------------
--
Philip Jenvey
More information about the Distutils-SIG
mailing list