This is an automated message from the Debian DFSG, Licensing & New
Packages Team.
The Debian NEW review of python-piqtree 0.8.3-1 has been completed.
Decision: ACCEPTED
Reviewer: Andrew McMillan
Review comment:
Hi,
A couple of issues were found in the review that you might want to fix...
1. [important] [packaging] nodoc doc build is keyed to the wrong switch and is
fragile; both nodoc modes can break the build
- Files: `debian/rules`, `debian/control`, `debian/python-piqtree-doc.docs`
- Evidence: `execute_after_dh_auto_build:` contains `ifeq (,$(findstring
nodoc, $(DEB_BUILD_OPTIONS)))` then `python3 -m mkdocs build -v -d html`, while
Build-Depends gate mkdocs* with `<!nodoc>` (a build *profile*);
`debian/python-piqtree-doc.docs` is `html`. The mkdocs step also sets
`PYTHONPATH=\`dirname \$(find .pybuild/ -type d -name "*piqtree*dist-info" |
head -n1)\``.
- Problem: Two independent switches control the same resource. With
`DEB_BUILD_PROFILES=nodoc` the mkdocs packages are not installed but
debian/rules still runs mkdocs (fails with ModuleNotFoundError); with
`DEB_BUILD_OPTIONS=nodoc` mkdocs is skipped, `html/` is never produced, and
dh_installdocs then fails because `debian/python-piqtree-doc.docs` lists a
missing `html`. Policy 4.9.1 makes `nodoc` an official DEB_BUILD_OPTIONS tag
and requires the package to still build. Separately, `python3-all-dev` builds
the extension for every supported CPython; `find .pybuild/ ... | head -n1`
picks whichever build dir the filesystem presents first, which is not
guaranteed to match the interpreter `python3 -m mkdocs` uses, so `from _piqtree
import __iqtree_version__` (src/piqtree/__init__.py) can fail on ABI mismatch
and abort the build.
- Fix: Gate the mkdocs step on the `nodoc` build profile exactly like the
Build-Depends (`DEB_BUILD_PROFILES`), since dh_installdocs already honours the
nodoc profile and will then skip the doc install consistently. Point PYTHONPATH
at the build dir of the default interpreter (e.g. derive it from `python3 -c
'import sys; ...'` or a fixed `.pybuild/...` layout) instead of an unsorted
find, and confirm with a clean normal and nodoc build.
2. [minor] [packaging] The pytest suite is never executed during build or
autopkgtest
- Files: `debian/control`, `debian/rules`
- Evidence: `Testsuite: autopkgtest-pkg-pybuild`, no debian/tests/control, no
`PYBUILD_TEST_ARGS`/`--test-pytest`; pybuild's pyproject plugin runs
`python{version} -m unittest discover -v` by default and "No test runner
selected ... ignoring test discovery problems" (dhpython/build/base.py:329).
- Problem: The tests are pytest-style (they rely on pytest fixtures in
tests/conftest.py, e.g. `three_otu`, `protein_four_otu`), so unittest discovery
finds no TestCase classes and, because discovery is allowed to find zero tests,
the build passes without running anything. python3-pytest/-cov/-mock (and
python3-loky) Build-Depends are therefore dead weight and regressions in this
scientific package go undetected.
- Fix: Add a debian/tests/control that runs the pytest suite under
autopkgtest-pkg-pybuild, or set `PYBUILD_TEST_ARGS=--test-pytest` and keep the
pytest Build-Depends; then verify `dh_auto_test` actually executes the tests.
Thanks!
Full review details: https://dfsg-new-queue.debian.org/reviews/python-piqtree