[SciPy-dev] issues with installing Numeric in a user directory

Perry Greenfield perry at stsci.edu
Thu Dec 19 22:41:30 CST 2002


 
> Yes.  It is a hack IMHO also.  It trades environment variable changes to
> site.py changes -- I'd rather require neither.  Still, I'd like to see
> what you've done.  Can you send me that file? 

I'll try to do that tomorrow. By the way, I'm not talking about
site.py. The file sitecustomize.py can be anywhere in your path
if I remember correctly, and does not require changing site.py.
The primary reason we use this is so that we can support running
multiple versions of Python without messing with a user's
pythonpath. The script checks to see which version of python you
are running, and then dynamically adds the appropriate directories
to the path (since different versions often require different 
extension modules). We put 2.0, 2.1, 2.2, 2.2.2 directories for
our modules in one directory and the parent directory is what users
must put in their path. A sitecustomize.py in that directory does
the rest (Along with .pth files). Since we don't have 
privileges for the site-packages directory, we wanted to have a
directory tree we had control over, but where we didn't burden
the user having to deal with version and multple paths to add for
each of the modules we had.

> > 
> > > I haven't figured out a nice work around here, other than actually
> > > making Numeric a real package which I doubt is even close to an
> option.
> > > Does anyone else have a better solution?
> > >

> > 
> > Of course this change impacts current code since the imports would
> > have to be changed (generally not a hard code change, but a annoyance
> > nonetheless). Adding the subdirectories to the path would make it
> > work for old code (wouldn't it?). If we are going to change it,
> > now's the time to consider it.
> 
> I think now is the time to change it. 
> 
> eric
> 
Let me raise the issue on the numpy list also, but it sure seems
like the right thing to do.

Perry
> 




More information about the Scipy-dev mailing list