[SciPy-dev] issues with scipy and eggs
Andrew Straw
strawman at astraw.com
Mon Dec 12 17:04:28 EST 2005
Ravikiran Rajagopal wrote:
>On Monday 12 December 2005 15:53, Fernando Perez wrote:
>
>
>>Robert Kern wrote:
>>
>>
>>>Well, there's the problem with the __init__.py's from full scipy
>>>overwriting scipy_core's during a regular install. As Andrew suggested,
>>>we can simply have synced copies in both packages. To do that *right*, we
>>>need some SVN magic (svn:external?).
>>>
>>>
>>Mmh, I hadn't noticed this because I've been building from source so far.
>> Is this going to be problematic for package managers? From what I've
>>seen, rpm does not like packages which overwrite files in other packages
>>(though there may be directives to tweak that), I don't know what apt-get
>>does in this case.
>>
>>
>
>
>
I agree that the issue of package managers not wanting to overwrite
files seems a serious and understandable one, and I agree this is best
avoided. Hopefully we can find an alternative.
>Cheapo solution: the proverbial extra level of indirection. Make __init__.py
>only in scipy_core which checks for existence of scipy_full_init.py at run
>time and sources it if necessary. As I understand it, we need scipy_core to
>install scipy_full; so we can remove __init__.py from scipy_full.
>
>
Unfortunately, I don't think this is a solution -- I think it's
essentially what we have now. Basically, we have two conflicting cases:
1) A non-setuptools install where site-packages/scipy/__init__.py is
installed by scipy_core but is smart enough to figure out full scipy is
installed
2) A setuptools install where site-packages/scipy_core.egg and scipy.egg
exist and both need a scipy/__init__.py file to tell pkg_resources to
keep looking for the other scipy package.
I don't know enough about the setuptools innards to know if approach 2
is the only way to go. (Heck, I was just blindly following Robert's lead
to get as far as I did in this...) Robert (or anyone): what if we used
"declare_namespace" in full scipy's setup() call -- would that perform
the necessary setuptools magic without needing an __init__.py file that
would overwrite scipy_core's?
Perhaps a question to the distutils list (the de facto setuptools list)
will help resolve the issue. Perhaps the issue is even worth a feature
request in setuptools if one is needed to support our use cases.
More information about the SciPy-Dev
mailing list