[Numpy-discussion] Re: [SciPy-user] Where do I put site.cfg? What should it contain? Can I build w/o atlas?

Travis Oliphant oliphant at ee.byu.edu
Wed Feb 15 14:15:01 CST 2006


Robert Kern wrote:

>Travis Oliphant wrote:
>
>  
>
>>So, in particular, does this mean that it is read from (relative to the 
>>location of the main setup.py file)
>>
>>numpy/distutils/site.cfg ??
>>    
>>
>
>Yes. And in the case of scipy, it needs to be in the *installed* numpy/distutils
>directory.
>
>  
>
>>Yes, that is a bad place.   We need some suggestions as to where 
>>site.cfg should be read from.
>>    
>>
>
>Next to the setup.py that *invokes* numpy.distutils. AFAICT using os.getcwd() in
>system_info.py will give you this directory even if you start running the script
>from a different directory (e.g. "python ~/svn/scipy/setup.py install"). I can
>check this in if we agree that this is what we want.
>
>  
>
I've started this process already.  I think a useful search order is

1) next to current setup.py  --- os.getcwd() is probably better than 
what I did (backing up the frame until you can't go back anymore and 
getting the __file__ from that frame).  Incidentally, it looks like a 
site.cfg present there is already copied to numpy/distutils on install 
--- it's looks like its just not used for the numpy build itself.

2) in the compilers "HOME" directory --- not sure how to implement that.

3) in the system-wide directory (what is currently done --- except when 
you are installing numpy that means it has to be in 
numpy/distutils/site.cfg).

I created a get_site_cfg() function in system_info where this searching 
can be done.   Feel free to change it as appropriate. 

-Travis








More information about the Numpy-discussion mailing list