Arnaud,

thank you for your suggestions. I have enabled running upstream's tests
and otherwise made the build script a bit simpler. Since there has been
no reaction from any of the listed maintainers, I have NMU'd
python-tz/2016.7-0.2 to DELAYED/3.

Cheers,
-Hilko
>From a72707f98a24575da58adf29dc43ccc53bc0489a Mon Sep 17 00:00:00 2001
From: Hilko Bengen <ben...@debian.org>
Date: Fri, 25 Nov 2016 12:03:14 +0100
Subject: [PATCH 1/2] Simplify build, enable tests, loosely following Arnaud
 Fontaine's suggestions

---
 debian/control            |  2 ++
 debian/python-tz.install  |  1 -
 debian/python3-tz.install |  1 -
 debian/rules              | 12 +++++++-----
 debian/test-pytz          | 17 -----------------
 5 files changed, 9 insertions(+), 24 deletions(-)
 delete mode 100644 debian/python-tz.install
 delete mode 100644 debian/python3-tz.install
 delete mode 100644 debian/test-pytz

diff --git a/debian/control b/debian/control
index eafaa56..396fcd1 100644
--- a/debian/control
+++ b/debian/control
@@ -9,6 +9,8 @@ Build-Depends: debhelper (>= 9~), dh-python,
                python3-all,
                python-setuptools,
                python3-setuptools,
+               python-pytest,
+               python3-pytest,
                tzdata,
 Standards-Version: 3.9.8
 Homepage: http://pypi.python.org/pypi/pytz/
diff --git a/debian/python-tz.install b/debian/python-tz.install
deleted file mode 100644
index dbdb301..0000000
--- a/debian/python-tz.install
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/python2*
diff --git a/debian/python3-tz.install b/debian/python3-tz.install
deleted file mode 100644
index fef6392..0000000
--- a/debian/python3-tz.install
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/python3*
diff --git a/debian/rules b/debian/rules
index f1d5e38..440c8f2 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,10 +1,12 @@
 #!/usr/bin/make -f
 
+export PYBUILD_NAME=tz
+
 %:
 	dh $@ --with=python2,python3 --buildsystem=pybuild
 
-override_dh_install:
-	dh_install --fail-missing
-
-	# install our testing package
-	install -D debian/test-pytz debian/python-tz/usr/lib/python-tz/test-pytz.py
+override_dh_auto_test:
+	dh_auto_test -- --before-test="\
+		cp $(CURDIR)/README.txt {build_dir}; \
+		cp -r $(CURDIR)/pytz/tests {build_dir}/pytz/" \
+		--after-test="rm -rf {build_dir}/README.txt {build_dir}/pytz/tests"
diff --git a/debian/test-pytz b/debian/test-pytz
deleted file mode 100644
index 45afb69..0000000
--- a/debian/test-pytz
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/python
-"""Run to test the system python"""
-import doctest
-import pytz
-import pytz.tzinfo
-import sys
-
-errors = 0
-tests = 0
-for mod in [pytz, pytz.tzinfo]: 
-    mod_errors, mod_tests = doctest.testmod(mod)
-    errors += mod_errors
-    tests += mod_tests
-
-if not errors:
-    print("Ran %s tests successfully." % tests)
-sys.exit(errors)
-- 
2.10.2

>From a7fcb7d821bde097c37c0eaf888352750e76a6fe Mon Sep 17 00:00:00 2001
From: Hilko Bengen <ben...@debian.org>
Date: Fri, 25 Nov 2016 12:06:40 +0100
Subject: [PATCH 2/2] 2016.7-0.2

---
 debian/changelog | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 9add21a..46f5574 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+python-tz (2016.7-0.2) unstable; urgency=medium
+
+  * Non-maintainer upload
+  * Simplify build, enable tests, loosely following Arnaud Fontaine's
+    suggestions
+
+ -- Hilko Bengen <ben...@debian.org>  Fri, 25 Nov 2016 12:05:08 +0100
+
 python-tz (2016.7-0.1) unstable; urgency=medium
 
   * Non-maintainer upload
-- 
2.10.2

Reply via email to