[Distutils] Installing scripts
Tim Peters
tim.one at comcast.net
Thu Jun 10 18:20:20 EDT 2004
[Fred L. Drake, Jr.]
...
> We just need to make sure the .py is there on Windows and not on
> installed scripts on Unix.
I have to ask: is this "a Fred thing", or common Linux fashion? Back in my
Unix days, I always left the .py extension on my Python scripts, probably
because I'm not Barry (i.e., I refused to stuff emacs turds inside my files,
and my emacs auto-mode trigger was something like *\.py$).
> This brings up a related question: If a distribution provides scripts
> that end with .pyw, should they be omitted from the builld/installation
> on non-Windows platforms (possibly with a warning to the user)?
I'm afraid it depends on what the script does. If it has a #! line, the
Linux shells don't care what the suffix is, right? Python doesn't recognize
.pyw on non-Windows systems, but the extension isn't needed on those either.
So a .pyw may well work fine x-platform.
> Do we want a way to tell distutils about platform-specific scripts so
> they don't get installed on platforms to which they don't apply?
I think so, because it can't *guess* this correctly. OTOH, it also seems
reasonable to me to say that if you're going to do such a thing, you should
code the conditional logic in the Python code surrounding distutils calls.
You're just trying to keep the logic out of zpkg <wink>.
More information about the Distutils-SIG
mailing list