[Python-ideas] Changing the default install location, script versioning (Packages and PEP 370)

David Stanek dstanek at dstanek.com
Tue Jul 21 00:33:14 CEST 2009


On Mon, Jul 20, 2009 at 5:50 PM, Jesse Noller<jnoller at gmail.com> wrote:
> On Mon, Jul 20, 2009 at 5:38 PM, Paul Moore<p.f.moore at gmail.com> wrote:
>> 2009/7/20 Jesse Noller <jnoller at gmail.com>:
>>> So python -m "setuptools.commands.easy_install" <args> or python
>>> `which easy_install` is a-ok for people? I find it much easier to tell
>>> someone "run easy_install" or "run pylint" rather than either one of
>>> the previous examples.
>>
>> No, but "python -m easy_install" is fine. The fact that setuptools
>> doesn't provide a form designed for use with python -m doesn't mean
>> that there's a problem with the feature, just that setuptools wasn't
>> designed with it in mind.
>>
>> Paul.
>>
>
> I don't know if easy_install does or doesn't - I simply used it as an
> example. What I don't parse is that python -m <module> is somehow a
> replacement for ./script - the logic within a script can do a lot more
> than just firing off the __main__ of a module. Are we saying that
> "scripts are considered harmful" and recommend people only support -m
> for this?

I'm personally OK with saying that scripts are no longer directly
supported. That means that users will be forced to run scripts like:
  python -m mypackage.script -- --my-args

Is this accessible to new users and Windows users?

>
> There's over 7000 packages, applications and libraries in the
> cheeseshop right now. A fair number of them would run face first into
> the non-versioned binary problem. I guess distutils (in a future
> version) should just deprecate the scripts/entry points options
> entirely?

This is what scares me about using 'python -m'. I think you would have
to do this.

>
> I really don't think this is an edge case, or should be unsupported.
> Sure, the same problem exists outside of the .local directory - you
> run into this installing things into the default system-level
> site-packages and /usr/bin /usr/local/bin directories, but there's no
> real reason we can't make this work better in the context of .local

I currently have this issue all over the place. Every time I install
software on my Buildbot I have to remember to move the script  xyz to
xyz$PYVER. I'm running 4 different versions of Python and as you can
imagine this issues frustrates me.

-- 
David
blog: http://www.traceback.org
twitter: http://twitter.com/dstanek



More information about the Python-ideas mailing list