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

Chris Colbert sccolbert at gmail.com
Sat Apr 3 10:17:25 EDT 2010


On Sat, Apr 3, 2010 at 12:17 AM, <josef.pktd at gmail.com> wrote:
>
> On Fri, Apr 2, 2010 at 11:45 PM, Chris Colbert <sccolbert at gmail.com> wrote:
> >
> >
> > On Fri, Apr 2, 2010 at 3:03 PM, Erik Tollerud <erik.tollerud at gmail.com>
> > 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
>
> Personally, I don't like it at all if packages automatically
> easy_install big dependencies like numpy especially if it is connected
> to a version requirement.
>
> Is it possible to kill an installation subprocess with CRTL-C ?

Hmm, that's a good question. Just thinking about it, I don't think it
would. From the docs:

Popen.kill()
Kills the child. On Posix OSs the function sends SIGKILL to the child.
On Windows kill() is an alias for terminate().

But, I listed the check_call() function, which waits for the
subprocess to end. You never actually get the handle to the subprocess
object to issue the kill() command. So, I'm not sure how you could
make it work.

>
> Josef
>
> >
> >
> >
> > _______________________________________________
> > NumPy-Discussion mailing list
> > NumPy-Discussion at scipy.org
> > http://mail.scipy.org/mailman/listinfo/numpy-discussion
> >
> >
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion



More information about the NumPy-Discussion mailing list