[med-svn] [hyphy] 05/05: Add Python packages (but needs more work since the packages are empty)

Andreas Tille tille at debian.org
Thu Jul 9 16:08:15 UTC 2015


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

tille pushed a commit to branch master
in repository hyphy.

commit 284f8a142df5d704e21c90a98383c7090b4b4cd0
Author: Andreas Tille <tille at debian.org>
Date:   Thu Jul 9 18:07:35 2015 +0200

    Add Python packages (but needs more work since the packages are empty)
---
 debian/rules | 34 ++++++++++++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

diff --git a/debian/rules b/debian/rules
index 784b67c..02dfb22 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,19 +2,49 @@
 
 # DH_VERBOSE := 1
 
+export PYBUILD_NAME=$(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
+PYVERS = $(shell pyversions -r)
+PY3VERS = $(shell py3versions -r)
+
 %:
 	dh $@ --buildsystem=cmake --with python2,python3
 
+override_dh_auto_clean:
+	dh_auto_clean
+	cd src/lib ; \
+	for py in $(PYVERS) $(PY3VERS); do \
+		$${py} -B setup.py clean -a; \
+	done
+
 override_dh_auto_configure:
 	dh_auto_configure -- -DINSTALL_PREFIX=/usr
 
 override_dh_auto_build:
-	dh_auto_build -- HYPHYGTK MPI GTEST
-	# LIB no idea about the purpose of the dynamic library - executables are not simply linked against it
+	# no idea about the purpose of the dynamic library - executables are not simply linked against it
+	dh_auto_build -- HYPHYGTK MPI GTEST LIB
+	# create Python modules
+	cd src/lib ; \
+	for py in $(PYVERS) $(PY3VERS); do \
+		$${py} -B setup.py build; \
+	done
+	# Build R module - unfortunately this script is broken
+	# cd src/lib ; bash build.sh LIBRARY R
 
 override_dh_auto_test:
 	./obj-$(DEB_TARGET_GNU_TYPE)/HYPHYGTEST
 
+override_dh_auto_install:
+	dh_auto_install
+	cd src/lib ; \
+	for py in $(PYVERS); do \
+		$$py -B setup.py install --skip-build --root debian/python-$(PYBUILD_NAME) \
+				      --install-layout deb; \
+	done ; \
+	for py in $(PY3VERS); do \
+		$$py -B setup.py install --skip-build --root debian/python-$(PYBUILD_NAME) \
+				      --install-layout deb; \
+	done
+
 override_dh_install:
 	# smallcaps for executables
 	for bindir in `find . -type d -name bin` ; do \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/hyphy.git



More information about the debian-med-commit mailing list