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

#1151911#5
Date:
2026-10-24 11:31:40 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:python-homeconnect, so that this is still
visible in the BTS web page for this package.

Thanks.
--------------------------------------------------------------------------------
[...]
	dh_installchangelogs ; \
fi
make[1]: Leaving directory '/<<PKGBUILDDIR>>'
   dh_installexamples -O--buildsystem=pybuild
   dh_python3 -O--buildsystem=pybuild
E: dh_python3 fs:312: python3-homeconnect 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:9: binary] Error 1
dpkg-buildpackage: error: debian/rules binary subprocess failed with exit status 2
--------------------------------------------------------------------------------

#1151911#10
Date:
2026-10-26 08:10:32 UTC
From:
To:
Upstream's `setup.py` does not ensure that the `tests` directory is
excluded from the wheel and thus pollutes the shared packages namespace
with a tests directory. That now causes a FTBFS as dh-python is more
faithfully including what is in the wheels, and also attempting to
protect that shared namespace.

The attached patch tweaks module discovery to only include the
`homeconnect` module and not the `tests` module (and submodules).

This allows the package to build correctly with Python recent dh-python

regards
Stuart