[issue14027] distutils2 lack of pysetup.bat
Paul Moore
report at bugs.python.org
Sat Feb 18 11:00:03 CET 2012
Paul Moore <p.f.moore at gmail.com> added the comment:
> - Will “@%~dp0\..\python.exe” get the proper path for people who do not install Python to C:\?
%~dp0\..\python.exe locates python relative to the batch file (one
directory up) so will work as long as the bat file is in Scripts. The
@ just suppresses echo of the command.
> - Aren’t there issues with .bat scripts (or maybe it’s with .com scripts, I never remember)?
Yes. They don't nest, so to invoke pysetup in a batch file, you need
to write "call pysetup.bat". If you just use "pysetup", the command
never returns causing silent failures. Personally, I hate bat files
for this reason alone, but others seem happy to put up with them.
> - Shouldn’t we install a pysetup.py script instead?
That would be better, in my view.
> - Shouldn’t we generate an .exe file instead (see #12394)?
exe files probably give the best user experience, but are opaque which
is mildly annoying. Also, test very carefully on Win7. I have a vague
recollection that exes with setup and/or install in the names invoke
UAC, which is a complete pain. easy_install suffers from this, I
believe.
> In other words, I need more info from Windows experts about what works best for Python developers :)
Personally, "python -m packaging.run" works fine for me. I'd prefer
not to have a pysetup command at all, and change the documentation to
refer to the python -m form throughout. Second best would be an exe,
third would be pysetup.py (but again, the docs need changing), and
finally a bat file.
Another option would be a runnable pysetup module, so that python -m
pysetup (or maybe an install.py so python -m install) would work.
Paul.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14027>
_______________________________________
More information about the Python-bugs-list
mailing list