[SciPy-dev] Always including lapack_lite and blas_lite in sdist
Pearu Peterson
pearu at scipy.org
Sun Oct 2 12:42:12 CDT 2005
On Sun, 2 Oct 2005, Travis Oliphant wrote:
> Fernando Perez wrote:
>
>> Travis Oliphant wrote:
>>
>>> Eric Firing noticed a problem with the newcore setup.py script in that the
>>> blas_lite and lapack_lite files are missing. This is because, on my
>>> system, I used blas and so didn't compile those.
>>>
>>> I'm wondering how we can detect in the setup.py file that an sdist command
>>> has been issued and so include the blas_lite and lapack_lite files even if
>>> somebody has atlas installed.
>>>
>>> Does somebody know how to tell what command was run when we are inside a
>>> configuration?
>>
>>
>> In most cases, a test like
>>
>> if 'sdist' in sys.argv:
>> ...
>>
>> should work, I would think. Unless something is actively rewriting
>> sys.argv, even other scripts called by setup.py should see this. Or am I
>> missing something more subtle?
>>
> No, I think you got it. Somethings just escape me :-)
Using `sdist in sys.argv` works but not in general. scipy.distutils
supports a general solution that in addition to the above problem, it
can handle cases where configuration depends also on a platform (e.g.
creating distributions on different platfrom from where it will be used).
So, I wouldn't use `sdist in sys.argv` but methods provided by
scipy.distutils. For example, using depends keyword argument to
Configuration.add_extension method, or functions that can filter out
unnecessary sources, etc. If you have already used `sdist in sys.argv`,
that's ok, just I may replace this approach with another one.
Regards,
Pearu
More information about the Scipy-dev
mailing list