[Distutils] Making a sane non-root egg installation environment
Phillip J. Eby
pje at telecommunity.com
Wed Oct 19 22:12:29 CEST 2005
At 03:03 PM 10/19/2005 -0400, Kevin Dangoor wrote:
>Hi,
>
>Is there any easy way to emulate the nice behavior we get with Mac OS
>X's ~/Library/Python/2.4/site-packages on other unix-like systems?
>
>Is it possible to use the hacks Bob suggests here:
>http://bob.pythonmac.org/archives/2005/02/06/using-pth-files-for-python-development/
>
>to just import site and addsitedir to add a similar directory under
>the user's home directory?
Yes. But note that you have to be root to do that! (See also the
instructions in EasyInstall.txt, under the --site-dirs option, which
explains the same idea.)
>After doing that, would it be as simple as pointing easy_install at
>that directory?
And adding the directory to --site-dirs, which by default reflects only the
standard Python .pth-supporting directories.
By the way, with 0.6a6 (currently in CVS), there's another option. If you
put the setuptools egg directly on PYTHONPATH, it will process .pth files
in all PYTHONPATH directories. I added this specifically to make more
"traditional" non-root installs easier. You still have to add the
directories to --site-dirs, however.
0.6a6 also includes a vastly trimmed-down version of Ian's non-root install
script, with fewer options and bells and whistles. You simply give it a
'--prefix', which defaults to '~', and it doesn't munge siteconfig or
distutils.cfg or any of that.
Please give 0.6a6 a whirl and let me know how it works for you, as I'd like
to be sure these changes (including the dependency resolution algorithm
change) work well for TurboGears. Right now your package is the biggest
source of fresh test subjects uncontaminated by prior knowledge of how this
stuff is supposed to work. :) But the flip side is that I want to make
sure nothing I do results in a huge breakage that causes a backlash against
the tool.
More information about the Distutils-SIG
mailing list