[issue14027] distutils2 lack of pysetup.bat
Éric Araujo mer...@netwok.org added the comment: [Paul] %~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. Okay, so a pysetup.bat script installed by pythonX.Y.exe will be put in that Python’s Scripts directory and will call that Python when invoked. Sounds good. - 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. Noted. (I’ve been reading old mailing list archives and found this sort of criticism in bat vs. com discussions.) - Shouldn’t we install a pysetup.py script instead? That would be better, in my view. Okay, I can do this for the short term. 勇刚.罗 (sorry if that does not read right, I seem to have font problems), would that satisfy you? - 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. Oh dear, what an horror story. I really wish we won’t have to rename pysetup, it’s the only generic and available name we could agree on. 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. Thanks for the feedback. I don’t think we’re going to move away from a main script; we’re making packaging more useful and more robust, and having a script is IMO a message as well as a convenience. [Vinay] After that, I agree with Paul's ordering of .exe, with the setup script having to be named pysetup-script.py if we use the standard mechanism, or else if we use a custom .exe, it can of course be called whatever we want. I don’t understand the notions of standard vs. custom. Does standard mean setuptools? #12394 is not quite ready yet, so nothing is set in stone, but if possible I’d prefer to generate pysetup.exe. Let’s move the sub-discussion there. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14027 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14027] distutils2 lack of pysetup.bat
Paul Moore p.f.mo...@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 rep...@bugs.python.org http://bugs.python.org/issue14027 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14027] distutils2 lack of pysetup.bat
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Also, we normally set .py, and .pyw into the PATHEXT environment variable, so that a script pysetup.py can be invoked from the command-line as just pysetup without the suffix. This gives the same experience as using a pysetup.bat. I would say that pysetup seems a little more polished (and shorter) than the -m form, especially for users new to packaging. After that, I agree with Paul's ordering of .exe, with the setup script having to be named pysetup-script.py if we use the standard mechanism, or else if we use a custom .exe, it can of course be called whatever we want. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14027 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14027] distutils2 lack of pysetup.bat
Éric Araujo mer...@netwok.org added the comment: Hi, and thanks for your interest in improving distutils2. I am not a Windows user, much less developer, so I have many questions about your proposed pysetup.bat: - Will “@%~dp0\..\python.exe” get the proper path for people who do not install Python to C:\? - Aren’t there issues with .bat scripts (or maybe it’s with .com scripts, I never remember)? - Shouldn’t we install a pysetup.py script instead? - Shouldn’t we generate an .exe file instead (see #12394)? In other words, I need more info from Windows experts about what works best for Python developers :) -- nosy: +brian.curtin, pmoore, tim.golden, vinay.sajip versions: +3rd party -Python 2.6, Python 2.7, Python 3.1, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14027 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14027] distutils2 lack of pysetup.bat
New submission from 勇刚 罗 luoyongg...@gmail.com: Patch attaced. -- assignee: tarek components: Distutils2 files: pysetup.bat messages: 153460 nosy: alexis, eric.araujo, tarek, 勇刚.罗 priority: normal severity: normal status: open title: distutils2 lack of pysetup.bat versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file24528/pysetup.bat ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14027 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com