[Python-modules-commits] [python-tornado] 06/07: Build using pybuild

Mattia Rizzolo mattia at debian.org
Thu Apr 28 08:34:00 UTC 2016


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

mattia pushed a commit to branch master
in repository python-tornado.

commit 5d667542cf18cf0dc0547e652c3317372f1e55cd
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Thu Apr 28 08:19:29 2016 +0000

    Build using pybuild
---
 debian/python-tornado.install  |  1 -
 debian/python3-tornado.install |  1 -
 debian/rules                   | 36 +++++++-----------------------------
 3 files changed, 7 insertions(+), 31 deletions(-)

diff --git a/debian/python-tornado.install b/debian/python-tornado.install
deleted file mode 100644
index b2cc136..0000000
--- a/debian/python-tornado.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python2*
diff --git a/debian/python3-tornado.install b/debian/python3-tornado.install
deleted file mode 100644
index b06a399..0000000
--- a/debian/python3-tornado.install
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python3
diff --git a/debian/rules b/debian/rules
index 0f1eec1..9b71426 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,38 +1,16 @@
 #!/usr/bin/make -f
 
-#DH_VERBOSE=1
-
-PYTHON2=$(shell pyversions -vr)
-PYTHON3=$(shell py3versions -vr)
+export DH_VERBOSE=1
+export PYBUILD_NAME=tornado
+export PYBUILD_TEST_ARGS_python2={interpreter} ./tornado/test/runtests.py
+# python3 tests are covered in autopkgtest only for now
+export PYBUILD_TEST_ARGS_python3=echo skipping python3 tests for now
 
 %:
-	dh $@ --with python2,python3
-
-build-python%:
-	python$* setup.py build
-
-override_dh_auto_build: $(PYTHON3:%=build-python%)
-	dh_auto_build
-
-install-python%:
-	python$* setup.py install --root=$(CURDIR)/debian/tmp \
-	  --force --no-compile -O0 --install-layout=deb
-
-override_dh_auto_install: $(PYTHON3:%=install-python%)
-	dh_auto_install
-
-override_dh_auto_clean:
-	dh_auto_clean
-	rm -rf build
-	rm -rf *.egg-info
+	dh $@ --with python2,python3 --buildsystem=pybuild
 
 override_dh_auto_test:
-ifeq "$(filter nocheck,$(DEB_BUILD_OPTIONS))" ""
-	# python3 tests only in autopkgtest because I'm lazy
-	set -e && for pyvers in $(PYTHON2); do \
-	    PYTHONPATH=$(CURDIR) python$$pyvers ./tornado/test/runtests.py; \
-	done
-endif
+	PYBUILD_SYSTEM=custom PYTHONPATH=. dh_auto_test
 
 override_dh_compress:
 	dh_compress -X.py

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-tornado.git



More information about the Python-modules-commits mailing list