[Python-ideas] Making -m work for scripts

Nick Coghlan ncoghlan at gmail.com
Fri Jun 12 09:13:21 CEST 2015


On 12 June 2015 at 06:31, Andrew Barnert via Python-ideas
<python-ideas at python.org> wrote:
> But if we're going to do something big, I'd prefer to just make it easier to specify a custom script suffix in distutils.cfg and encourage distros/users/third-party Pythons/etc. to use that if they want to make multiple Pythons easy to use, instead of using different directories. Then you'd just run `nosetests_pypy3` vs. `nosetests3` or `nosetests_jy2` vs. `nosetests2` or `nosetests_cust3.4` vs. `nosetests3.4` or whatever. (Mainly because that's what I do manually; I have a wrapper around pip that symlinks any installed scripts into /usr/local/bin with a suffix that depends on the wrapper's name, and symlink a new name for each Python I install. I'm not sure if anyone else would like that.)

Armin Ronacher's pipsi should already make it possible to do:

    pypy -m pip install pipsi
    pypy -m pipsi install nose

In theory, that should give you a nosetests in ~/.local/bin that runs
in a PyPy virtualenv (I haven't actually tried it though).

"Should the default Python on Linux be a per-user configuration
setting rather than a system wide symlink?" was also a topic that came
up at this year's language summit (see
https://lwn.net/Articles/640296/, especially the straw poll results at
the end ), so it's likely a proposal along those lines will happen at
some point during the 3.6 development cycle.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-ideas mailing list