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

Package:
src:blag
Source:
src:blag
Submitter:
Santiago Vila
Date:
2026-11-12 06:13:01 UTC
Severity:
normal
Tags:
#1151897#5
Date:
2026-10-24 09:41:11 UTC
From:
To:
Dear maintainer:

During a rebuild of all packages in unstable, this package failed to build.

Below you will find the last part of the build log (probably the most
relevant part, but not necessarily). If required, the full build log
is available here:

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

About the archive rebuild: The build was made on virtual machines from AWS,
using sbuild and a reduced chroot with only build-essential packages.

If you cannot reproduce the bug please contact me privately, as I
am willing to provide ssh access to a virtual machine where the bug is
fully reproducible.

If this is really a bug in one of the build-depends, please use
reassign and add an affects on src:blag, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
I: pybuild plugin_pyproject:199: Copying package built for python3.14 to destdir
   dh_installdocs -O--buildsystem=pybuild
   dh_installchangelogs -O--buildsystem=pybuild
   dh_installman -O--buildsystem=pybuild
   dh_python3 -O--buildsystem=pybuild
E: dh_python3 fs:312: blag includes a common build directory name 'tests' as a module. Likely due to a mis-configured build system installing things it shouldn't.
make: *** [debian/rules:12: binary] Error 1
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1151897#10
Date:
2026-11-12 06:10:53 UTC
From:
To:
pyproject.toml incorrectly indicates that 'tests' is a module that blag
should install into the shared namespace of all Python packages. We
obviously can't have lots of packages wanting to occupy the
/usr/lib/python3/dist-packages/tests/.

The `tool.setuptools.packages` list is for the modules that should
appear in the binary distribution (the wheel or the .deb), not for
packages that are only for building the binary distribution (such as tests).

The attached patch fixes this; as blag is a native package, I guess you
need to make a new upstream release to include it.

Note that this also affects the upstream wheel; it ships both `blag` and
`tests` modules and so would have the same issue if installed into a
venv with any other module that also accidentally included the `tests`
module.

$ zipinfo -l1 blag-2.3.3-py3-none-any.whl
blag/__init__.py
blag/blag.py
[...]
blag-2.3.3.dist-info/licenses/LICENSE
[...]
tests/__init__.py
[...]

regards
Stuart