[adios] 145/207: WIP: Fix changes for python build

Alastair McKinstry mckinstry at moszumanska.debian.org
Fri Jun 12 06:04:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

mckinstry pushed a commit to branch master
in repository adios.

commit e700636e8119d2dd1ede57e7b69e498b4a8b3f28
Author: Alastair McKinstry <mckinstry at debian.org>
Date:   Mon Jun 16 09:25:58 2014 +0100

    WIP: Fix changes for python build
---
 debian/rules | 34 ++++++----------------------------
 1 file changed, 6 insertions(+), 28 deletions(-)

diff --git a/debian/rules b/debian/rules
index 8ac1e6d..13debce 100755
--- a/debian/rules
+++ b/debian/rules
@@ -74,28 +74,6 @@ override_dh_auto_configure:
 	dh_auto_configure --  $(WITH_LUSTRE) $(WITH_IBVERBS) --enable-shared \
 		--with-hdf5=/usr --with-bzip2=/usr  --with-zlib=/usr --prefix=$(DESTDIR) MPIFC=mpif77 CC=$(CC) CFLAGS='-fPIC'
 	# Prep python wrapper. Cache these for cmake otherwise it will get 2.7, 3.* confused
-	mkdir -p wrappers/numpy/build_${PY2}
-	echo "PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python" > wrappers/numpy/build_${PY2}/CMakeCache.txt
-	echo "PYTHON_INCLUDE_DIR:PATH=/usr/include/${PY2}" >> wrappers/numpy/build_${PY2}/CMakeCache.txt
-	echo "PYTHON_INCLUDE_DIR2:PATH=/usr/include/${DEB_HOST_MULTIARCH}/${PY2}" >> wrappers/numpy/build_${PY2}/CMakeCache.txt
-	echo "PYTHON_LIBRARY:FILEPATH=/usr/lib/${DEB_HOST_MULTIARCH}/lib${PY2}.so" >> wrappers/numpy/build_${PY2}/CMakeCache.txt
-	echo "CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/${CXX}" >> wrappers/numpy/build_${PY2}/CMakeCache.txt
-	echo "PYTHON_MPI4PY_INCLUDE_DIR=/usr/lib/${PY2}/dist-packages/mpi4py/include/mpi4py" >> wrappers/numpy/build_${PY2}/CMakeCache.txt ;\
-	echo "ADIOS_COMPILE_FLAGS:STRING=-fPIC " >> wrappers/numpy/build_${PY2}/CMakeCache.txt
-	echo "wrappers/numpy/build_${PY2}/adios.so	/usr/lib/${PY2}/dist-packages" > debian/python-adios.install
-	# And repeat for python3*
-	for p in ${PY3VERS} ; do \
-	mkdir -p wrappers/numpy/build_$${p} ; \
-		echo "PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python" > wrappers/numpy/build_$${p}/CMakeCache.txt ;\
-		echo "PYTHON_INCLUDE_DIR:PATH=/usr/include/$${p}" >> wrappers/numpy/build_$${p}/CMakeCache.txt ;\
-		echo "PYTHON_INCLUDE_DIR2:PATH=/usr/include/${DEB_HOST_MULTIARCH}/$${p}" >> wrappers/numpy/build_$${p}/CMakeCache.txt ;\
-		echo "PYTHON_LIBRARY:FILEPATH=/usr/lib/${DEB_HOST_MULTIARCH}/lib$${p}m.so" >> wrappers/numpy/build_$${p}/CMakeCache.txt ;\
-		echo "CMAKE_CXX_COMPILER:FILEPATH=/usr/bin/${CXX}" >> wrappers/numpy/build_$${p}/CMakeCache.txt ;\
-		echo "ADIOS_COMPILE_FLAGS:STRING=-fPIC " >> wrappers/numpy/build_$${p}/CMakeCache.txt ;\
-		echo "PYTHON_MPI4PY_INCLUDE_DIR=/usr/lib/python3/dist-packages/mpi4py/include/mpi4py" >> wrappers/numpy/build_$${p}/CMakeCache.txt ;\
-		echo "wrappers/numpy/build_$$p/*.so	/usr/lib/python3/dist-packages" >> debian/python3-adios.install ; \
-	done
-		
 
 override_dh_auto_build:
 	# First do a build shared, with -fPIC, for the python lib.
@@ -104,13 +82,13 @@ override_dh_auto_build:
 	mv debian/tmp/lib/*/*.a debian/tmp/lib
 	# Now build Python wrapper. Uses adios_config and the debian/tmp install.
 	for p in ${PY2} ${PY3VERS} ; do \
-		( cd wrappers/numpy/build_$${p} && PATH=$(TOP):$(PATH) cmake .. && $(MAKE) VERBOSE=1 ) ; done
-	for p in $(PY3VERS); do \
-		v=`echo $$p | cut -c7,9` ;\
-		mv wrappers/numpy/build_$${p}/adios.so wrappers/numpy/build_$${p}/adios.cpython-$${v}m-${DEB_HOST_MULTARCH}.so ;\
-	done
+		( cd wrappers/numpy && PATH=$(TOP):$(PATH) $$p ./setup.py install --prefix=$(TOP)/debian/tmp ) ; done
+	# for p in $(PY3VERS); do \
+#		v=`echo $$p | cut -c7,9` ;\
+#		mv wrappers/numpy/build_$${p}/adios.so wrappers/numpy/build_$${p}/adios.cpython-$${v}m-${DEB_HOST_MULTARCH}.so ;\
+#	done
 	# Clean up.
-	rm -r debian/tmp/*
+#	rm -r debian/tmp/*
 	# Now do the static build we want.
 	dh_auto_build
 	

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/adios.git



More information about the debian-science-commits mailing list