Re: dh-python with multiple directories, multiple interpreters

Gard Spreemann <[email protected]> Tue, 09 Jun 2026 21:42:07 +0200
Newsgroups gmane.linux.debian.devel.python
Message-ID <87a4t3zek0.fsf@moose>
--=-=-=
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

Andrey Rakhmatullin <[email protected]> writes:

> On Tue, Jun 09, 2026 at 09:01:41PM +0200, Gard Spreemann wrote:
>>I maintain python3-gudhi. Recently, upstream has moved to a
>>pybuild-based setup for the Python part of their code (albeit one that
>>in turn invokes CMake). The unusual thing is that prior to building, one
>>has to generate various source trees (from the main source tree) in
>>which the various binary packages will be built. One separate tree is
>>generated for each supported Python version.
>
> What are the differences between these trees? This is not related to your
> question but may be important for the .deb we want to get. Mainly because
> normally a python3-foo deb ships only an universal
> /usr/lib/python3/dist-packages/foo dir, maybe with per-interpreter .so fi=
les
> inside, but with all other files shared between interpreters.

At least in existing versions in Debian (before recent upstream
changes), I don't actually think there were substantial differences
between each generated directory. The whole dance was, for me, just a
simple way of retaining dh sequencing while not diverging from
upstream's recommended (strange) process.

But you're right, I should just investigate this in detail. My fear is
that there's some shenanigans regarding the selection of one specific
Python interpreter somewhere in the build system, but that remains to be
see.

>>I can't seem to figure out how to have the dh-python sequencer invoke
>>the usual pybuild steps on *each* of these generated source directories
>>separately, and restricting to one particular Python version for each
>>one.
>
> pybuild is a debhelper build system so I assume you can simply call dh_au=
to_*
> manually for each dir.

Right. I somehow seem to have convinced myself that the pybuild
component of debhelper didn't support specifiying the source
directory. Sorry for the noise :)


 Best,
 Gard
=20

--=-=-=
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQJGBAEBCgAwFiEEz8XvhRCFHnNVtV6AnRFYKv1UjPoFAmoobI8SHGdzcHJAbm9u
ZW1wdHkub3JnAAoJEJ0RWCr9VIz6aDMP/2WKGJcIdXgJ6M/qvDXi5mYP691ZZ62M
5xqmM894C5lEWIivccaJa1kVkyy7W+weQMN/xzP8zD+k4eI1uxNPcCrBKuQSBgTt
2uXhmYWLYMgTvBT12wBQjXwgTrEAPXLAiKDyjjhkSV0L0viKaC9VZjg5L2S9Vp9z
0RG87paLLb3n7/GzIdEkG219UWh9nyHoJ0WNJb8eJBTITw1TsxPIPFm3wKzCYZ8w
ZYNuKXjHE53dcJBWP6rKodW07TQHKXdKXh0UOCgeVD6sKSou2jJrn2Pga7M81LKR
Xr20fqTZ3npRaDT24khrJ3T5vGMFBysWYe3a3gxHY9OY9BUNlbVQUslRDU0T4Xgy
8MU9JLrsVu3uV+xJlPqtSZDttjH7UxhcQ9rXi+QuXbVBKueJ637xa6q3LkNXxGls
jqVzjbHIC2ZFvARalsCFZXoEApo4a+/iuvYgj7k81keRykgHD2KwP+mF3LJjYgvL
Fn2u68gOwENMBBauac1+FWHKK6T81tTZQSNOa4K8bnpKXQblLCfjaNVzz+Ts0hUz
0Z/i1z6bHu9JpRSmWdsxYP5lUYDc+6qr8YUtP82MVQe1csbQwlubAfRLMXfcCRWG
FIrH52jXJyCTlAO0ADNSUxA2QUrRavY3MeVZaF9QyFGV0cy4QiOabR94pyyXMD+L
voVsawOyPNDF
=VjZb
-----END PGP SIGNATURE-----
--=-=-=--