Re: [Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-05 Thread T J
On Mon, Apr 5, 2010 at 11:28 AM, Robert Kern wrote: > On Mon, Apr 5, 2010 at 13:26, Erik Tollerud wrote: >> Hmm, unfortunate.  So the best approach then is probably just to tell >> people to install numpy first, then my package? > > Yup. > And really, this isn't that unreasonable. Not only does

Re: [Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-05 Thread Robert Kern
On Mon, Apr 5, 2010 at 13:26, Erik Tollerud wrote: > Hmm, unfortunate.  So the best approach then is probably just to tell > people to install numpy first, then my package? Yup. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by

Re: [Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-05 Thread Erik Tollerud
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 wrote: > On Fri, Apr 2, 2010 at 13:03, Erik Tollerud wrote: >> I am writing a setup.py file for a package that will use cython with >

Re: [Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-03 Thread Chris Colbert
On Sat, Apr 3, 2010 at 12:17 AM, wrote: > > On Fri, Apr 2, 2010 at 11:45 PM, Chris Colbert wrote: > > > > > > On Fri, Apr 2, 2010 at 3:03 PM, Erik Tollerud > > wrote: > > you could try something like this (untested): > > if __name__ == '__main__': > >     try: > >         import numpy > >     ex

Re: [Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-02 Thread josef . pktd
On Fri, Apr 2, 2010 at 11:45 PM, Chris Colbert wrote: > > > On Fri, Apr 2, 2010 at 3:03 PM, Erik Tollerud > wrote: > you could try something like this (untested): > if __name__ == '__main__': >     try: >         import numpy >     except ImportError: >         import subprocess >         subproc

Re: [Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-02 Thread Chris Colbert
On Fri, Apr 2, 2010 at 3:03 PM, Erik Tollerud wrote: you could try something like this (untested): if __name__ == '__main__': try: import numpy except ImportError: import subprocess subprocess.check_call(['easy_install', 'numpy']) # will except if call fails _

Re: [Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-02 Thread Robert Kern
On Fri, Apr 2, 2010 at 13:03, Erik Tollerud 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

[Numpy-discussion] How do I ensure numpy headers are present in setup.py?

2010-04-02 Thread Erik Tollerud
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 packag