[Distutils] Installing scripts
Fred L. Drake, Jr.
fdrake at acm.org
Fri Jul 2 00:23:34 EDT 2004
On Thursday 01 July 2004 11:56 pm, Mark Hammond wrote:
> I was replying to your original '--strip-extensions' idea, so it would
> apply to whatever files you had in mind originally <wink>.
Ah; that was specific to scripts. So let's not muck with the plain text
files. ;-)
> It would seem more general to specify the full target name:
It's not clear how general we want it to be. We basically want platform
policy to decide; we want to provide hints.
> scripts=[
> Script('bin/dostuff.py', platforms="windows"),
> Script('bin/dostuff.py', target="bin/dostuff", platforms="posix"),
>
> This doesn't handle a "default" platform though (ie, what would OSX do
> given the above?) Maybe we need "exclude_platforms" and
> "include_platforms"?
Something like that; perhaps "platforms" and "except_platforms".
> It is a real shame that setup.py has no foolproof access to the options
> (such as the target platform) - then we could punt the problem right back
> into setup.py - have it provide a different script list, possibly with
> explicit target names, depending on the platform.
That's exactly what I *don't* want. I want to be doing nothing conditional in
the setup.py, since I really want to replace it all with metadata stored
somewhere else, and have a minimum of code needed to load that metadata and
pass it to distutils.core.setup().
> I'm wondering how close we are getting to YAGNI though.
We're not there yet, I don't think. Other than support for sbin directories,
I want all this for Zope 3. Support for installing scripts in $prefix/sbin
has been requested on the list, and there's an RFE on SourceForge. I don't
think it's unreasonable.
-Fred
--
Fred L. Drake, Jr. <fdrake at acm.org>
More information about the Distutils-SIG
mailing list