[Python-Dev] Remove site-packages?!? [was: [Distutils] PEP 376 - from pythonpkgmgr's point of view]
M.-A. Lemburg
mal at egenix.com
Thu Jul 23 10:34:30 CEST 2009
David Lyon wrote:
> On Wed, 22 Jul 2009 23:22:56 +0200, "M.-A. Lemburg" <mal at egenix.com> wrote:
>> Maybe I've misunderstood some important detail, but how will
>> their "change" help with anything other than making their
>> distribution a non-standard Python installation ?
>
> The Debian/ubuntu distribution isn't non-standard. If anything
> I'd prefer to suggest that it is in many ways "a standard"
It's not just Debian mangling their Python installation. Many
other Linux distros do the same.
Keeping up with all those changes has become so hard, that we have
chosen to always build our projects with private (regular)
Python installations on Linux and Macs.
Disk space is cheap and so is bandwidth. Compared to the hours
spent on resolving issues with system provided Python
installations, it's a no-brainer.
> Here's a sys.pth from a mac...
>
> ['',
> '/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip',
> '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6',
> '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin',
>
> '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac',
>
> '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages',
>
> '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk',
> '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old',
> '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload',
>
> '/Users/david/.local/lib/python2.6/site-packages',
> '/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages']
>
> You can see that there are many choices along sys.path for installing
> packages.
No, not really. The above is perfectly standard.
The directories on sys.path are setup by Python itself and make
sure that it can find the stdlib modules. Those entries are not
meant to be used as installation targets.
Python 2.6 has two standard places for installing packages:
1. In the stdlib site-packages/ subdir
2. In the user home dir's .local/lib/python2.6/site-packages dir
The second is a new feature in 2.6.
>> distutils allows for a great deal of flexibility. For some
>> reason, this does not appear to be known to a larger
>> audience.
>
> People forget command lines - that's why.
>
>> I can only recommend reading Greg's great write-up about the
>> end-user perspective of installing Python modules:
>>
>> http://docs.python.org/install/
>
> It's good documentation of course. Cheers to Greg but the
> old method is so tedious. That really is the hard way.
I think that's the main problem in all this... people
just keep on complaining regardless of what you give
them.
If people don't read documentation, are not willing
to at least spend a few minutes on considering what they
really want to do and then shout out loud when Python
doesn't do what they thought it should do (without telling
Python, of course), there's little hope.
> pythonpkgmgr offers a much easier solution by wrapping
> easy_install and/or pip. You just type in parts of the
> package name into a search box, click [search], a search
> of pypi is done, click [install] and your package is
> downloaded and installed.
>
> It's a much more modern way of doing package installation
> and requires absolutely no typing on a command line.
>
>> A little known fact is that distutils can easily be customized
>> using config files:
>>
>> http://docs.python.org/install/#distutils-configuration-files
>
> Perphaps.
>
> But it seems only for advanced users.. and I couldn't figure
> out on the face of it what advantage it would have.
You define once and for all where you want your
Python packages to install themselves when typing
"python setup.py install". After that's done, you can
forget about all this and move on to get some real
work done ;-)
--
Marc-Andre Lemburg
eGenix.com
Professional Python Services directly from the Source (#1, Jul 23 2009)
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try our new mxODBC.Connect Python Database Interface for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
http://www.egenix.com/company/contact/
More information about the Python-Dev
mailing list