Browse Source

Adjust for upstream changes

* Drop "locale-in-tests", no longer needed
* Adjust for upstream's migration to tox
Christoph Biedl 2 months ago
parent
commit
73f6ed0d23

+ 3 - 0
debian/control

@@ -9,7 +9,10 @@ Build-Depends: debhelper-compat (= 13),
     dh-python,
     libmagic1 (>= 1:5.39),
     python3-all,
+    python3-coverage,
+    python3-pytest,
     python3-setuptools,
+    tox,
 Priority: extra
 Rules-Requires-Root: no
 Section: libs

+ 16 - 0
debian/patches/2022-06-05.adjust-tox.patch

@@ -0,0 +1,16 @@
+Subject: Adjust tox.ini for Debian's python3-coverage
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Date: 2022-06-05
+Forwarded: not-needed
+
+--- a/tox.ini
++++ b/tox.ini
+@@ -12,7 +12,7 @@
+ 
+ [testenv]
+ commands =
+-    coverage run -m pytest 
++    python3-coverage run -m pytest
+ 
+ setenv =
+   COVERAGE_FILE=.coverage.{envname}

+ 0 - 27
debian/patches/debian/2021-01-16.locale-in-tests.patch

@@ -1,27 +0,0 @@
-Subject: Adjust locale check in test suite
-Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de> 
-Date: 2021-01-16
-Forwarded: no
-
-    Upstream wishes to run the test suite with LC_ALL set to
-    en_US.UTF-8 which is not available during build by default.
-
-    Instead of adding a build dependeny on locales-all and poking
-    some environment variables, just change this to C.UTF-8 which
-    does the trick as well, without additional cost.
-
---- a/test/test.py
-+++ b/test/test.py
-@@ -3,10 +3,10 @@
- # for output which reports a local time
- os.environ['TZ'] = 'GMT'
- 
--if os.environ.get('LC_ALL', '') != 'en_US.UTF-8':
-+if os.environ.get('LC_ALL', '') != 'C.UTF-8':
-     # this ensure we're in a utf-8 default filesystem encoding which is
-     # necessary for some tests
--    raise Exception("must run `export LC_ALL=en_US.UTF-8` before running test suite")
-+    raise Exception("must run `export LC_ALL=C.UTF-8` before running test suite")
- 
- import shutil
- import os.path

+ 1 - 1
debian/patches/series

@@ -3,4 +3,4 @@
 # patches that should go upstream
 
 # modifications for Debian
-debian/2021-01-16.locale-in-tests.patch
+2022-06-05.adjust-tox.patch

+ 1 - 1
debian/rules

@@ -3,4 +3,4 @@
 export LC_ALL=C.UTF-8
 
 %:
-	dh $@ --with python3 --buildsystem=pybuild
+	dh $@ --with python3 --buildsystem=pybuild --test-tox