tags 590770 + patch
thanks
Hello!
While trying to rebuild the package, I encountered an error:
[ 85%] Building C object
bindings/python/CMakeFiles/_plplotcmodule.dir/plplotcmodulePYTHON_wrap.c.o
In file included from /usr/include/numpy/ndarrayobject.h:18,
from /usr/include/numpy/arrayobject.h:14,
from
/tmp/buildd/plplot-5.9.5/debian/build_tmp/bindings/python/plplotcmodulePYTHON_wrap.c:2710:
/usr/include/numpy/numpyconfig.h:4:26: error: _numpyconfig.h: No such file or
directory
In file included from /usr/include/numpy/ndarrayobject.h:68,
from /usr/include/numpy/arrayobject.h:14,
from
/tmp/buildd/plplot-5.9.5/debian/build_tmp/bindings/python/plplotcmodulePYTHON_wrap.c:2710:
/usr/include/numpy/npy_common.h:840: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'npy_timedelta'
/usr/include/numpy/npy_common.h:841: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'npy_datetime'
In file included from /usr/include/numpy/ndarrayobject.h:1238,
from /usr/include/numpy/arrayobject.h:14,
from
/tmp/buildd/plplot-5.9.5/debian/build_tmp/bindings/python/plplotcmodulePYTHON_wrap.c:2710:
… (and loads more like this).
Upon verifying the cause, this is because the _numpyconfig.h file is
installed into the
/usr/lib/pyshared/python<version>/numpy/core/include/numpy/
directory. So, I added this directory to the include path when the
modules were being built. Following this, I added a call to dh_numpy
after the pycentral call. This, indeed, seems to generate sane
dependencies for plplot.
Patch attached. HTH.
Thanks.
Kumar
diff -Nru --exclude changelog plplot-5.9.5/debian/rules plplot-5.9.5/debian/rules
--- plplot-5.9.5/debian/rules 2010-08-09 00:19:50.000000000 -0500
+++ plplot-5.9.5/debian/rules 2010-08-09 00:19:51.000000000 -0500
@@ -180,7 +180,7 @@
install-python%: build-arch-stamp
( cd $(BUILD_DIR) ; \
- cmake $(SRC_DIR) $(CONFIGURE_OPTIONS) -DENABLE_python=ON -DPYTHON_EXECUTABLE=/usr/bin/python$* -DPYTHON_LIBRARIES=/usr/lib/python$* -DPYTHON_LIBRARY=/usr/lib/python$*/config/libpython$*.so -DPYTHON_INCLUDE_PATH="/usr/include/python$*;/usr/include/numpy" -DNUMERIC_INCLUDE_PATH=/usr/include/numpy ; \
+ cmake $(SRC_DIR) $(CONFIGURE_OPTIONS) -DENABLE_python=ON -DPYTHON_EXECUTABLE=/usr/bin/python$* -DPYTHON_LIBRARIES=/usr/lib/python$* -DPYTHON_LIBRARY=/usr/lib/python$*/config/libpython$*.so -DPYTHON_INCLUDE_PATH="/usr/include/python$*;/usr/include/numpy;/usr/lib/pyshared/python$*/numpy/core/include/numpy" -DNUMERIC_INCLUDE_PATH="/usr/include/numpy;;/usr/lib/pyshared/python$*/numpy/core/include/numpy" ; \
for d in python ; do \
( cd bindings/$$d; \
$(MAKE) clean ; \
@@ -212,6 +212,7 @@
dh_installchangelogs --package=$(libpkg) --package=libcsiro0
dh_pycentral --package=python-plplot
+ dh_numpy
dh_strip -a
dh_compress -a -Xexamples/
dh_fixperms -a