[Distutils] distutils-0.1.2 with JPython
Finn Bock
bckfnn@pipmail.dknet.dk
Tue, 21 Dec 1999 22:01:31 GMT
Hi,
Being new to Distutils-SIG, I apologized if these topics are old
already. I have tried to run distutils 0.1.2 under JPython and windows
NT, this is what I came up with.
a) distutils attempt to install itself in sys.prefix. Unfortunately
JPython does not, as distributed, import site.py. So by default
installed modules can not be located. I guess this is a problem in
JPython and have reported it as:
http://www.python.org/jpython-bugs/incoming?id=229
b) sysconfig does not known about os.name == 'java'. Hacked below.
c) Wildcard import in the local name space does not work with JPython.
This is used in util.py. Even though this is a JPython bug
http://www.python.org/jpython-bugs/incoming?id=229
I think distutils could avoid the situation until JPython is fixed.
Hacked below.
d) JPython's 'os' modules does not contain utime or chmod. Hacked
below.
e) When building a "dist", the distutils.errors was missing in
dist.py. Hacked below.
f) The fields of IOError are different between JPython and CPython.
The field strerror exists, but it is None. This is a known difference.
Hacked below.
g) os.link is not defined. Neither is os.link when using CPython for
Windows NT. I exchanged os.link with util.copy_file, but that is
bogus. Unfortunately it is also included in the hack below.
h) spawn.py did not support os.name == 'java'. Hacked below.
i) The windows version of gzip that happened to be executed when
outputting gztar on my PC complains if the .tar.gz already exists.
Perhaps dist.py should remove any existing .tar.gz before trying to
make a new one. Not fixed.
Some general questions:
1) I am unsure, how os.name dependencies are best introduced. F.ex. in
the dist.make_zipfile(), I just added an if. It does not feel right.
2) Can (and should) distutil deal with the cr/lf issues of text files?
When building a distribution targeted to a specific platform, I think
distutils could help out with converting the obvious text-files.
In order to gain some momentum with my tests, I just hacked simple
solutions to my problems. The changes that I have made may break more
than they fixes, so beware.
The result can be seen here:
http://pip.dknet.dk/~bckfnn/Distutils-0.1.2-fbo.tar.gz
With this version, I could run the "dist" command and the "install"
command with normal module/*.py files.
regards,
finn