[Distutils] the build_scripts patch

Greg Ward gward@python.net
Mon, 22 May 2000 22:14:37 -0400


On 22 May 2000, Bastian Kleineidam said:
> - new command build_scripts: copy all scripts in build/scripts. If the
> first line of a script begins with "#!" and ends with "python",
> write the path to the current Python interpreter in this line.

A *possible* variation on this: if the line starts wuth #! and
*contains* "python", rewrite it.  Not really necessary since
command-line options to the Python interpreter are quite rare.  I think
your way will do just fine unless somebody howls.

> - bug fixed in dist.py: import sysconfig for win32 platforms.

Already fixed in CVS -- well, I'll probably ask you to "cvs up" and
resubmit the patch, as I've been doing some heavy lifting in dist.py
that will affect all of the commands (sigh).  IOW, you get to deal with
the conflict.  ;-)

> - new function Command.create_tree which calls util.create_tree.

Fine.

> - install_misc is now the base class for all install commands

I'd like to know why this is necessary -- please explain your rationale.
(I've only skimmed the patch, not read it closely.)

> - install_data now creates leading directories of the files you supply
> and copies the files in these directories.
> So for example pixmaps/open.xpm gets installed in
> <self.install_data>/pixmaps/open.xpm and not in 
> <self.install_data>/open.xpm
> 
> I think the last point is a convenient way to install data in
> different directories. Another way (like in automake) is to supply for
> each set of filenames a different directory in which the files are
> going to be installed, but I like my solution better.

Good that you brought this up, because I think I like the Automake way
better.  Your installation directories shouldn't be constrained by your
source directories, and it sounds like your scheme does that.  Granted
it's more convenient, and probably easier to implement, but I think I'd
opt for more flexibility here.  Other opinions?

        Greg
--
Greg Ward - Unix nerd                                   gward@python.net
http://starship.python.net/~gward/
Never put off till tomorrow what you can put off till the day after tomorrow.