Stefan Behnel wrote:
> Dag Sverre Seljebotn wrote:
>> The problem is that NumPy doesn't like
>> distutils.unixccompiler being imported already.
> 
> Could you elaborate on this a little? Which part of NumPy doesn't "like"
> the module being imported? Why isn't it enough to import NumPy first (and
> maybe do some stuff with it) and /then/ run the tests? To check if NumPy
> is installed (i.e. to see if you can run the test), you'll have to import
> it anyway.
> 

Actually, you are right -- this problem now disappear because numpy is 
imported before distutils (after implementing your previous proposal).

The point is the ordering of the imports:

Py> import numpy

is ok, however:

Py> import distutils.unixccompiler
Py> import numpy
Traceback (most recent call last):
    ...

Again, this is a bug in NumPy, but I like working around it and not 
requiring bleeding edge for our testcase to run (in fact it should be 
able to run in order to check how we do for older releases as well).

I have now commited the addition of your proposal to runtests.py, i.e. 
at the top it now says:

# Lists external modules, and a matcher matching tests
# which should be excluded if the module is not present.
EXT_DEP_MODULES = {
     'numpy' : re.compile('.*\.numpy_.*').match
}

It commited it right away to -devel as it is an isolated change (please 
remove it if it causes problems anywhere, I've tested it with Py2.3, 
Py2.5, Py2.6b1 and Py3.0b2 (latter two some beta version))

-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to