[Python-Dev] Added platform-specific directories to sys.path

Michael Hudson mwh@python.net
22 Jul 2002 13:56:33 +0100


Jack Jansen <Jack.Jansen@cwi.nl> writes:

> On Monday, July 22, 2002, at 12:03 , Michael Hudson wrote:
> > I don't see what's so very difficult about
> >
> > $ python setup.py install --prefix=$HOME
> 
> This is what you use if you have built Python yourself, and installed it 
> in your home directory.

In that case, the --prefix arg is unnecessary.

> What I was referring to (as the setup that isn't very well supported 
> right now) is the situation where the system admin has built and 
> installed Python in, say, /usr/local, and you want to install a 
> distutils-based packaged for your own private use.

That's when I do the above.

> Setting PYTHONPATH to be $HOME/lib/python-extensions or something 
> similar is what people customarily do to get access to their private 
> modules, but there is no standard, and hence also no way for distutils 
> to find the pathname and provide an easy interface to do this.

My setup requires setting $PYTHONPATH too, so it's not ideal, but it
works.

Cheers,
M.

-- 
  Reading Slashdot can [...] often be worse than useless, especially
  to young and budding programmers: it can give you exactly the wrong
  idea about the technical issues it raises.
 -- http://www.cs.washington.edu/homes/klee/misc/slashdot.html#reasons