[Numpy-discussion] numarray 0.5 -> python setup.py build fails

Fernando Perez fperez at colorado.edu
Tue May 6 11:34:03 EDT 2003

Todd Miller wrote:

>>Here's a couple work arounds I use:
>>1) When trying to install to /usr/lib,  I first "su root".
>>2) When I don't like to or can't "su root",  I first install Python in 
>>my home directory using: "./configure --prefix=$HOME".  With a local 
>>Python, site-packages is also local and writeable by default.
>>That said, setup.py has some kludges in it that need to be eliminated 
>>or factored out.
> A third method,  a little less onerous than the first two, is:
> 3) mkdir $HOME/numarray;  python setup.py build --gencode 
> --local=$HOME/numarray
> This works OK even if you're using a Python which does not have a 
> writeable site-packages directory.

My apologies if I'm off-base, but I'm pretty sure that a properly written 
setup.py should not try to write anywhere but in the build/ subdirectory when 
invoked with the 'build' option.  It should only write in site-packages when 
called with 'install'.

I rely on this fact all the time, by first building packages and then calling 
'setup.py install' separately.  And I do this as a non-root user always.

I could be wrong, but if setup.py is trying to write at build (not install) 
time into /usr/lib/..., I think that should be considered a bug.



More information about the NumPy-Discussion mailing list