[Python-Dev] addressing distutils inability to track file dependencies
Fri, 14 Jun 2002 13:23:06 +0200
> > does anyone here know how to do that, without having to resort to
> > ugly wrapper batch files/shell scripts?
> > (distutils is also a pain to use with a version management system
> > that marks files in the repository as read-only; distutils copy =
> > happily copies all the status bits. but the remove function refuses =
> > remove files that are read-only, even if the files have been created
> > by distutils itself...)
> 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:
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...