[Python-Dev] Distutils2 scripts

Michael Foord fuzzyman at voidspace.org.uk
Fri Oct 22 18:53:22 CEST 2010


  On 22/10/2010 08:20, Paul Moore wrote:
> On 22 October 2010 04:31, Ron Adam<rrr at ronadam.com>  wrote:
>> When it's in the stdlib, the -m option should work just like any other
>> script run from the stdlib.
>>
>> What path hacking are you thinking of?
> On Windows, neither the "python" executable nor scripts in
> C:\Pythonxx\Scripts are in the PATH by default. On the other hand, .py
> files will run automatically via the registered file extension.
>
> Manipulating PATH at install time (to add C:\PythonXX and/or
> C:\PythonXX\Scripts) is not done - it is (rightly, in my view)
> considered too difficult to get right, particularly when it comes to
> uninstalling.
>
> Many Windows users will, I guess, manually add python to PATH (so that
> python-m works). Some people also add C:\PythonXX\Scripts. Personally,
> I don't - so for me a pysetup script in that location would be no use.
>

Well, that is where pip and other scripts installed by Python go, so it 
is the 'right' place for scripts to live.

Any reason not to allow both though? (python -m and an explicit script)

For what its worth I have the same issue with unittest / unittest2. Test 
discovery and test running in Python 2.7 / 3.2 is done with:

python -m unittest args

As unittest2 is a package and supports Python 2.6 (and earlier), python 
-m unittest2 doesn't work so I provide a "unit2" script for accessing 
its functionality. I *much* prefer using "unit2 ..." to "python -m 
unittest ...".

Michael

> So my personal vote is +1 for a python -m approach, and -0 for a
> pysetup executable. I'm -1 on a pysetup.bat batch file - bat files
> have other issues which IMO make them effectively useless.
>
> Paul.
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk


-- 

http://www.voidspace.org.uk/

READ CAREFULLY. By accepting and reading this email you agree,
on behalf of your employer, to release me from all obligations
and waivers arising from any and all NON-NEGOTIATED agreements,
licenses, terms-of-service, shrinkwrap, clickwrap, browsewrap,
confidentiality, non-disclosure, non-compete and acceptable use
policies (”BOGUS AGREEMENTS”) that I have entered into with your
employer, its partners, licensors, agents and assigns, in
perpetuity, without prejudice to my ongoing rights and privileges.
You further represent that you have the authority to release me
from any BOGUS AGREEMENTS on behalf of your employer.



More information about the Python-Dev mailing list