[Numpy-discussion] "import numpy" is slow
Gael Varoquaux
gael.varoquaux at normalesup.org
Thu Jul 31 10:27:26 EDT 2008
On Thu, Jul 31, 2008 at 11:05:33PM +0900, David Cournapeau wrote:
> Gael Varoquaux wrote:
> > That's why distutils have a test target. You can do "python setup.py
> > test", and if you have setup you setup.py properly it should work
> > (obviously it is easy to make this statement, and harder to get the thing
> > working).
> I have already seen some discussion about distutils like this, if you
> mean something like this:
> http://blog.ianbicking.org/pythons-makefile.html
> but I would take with rake and make over this anytime. I just don't
> understand why something like rake does not exist in python, but well,
> let's not go there.
Well, actually, in the enthought tools suite we use setuptools for
packaging (I don't want to start a controversy, I am not advocating the
use of setuptools, just stating a fact) and nose for testing, and getting
"setup.py test" to wrok, including do the build test and download nose if
not there, is a matter of addig those two lines to the setup.py:
tests_require = [
'nose >= 0.10.3',
],
test_suite = 'nose.collector',
Obviously, the build part has to be well-tuned for the machinery to work,
but there is a lot of value here.
Gaël
More information about the NumPy-Discussion
mailing list