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

#1151378#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.

#1151378#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

#1151378#35
Date:
2026-10-20 15:32:01 UTC
From:
To:
Hi Samuel (2026.10.20_16:41:34_+0200)

I can reproduce this with 2.2.1-2.
Yes, I see the bug is tagged as found in 2.2.1-2, but it's also closed,
which is odd, given that this is the last uploaded version.

I see:

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

Stefano

#1151378#40
Date:
2026-10-20 15:33:29 UTC
From:
To:
reopen 1151378
retitle 1151378 appdata: FTBFS: E: dh_python3 fs:312: python3-appdata includes a common build directory name 'tests' as a module. Likely due to a mis-configured build system installing things it shouldn't.
thanks

Hi. The failure is real, I've put a recent build log here:

https://people.debian.org/~sanvila/build-logs/202610/

I'm not happy that there are so many similar bugs out of a sudden, but
that's what dh-python maintainer told me.

[ If you closed this because you believe it's still a bug in dh-python,
  you might please better discuss about it in another place other than
  the BTS, because there are 18 similar bugs today ].

Thanks.

#1151378#51
Date:
2026-10-20 15:37:24 UTC
From:
To:
Stefano Rivera, le mar. 20 oct. 2026 17:32:01 +0200, a ecrit:

Ergl, sorry, I had looked at the bug title to get the number, and didn't
realize that the dogtail2 duplicate was another number.

Thanks for noticing,
Samuel