[Distutils] More minor issues

Greg Ward gward@python.net
Tue Sep 12 21:30:45 2000


On 12 September 2000, Rene Liebscher said:
> 1) If the install command had a '--force' option,
>    which lets install ignore file dates, you could 
>    overwrite manipulated installations with the
>    original files. 

Good idea, especially since the "install" command needs to get *more*
paranoid about overwriting old files.

...OK, I've just made that change to install*.py.  Boy, we need a better 
way to add an option to a whole family of commands.  ;-(

Anyways, it works for me when installing the Distutils.  Please give it
a try on something that includes data, scripts, etc.  Hmmm, maybe I'll
give it a shot on my Distutil-ized IDLE... that's got modules, data
files, and a script!

...OK, it works, but it revealed a subtle bug in my IDLE setup script.
D'ohh!  Oh well, this is an excuse to repost said setup script to
python-dev and prod Guido about distutil-izing IDLE.  ;-)  Good demo of
packaging a real Python app, if nothing else.

> 2) If you are using two or more different python versions
>    on your computer, and you want to install a package
>    which contains C-compiled extensions, then you have 
>    to delete the build directory before you can install
>    the package with another version of python or you
>    use build with the '--force' option.
>    In any case you have to force distutils to rebuild 
>    all extensions because they were compiled using a wrong
>    version of python.

Hmmm, good point.  I'm always wary of over-differentiation leading to
unworkably long directory names, but I think this one is worthy.
However, I don't like the idea of having multiple top-level "build"
directories; I'd rather the sub-directories of "build" incorporated the
Python version along with the platform info that they already include.

This means there should probably be a function somewhere to take a plain
vanilla directory name and "differentiate" it -- eg. build/lib ->
build/lib-1.6 or build/temp -> build/temp.linux-i586-1.6.  Or something
like that.  Can you rework your patch to do this?  I think the commads
to hit are build_* and bdist_*.

        Greg
-- 
Greg Ward                                      gward@python.net
http://starship.python.net/~gward/