[Python-Dev] addressing distutils inability to track file dependencies
Fredrik Lundh
fredrik@pythonware.com
Fri, 14 Jun 2002 13:23:06 +0200
thomas wrote:
> >=20
> > does anyone here know how to do that, without having to resort to
> > ugly wrapper batch files/shell scripts?
> >=20
> > (distutils is also a pain to use with a version management system
> > that marks files in the repository as read-only; distutils copy =
function
> > happily copies all the status bits. but the remove function refuses =
to
> > remove files that are read-only, even if the files have been created
> > by distutils itself...)
>=20
> setup.py install --install-lib=3D.
doesn't work: distutils ends up trying to overwrite (readonly)
original source files.
consider PIL, for example: in my source directory, I have the
following files, checked out from a repository:
setup.py
_imaging.c
*.c
PIL/*.py
I want to be able to run setup.py and end up with an _imaging.pyd
in the same directory. I don't want distutils to attempt to copy
stuff from PIL/*.py to PIL/*.py, mess up other parts of my source
tree, install any scripts (broken or not) in the Python directory, or
just generally make an ass of itself when failing to copy readonly
files on top of other readonly files.
the following is a bit more reliable (windows version):
rd /s /q build
python setup.py build
rd /s /q install
python setup.py install --prefix install
copy install\*.pyd .
if distutils didn't mess up when deleting readonly files it created all
by itself, the following command could perhaps work:
setup.py install_ext --install-lib=3D.
but there is no install_ext command in the version I have...
</F>