[Python-modules-commits] [libcloud] 09/15: Use PYBUILD_{BEFORE, AFTER}_TEST to avoid overriding dh_auto_test and dh_auto_clean.

Andrew Starr-Bochicchio asb at moszumanska.debian.org
Thu Oct 19 03:25:48 UTC 2017


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

asb pushed a commit to branch master
in repository libcloud.

commit 6fb24665fcdda3e04b1c3718ea801224fb322d1f
Author: Andrew Starr-Bochicchio <a.starr.b at gmail.com>
Date:   Wed Oct 18 21:58:31 2017 -0400

    Use PYBUILD_{BEFORE,AFTER}_TEST to avoid overriding dh_auto_test and dh_auto_clean.
---
 debian/changelog |  2 ++
 debian/rules     | 13 ++-----------
 2 files changed, 4 insertions(+), 11 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 029f57b..e5f59f2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,8 @@ libcloud (2.2.1-1) UNRELEASED; urgency=medium
   * debian/control: Remove deprecated XS-Testsuite field.
   * Build depend on python{3}-pytest-runner. 
   * Bump Standards-Version to 4.1.0.
+  * Use PYBUILD_{BEFORE,AFTER}_TEST to avoid overriding
+    dh_auto_test and dh_auto_clean.
 
   [ Hans-Christoph Steiner ]
   * New upstream release from git tag
diff --git a/debian/rules b/debian/rules
index 8ec6f9f..cecd185 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,21 +1,12 @@
 #!/usr/bin/make -f
 
 export PYBUILD_NAME=libcloud
+export PYBUILD_BEFORE_TEST=ln -s {dir}/libcloud/test/secrets.py-dist {build_dir}/libcloud/test/secrets.py
+export PYBUILD_AFTER_TEST=rm -f {build_dir}/libcloud/test/secrets.py
 
 %:
 	dh $@ --with python2,python3 --buildsystem=pybuild
 
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-override_dh_auto_test:
-	ln -s secrets.py-dist libcloud/test/secrets.py
-	for pyversion in $(shell pyversions -vr); do python$$pyversion setup.py test; done
-	for py3version in $(shell py3versions -vr); do python$$py3version setup.py test; done
-
-override_dh_clean:
-	dh_clean
-	rm -f libcloud/test/secrets.py
-endif
-
 override_dh_auto_install:
 	dh_installchangelogs CHANGES.rst
 	dh_auto_install

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



More information about the Python-modules-commits mailing list