[Python-modules-commits] [sortedcontainers] 06/08: run tests at build time

Sandro Tosi morph at moszumanska.debian.org
Thu Dec 10 17:29:42 UTC 2015


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

morph pushed a commit to branch master
in repository sortedcontainers.

commit 11e7ed84bf8cb6caba3adaaf5de486aba731dd93
Author: Sandro Tosi <morph at debian.org>
Date:   Thu Dec 10 16:53:07 2015 +0000

    run tests at build time
---
 debian/changelog |  4 +++-
 debian/control   |  2 +-
 debian/rules     | 17 +++++++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 57cf8be..4fb44c6 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,8 +7,10 @@ sortedcontainers (1.4.4-1) UNRELEASED; urgency=medium
     - use releases on github to fetch upstream code
   * debian/copyright
     - update for new upstream code
+  * debian/{control, rules}
+    - run tests at build time
 
- -- Sandro Tosi <morph at debian.org>  Thu, 10 Dec 2015 16:07:35 +0000
+ -- Sandro Tosi <morph at debian.org>  Thu, 10 Dec 2015 16:52:51 +0000
 
 sortedcontainers (0.9.6-1) unstable; urgency=low
 
diff --git a/debian/control b/debian/control
index ee2c243..f4330f4 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: python
 Priority: optional
 Maintainer: Sandro Tosi <morph at debian.org>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org> 
-Build-Depends: debhelper (>= 9), python, python3, dh-python, python-setuptools, python3-setuptools
+Build-Depends: debhelper (>= 9), python-all, python3-all, dh-python, python-setuptools, python3-setuptools, python-nose, python3-nose
 Standards-Version: 3.9.6
 Homepage: http://www.grantjenks.com/docs/sortedcontainers/
 Vcs-Git: git://anonscm.debian.org/python-modules/packages/sortedcontainers.git
diff --git a/debian/rules b/debian/rules
index 2311ac5..428a16d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,11 +1,28 @@
 #!/usr/bin/make -f
 
+PY2VERS := $(shell pyversions -s)
+PY3VERS := $(shell py3versions -s)
+
 %:
 	dh $@ --with python2,python3
 
+override_dh_auto_build:
+	set -e ; \
+	for python in $(PY2VERS) $(PY3VERS); do \
+		$$python setup.py build; \
+	done
+
 override_dh_auto_install:
 	python  setup.py install --install-layout=deb --root=$(CURDIR)/debian/python-sortedcontainers
 	python3 setup.py install --install-layout=deb --root=$(CURDIR)/debian/python3-sortedcontainers
 
+override_dh_auto_test:
+	set -e ; \
+	for python in $(PY2VERS) $(PY3VERS); do \
+		echo "-- running tests for "$$python" --" ; \
+		LIB=$$($$python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_purelib)") ;\
+		PYTHONPATH=$(CURDIR)/$(LIB) $$python /usr/bin/nosetests tests/ ; \
+	done
+
 override_dh_installdocs:
 	dh_installdocs -A README.rst

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



More information about the Python-modules-commits mailing list