Dear Matrix-team maintainers,
As discussed over the matrix room #debian-matrix:matrix.org, please
find in attachment a patch to solve this bug.
Basically, this happened because autodep8 tries to derive the Python
module name from the package name.
In this case, the module name is nio while autodep8 tries to import
matrix_nio from the package name, which fails.
The patch attached does the following:
- Remove the autodep8 autopkgtest
- Add a custom autopkgtest (debian/test/control and debian/test/pytest):
This autopkgtest is actually using the upstream test cases (pytest-3
tests/), going further than a regular module import.
- Adding a debian/salsa-ci.yml file so you can enable CI on your Salsa
repo and use that file to validate autopkgtests works fine before
uploading to main
- Document the changes in debian/changelog
Best regards,
Henry-Nicolas Tourneur
Matrix id: @hntourne:matrix.nilux.be
diff --git a/debian/changelog b/debian/changelog
index 04ff6e2..05483c4 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,9 @@ python-matrix-nio (0.12.0-1) unstable; urgency=medium
* Update changelog entry for release 0.10.0-2
to mention changes to descriptions
+ [ Henry-Nicolas Tourneur ]
+ * Replace autodep8 autopkgtest with new autopkg test suite (Closes: #961852)
+
-- Jonas Smedegaard <d...@jones.dk> Sat, 30 May 2020 13:18:16 +0200
python-matrix-nio (0.11.2-2) unstable; urgency=medium
diff --git a/debian/control b/debian/control
index 51f2b56..de49591 100644
--- a/debian/control
+++ b/debian/control
@@ -40,7 +40,6 @@ Homepage: https://github.com/poljar/matrix-nio
Vcs-Git: https://salsa.debian.org/matrix-team/python-matrix-nio.git
Vcs-Browser: https://salsa.debian.org/matrix-team/python-matrix-nio
Rules-Requires-Root: no
-Testsuite: autopkgtest-pkg-python
Package: python3-matrix-nio
Architecture: all
diff --git a/debian/salsa-ci.yml b/debian/salsa-ci.yml
new file mode 100644
index 0000000..a5957e7
--- /dev/null
+++ b/debian/salsa-ci.yml
@@ -0,0 +1,8 @@
+---
+include:
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
+ - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+
+variables:
+ SALSA_CI_DISABLE_BLHC: 1
+ SALSA_CI_DISABLE_BUILD_PACKAGE_ANY: 1
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..8d99d7a
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,26 @@
+Tests: pytest
+Restrictions: allow-stderr
+Depends: python3-all,
+ python3-pytest,
+ python3-pip,
+ python3-pytest-cov,
+ python3-pytest-benchmark,
+ python3-hyperframe,
+ python3-hypothesis,
+ python3-hpack,
+ python3-mypy,
+ python3-mypy-extensions,
+ python3-aiohttp,
+ python3-aioresponses,
+ python3-olm,
+ python3-peewee,
+ python3-atomicwrites,
+ python3-cachetools,
+ python3-logbook,
+ python3-unpaddedbase64,
+ python3-pycryptodome,
+ python3-aiofiles,
+ python3-jsonschema,
+ python3-h2,
+ python3-h11,
+ @
diff --git a/debian/tests/pytest b/debian/tests/pytest
new file mode 100644
index 0000000..85f10ae
--- /dev/null
+++ b/debian/tests/pytest
@@ -0,0 +1,6 @@
+#!/bin/sh
+
+# Get from PyPi what is not packaged into Debian
+pip3 install pytest-flake8 pytest-isort faker
+
+pytest-3 tests/