[Python-Dev] Remove site-packages?!? [was: [Distutils] PEP 376 - from pythonpkgmgr's point of view]

David Lyon david.lyon at preisshare.net
Mon Jul 20 01:13:30 CEST 2009


On Sun, 19 Jul 2009 17:15:44 +0200, Tarek Ziadé <ziade.tarek at gmail.com>
wrote:
> What made me say that, is the unecessary complexity of the situation
> because we have right now :
>
> ..
> 
> So if you remove the global site-packages, "Python the application"
> dissapear in favor of "Python the interpreter",
> and people have to point a local, non-shared drop-it-in directory to
> run any python application that uses extra modules:
> 
> 1- For Jim's case, the per-user site packages (PEP 370) can be used
> 2- For every application it can be a local directory loaded in
> sys.path at startup
> 3- For OS packagers a single directory where they maintain a
> collection of packages and modules for their system.
> 
> But unfortunately, the problem remains because of (3) : OS packagers
> will fight against applications (2) that deal with their own
> dependencies to avoid having duplicate packages in their system.

Well now I completely understand the jist of what you are saying..

And I completely agree with the direction of your comments.

This problem is being solved within the pythonpkgmgr project.

As we are allowing a distinction between operating system
packages and developer packages.

I only have ubuntu, and not OS-X at the moment, but let me
explain with that.

The operating system can install packages into /usr/lib/pythonX.X/
site-packages.

The develeloper can install packages into /usr/local/pythonX.x/
site-packages.

Therefore providing two seperate areas for packages to reside
and eliminating the chance for serious conflict.

The main problem imho has been that easy_install by default
has installed to /usr/lib/pythonX.X/site-packages when in
fact that really is an operating system controlled directory.

So naughty naughty to setuptools....

That's why in pythonpkgmgr, we're moving to an entirely
different place where there is no chance of conflict with
the os package manager and python packages can be installed
without su privelages.

If the user wishes to install o/s packages that's fine 
and if they wish to install developer packages that's fine too.

The saving grace here is the gui that remembers the appropriate
command line switches that are needed to direct this behaviour
because it doesn't happen by default in easy_install.

Under ubuntu, it seems to be /usr/local/pythonX.X/site-packages
and I am checking other posix operating systems and trying to
work out what the equivilents might be.

When I have it working.. I will let you know..

I'm just trying to work out how to get the permissions going
correctly.

David



More information about the Python-Dev mailing list