[Python-modules-team] building python-numpy on

Faheem Mitha faheem at faheem.info
Thu Oct 6 11:57:10 UTC 2011



On Thu, 6 Oct 2011, Faheem Mitha wrote:

> On Thu, 6 Oct 2011, Sandro Tosi wrote:
>
>> On Thu, Oct 6, 2011 at 08:40, Faheem Mitha <faheem at faheem.info> wrote:
>>> Ran 3541 tests in 44.650s
>>> 
>>> OK (KNOWNFAIL=3, SKIP=4)
>>> [255665 refs]
>>> Traceback (most recent call last):
>>>  File "<string>", line 1, in <module>
>>>  File "numpy/__init__.py", line 127, in <module>
>>>    raise ImportError(msg)
>>> ImportError: Error importing numpy: you should not try to import numpy 
>>> from
>>>        its source directory; please exit the numpy source tree, and 
>>> relaunch
>>>        your python intepreter from there.
>> 
>> you have to fix the tests "trick" to avoid importing numpy from . but
>> from the installed location. Or disable test completely.
>
> Hi Sandro,
>
> Yes, I see that the lines
>
> ifeq (,$(findstring notest,$(DEB_BUILD_OPTIONS)))
>        -for v in $(PYVERS) ; do \
>                python$$v -c "import sys ; sys.path.insert(0, 
> '$(CURDIR)/debian/tmp/usr/lib/python$$v/dist-packages/') ; import numpy; 
> numpy.test()" ; \
>                python$$v-dbg -c "import sys ; sys.path.insert(0, 
> '$(CURDIR)/debian/tmp/usr/lib/python$$v/dist-packages/') ; import numpy; 
> numpy.test()" ; \
>        done
> endif
>
> are failing. Is that the problem?

It doesn't look like the tests are the problem. If I comment them out, I 
still get a failure at the same place.

##########################################################################

running install_egg_info
Removing 
/usr/local/src/numpy/python-numpy-1.6.1/debian/tmp/usr/lib/python2.6/dist-packages/numpy-1.6.1.egg-info
Writing 
/usr/local/src/numpy/python-numpy-1.6.1/debian/tmp/usr/lib/python2.6/dist-packages/numpy-1.6.1.egg-info
running install_clib
copying build/temp.linux-i686-2.6/libnpymath.a -> 
/usr/local/src/numpy/python-numpy-1.6.1/debian/tmp/usr/lib/python2.6/dist-packages/numpy/core/lib
# yes, we need to run tests after install
# The reason is that numpy tries hard to not let you run it from the
# source directory, so we need to mess with the import order so to
# select the code in the installation path
make[1]: Leaving directory `/usr/local/src/numpy/python-numpy-1.6.1'
    debian/rules override_dh_install
make[1]: Entering directory `/usr/local/src/numpy/python-numpy-1.6.1'
# add shebang information to f2py script
for v in 2.6 2.5; do \
                 sed -i "1s,#!.*python[^ ]*\(.*\),#!/usr/bin/python$v," 
debian/tmp/usr/bin/f2py$v; \
                 cp -a debian/tmp/usr/bin/f2py$v 
debian/tmp/usr/bin/f2py$v-dbg ; \
                 sed -i "1s,#!.*python[^ ]*\(.*\),#!/usr/bin/python$v-dbg," 
debian/tmp/usr/bin/f2py$v-dbg; \
         done
# install unversioned f2py script
dh_link usr/bin/f2py2.6 usr/bin/f2py
dh_link -ppython-numpy-dbg usr/bin/f2py2.6-dbg usr/bin/f2py-dbg
# moving those scripts away until after pysupport has run, to not
# generate depends on pythonx.y
mkdir debian/tmp2
mv debian/tmp/usr/bin/* debian/tmp2
dh_install
cp: cannot stat `debian/tmp/doc/build/html': No such file or directory
dh_install: cp -a debian/tmp/doc/build/html 
debian/python-numpy-doc//usr/share/doc/python-numpy-doc// returned exit 
code 1
make[1]: *** [override_dh_install] Error 2
make[1]: Leaving directory `/usr/local/src/numpy/python-numpy-1.6.1'
make: *** [binary] Error 2
debuild: fatal error at line 1307:
couldn't exec fakeroot debian/rules: Bad file descriptor


More information about the Python-modules-team mailing list