[Numpy-discussion] How do I ensure numpy headers are present in setup.py?
Mon Apr 5 13:26:39 CDT 2010
Hmm, unfortunate. So the best approach then is probably just to tell
people to install numpy first, then my package?
On Fri, Apr 2, 2010 at 12:06 PM, Robert Kern <email@example.com> wrote:
> On Fri, Apr 2, 2010 at 13:03, Erik Tollerud <firstname.lastname@example.org> wrote:
>> I am writing a setup.py file for a package that will use cython with
>> numpy integration. This of course requires the numpy header files,
>> which I am including by using numpy.get_includes in the setup.py file
>> below. The problem is for users that have not installed numpy before
>> installing this package. If they have setuptools installed, the
>> behavior I would want would be for numpy to be downloaded and then the
>> setup script should be able to get at the headers even if it doesn't
>> install numpy until after this package is installed. But that doesn't
>> work - I have to import numpy in the setup script, which fails if it
>> is not yet installed. So How can I get the behavior I want?
> You can't, not without some hacks to distutils. This is a basic
> problem with the way setuptools uses arguments to setup() to get the
> Robert Kern
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
> -- Umberto Eco
> NumPy-Discussion mailing list
More information about the NumPy-Discussion