#1151407 dh-python: several packages FTBFS with error "XXX includes a common build directory name 'tests' as a module."

#1151407#5
Date:
2026-10-20 10:33:14 UTC
From:
To:
Dear maintainer:

The packages in the affects line all fail to build in a similar way:

E: dh_python3 fs:312: python3-sorted-nearest includes a common build directory name 'tests' as a module. Likely due to a mis-configured build system installing things it shouldn't.

(That's how src:sorted-nearest fails, as an example).

If this is not a bug in dh-python, please clone and reassign to each of the affected packages, possibly
with a brief explanation of what maintainers are supposed to do.

Thanks.

#1151407#12
Date:
2026-10-20 13:33:09 UTC
From:
To:
Control: clone -1 -2 -3 -4 -5 -6 -7 -8 -9 -10 -11 -12 -13 -14 -15 -16 -17 -18
Control: reassign -1 src:appdata
Control: reassign -2 src:busco
Control: reassign -3 src:dissononce
Control: reassign -4 src:django-distill
Control: reassign -5 src:dogtail2
Control: reassign -6 src:gitsome
Control: reassign -7 src:mkdocs-macros-plugin
Control: reassign -8 src:palettable
Control: reassign -9 src:pkb-client
Control: reassign -10 src:pocsuite3
Control: reassign -11 src:python-jira
Control: reassign -12 src:python-multidict
Control: reassign -13 src:python-pantomime
Control: reassign -14 src:python-serializable
Control: reassign -15 src:python-sparkpost
Control: reassign -16 src:python-threadloop
Control: reassign -17 src:sbws
Control: reassign -18 src:sorted-nearest

Hi Santiago (2026.10.20_10:33:14_+0000)

This is a new feature in dh-python, detecting likely build
misconfiguration (as the message states).

building sorted-nearest attempts to install:

sorted-nearest-0.0.41+dfsg/debian/python3-sorted-nearest/usr/lib/python3/dist-packages/tests
sorted-nearest-0.0.41+dfsg/debian/python3-sorted-nearest/usr/lib/python3/dist-packages/tests/test_ties.py
sorted-nearest-0.0.41+dfsg/debian/python3-sorted-nearest/usr/lib/python3/dist-packages/tests/conftest.py

That's clearly wrong, and inappropriate.
I note that the version in unstable doesn't include these files, and it
isn't immediately obvious to me where the regression is. Probably in
setuptools.

But the package includes in pyproject:

[tool.setuptools.packages.find]
where = ["."]

That should really have some includes or excludes.

I checked appdata and busco, both have the same issue. Let's assume that
all of these packages are affected.

Stefano

#1151407#27
Date:
2026-10-21 11:17:43 UTC
From:
To:
Hello,

Bug #1151407 in python-threadloop reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/openstack-team/third-party/python-threadloop/-/commit/7f6652ef05f323e047d637ec5063a08c4df8d3b8
Newer setuptools (84.0.0) find_packages() no longer prunes
sub-packages of an excluded parent, so a top-level tests/ directory
was being installed into dist-packages; exclude tests.* explicitly.

Run the upstream test suite with pytest: add python3-pytest to
Build-Depends-Indep and fix two runtime bugs with tornado 6 that the
suite uncovered (IOLoop.stop() from another thread hangs the loop;
exceptions raised by plain submitted functions never reach the
concurrent.futures.Future and hang the caller).
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1151407

#1151407#34
Date:
2026-10-21 11:34:49 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
python-threadloop, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1151407@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Thomas Goirand <zigo@debian.org> (supplier of updated python-threadloop package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Wed, 21 Oct 2026 12:33:57 +0200
Source: python-threadloop
Architecture: source
Version: 1.0.2-4
Distribution: unstable
Urgency: medium
Maintainer: Debian OpenStack <team+openstack@tracker.debian.org>
Changed-By: Thomas Goirand <zigo@debian.org>
Closes: 1151407
Changes:
 python-threadloop (1.0.2-4) unstable; urgency=medium
 .
   * Fix FTBFS with dh-python 7.20261019 (Closes: #1151407).
     Newer setuptools (84.0.0) find_packages() no longer prunes
     sub-packages of an excluded parent, so a top-level tests/ directory
     was being installed into dist-packages; exclude tests.* explicitly.
   * Run the upstream test suite with pytest: add python3-pytest to
     Build-Depends-Indep and fix two runtime bugs with tornado 6 that
     the suite uncovered (IOLoop.stop() from another thread hangs the
     loop; exceptions raised by plain submitted functions never reach
     the concurrent.futures.Future and hang the caller).
   * Add autopkgtest running the upstream test suite against the
     installed package.
Checksums-Sha1:
 34fb092114b6de55e59ce735bcd3e3395b427521 2252 python-threadloop_1.0.2-4.dsc
 734d9d876ab74a040798dfd1b606e1bd0e806982 4180 python-threadloop_1.0.2-4.debian.tar.xz
 2735722d77f38eb97d90b477d4ec7967b9429d86 6942 python-threadloop_1.0.2-4_amd64.buildinfo
Checksums-Sha256:
 c64f2834e3d996319165f5df332ec3b568dda6640f46f96610d2c28a1e3ec2df 2252 python-threadloop_1.0.2-4.dsc
 3c6ef4a607bce3b28aa890be981ce4093bae8abc4b761b05bbcdc34fc19d0d92 4180 python-threadloop_1.0.2-4.debian.tar.xz
 d3b2f4b59cd55f488fd3cedd851aeb08425eb0c183f8a6c7d818cca87a4432d8 6942 python-threadloop_1.0.2-4_amd64.buildinfo
Files:
 0426e19466804c6e37a724b80312994f 2252 python optional python-threadloop_1.0.2-4.dsc
 912459e5054b927e215797ca15ac72f4 4180 python optional python-threadloop_1.0.2-4.debian.tar.xz
 15a163c17ea87e4a71bacd8d6d030512 6942 python optional python-threadloop_1.0.2-4_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEoLGp81CJVhMOekJc1BatFaxrQ/4FAmrYn1oACgkQ1BatFaxr
Q/4hVg//U42ExkSYvwnLAeyfPv2tTCRlcmQY3oNdPeWoVe/5+4dMxIKbts2MFxyt
yPp8ol4S+DoJBuZJHS4RlDk6VV9WiEe/XQOQ76H231g0tulFtEnftcuXigY8m7mW
sn8FqBqv5UvLcQx2/dqy8pm8oSg52aKchI9eV11trHgyYFnjuFWaFtyKiHhOftdk
OFX+sfPUCuWLx4lInetaHugGZB6SldU5JfOErrQhtUV/KP5oYYWhm3qpdKJQuISq
ZfDixX87aum6mKyHpjGWpmZaisFe5j2+9FtM4nZIM4W2MUUpmIdfoPrnInJMDIi0
p6v7EnX1kP61MUPsKu9g2p5KI2J7oLTn9pKFO37RuGOdkFof5KjvY/B2/8CBzfDX
AwNVL8WIv7cMtSaqpVIak4TK5j0tUJcJ0FGVkFqwhrsUBsmNdxHIlzXEnTlhICMP
oJlZ37aIANC95qeQoRC2AIPCcjf7Xxrhhgvu3E0WRvZRQBFudXtq6howM8s6Ekqn
G0JPeZtZ6TAvBdg+1SkmGC80KDPTY65gkmfKMuxhDktoN8GM43W0dYIWJhlKcypr
a824bvyv9zDGpggD9Eaa2WypB0BIf9GBTxgcBe7pLpecGQLXLgPtdVyeZJomY9yb
oNmIVOzPaIKMlvTUbsKTcpM6f5gbHfVx9YcY8/zteayI9rCZhJs=
=4d7+
-----END PGP SIGNATURE-----