[Distutils] Installing scripts
Tim Peters
tim.one at comcast.net
Mon Jun 14 17:55:46 EDT 2004
[Fred L. Drake, Jr.]
> Did we reach any conclusions regarding script installation? I think
> there are still some issues.
Really <wink>?
> I *think* we agreed that stripping a .py extension for scripts on Unix is
> acceptable, but it's not clear that any Unix-oriented users other than
> myself were involved in the discussion.
There were two others. One was a True Believer in extensionless scripts on
Unix, the other liked extensions on Unix scripts (but seemingly not so
intently as the former hated them).
> I don't think we can simply rip off .py extensions on Unix, since that
> changes the set of installed names for packages that support older
> versions of Python/distutils;
Have to agree that visible changes are visible.
> there probably needs to be some explicit gesture that this is desired in
> the call to distutils.core.setup() (or maybe just in setup.cfg).
>
> I asked about silently not installing .pyw scripts on Unix, but I've not
> seen any responses on that issue.
I responded: -1. You can't guess whether a .pyw script will work on Unix
from its extension alone. If, e.g., it's a script that brings up a Tk UI,
then it should work fine on Unix, but giving it a .pyw extension is the only
way to prevent it from opening a useless new DOS box too on Windows. Unix
still doesn't need the extension, while Windows still does.
Should, e.g., a .sh script be installed on Windows? It can't work, but it
may still be good "documentation" for multilingual developers. Should a
.bat script be installed on Unix? .pl? There's no end to this.
> I'd like to have a better idea of how much agreement there might be
> before starting to work on a patch.
There's near-unanimous agreement that scripts should have appropriate
extensions on Windows. I noted that I'd be -1 on a scheme that attempted to
do so by having distutils guess at appropriate extensions (so strip
extensions that are already there, or specify appropriate extensions
explicitly).
I don't think anyone so far would object to an explicitly-triggered scheme
to strip script extensions on Unix, although some people may be unhappy with
distributions that choose to use it. I think it should strip all script
extensions (.py, .pyw, .pl, .sh, .tcl -- all extensions period).
More information about the Distutils-SIG
mailing list