#1128560 dh-python: Some .so files get installed under /usr/lib/python3.14/dist-packages/<pkg>

Package:
dh-python
Source:
dh-python
Submitter:
أحمد المحمودي
Date:
2026-03-11 12:45:02 UTC
Severity:
normal
Tags:
#1128560#5
Date:
2026-02-21 03:00:23 UTC
From:
To:
Dear Maintainer,

When building cocotb [1], some .so files got installed under
/usr/lib/python3.14/dist-packages/cocotb/libs/:
./usr/lib/python3.14/dist-packages/cocotb/libs/libcocotb.so
./usr/lib/python3.14/dist-packages/cocotb/libs/libembed.so
./usr/lib/python3.14/dist-packages/cocotb/libs/libpygpilog.so

Yet those same libraries (along with others) got also installed in the
proper path  /usr/lib/python3/dist-packages/cocotb/libs/

[1] https://salsa.debian.org/electronics-team/cocotb

#1128560#10
Date:
2026-03-09 18:57:48 UTC
From:
To:
Hi أحمد (2026.02.20_23:00:23_-0400)
exit with an error?

I see this from your last salsa-ci build:

dh_python3 --no-ext-rename
W: dh_python3 fs:143: Paths differ: debian/python3-cocotb/usr/lib/python3.14/dist-packages/cocotb/libs/libpygpilog.so and debian/python3-cocotb/usr/lib/python3/dist-packages/cocotb/libs/libpygpilog.so
W: dh_python3 fs:143: Paths differ: debian/python3-cocotb/usr/lib/python3.14/dist-packages/cocotb/libs/libembed.so and debian/python3-cocotb/usr/lib/python3/dist-packages/cocotb/libs/libembed.so
W: dh_python3 fs:143: Paths differ: debian/python3-cocotb/usr/lib/python3.14/dist-packages/cocotb/libs/libcocotb.so and debian/python3-cocotb/usr/lib/python3/dist-packages/cocotb/libs/libcocotb.so

The package is running dh_python3 with --no-ext-rename, in other words,
do notto rename .so files to add multiarch tuples.

So, when it gets two different versions of .so file, what is it supposed
to do?

It just leaves them installed in a python-interpreter-version specific
path, because it has no other option.

Stefano

#1128560#17
Date:
2026-03-09 22:21:35 UTC
From:
To:
Well, I expect that those files don't get installed under
/usr/lib/python3.14/dist-packages/cocotb/libs/, just as they did not get
installed under /usr/lib/python3.13/dist-packages/cocotb/libs/
---end quoted text---

That sounds reasonable, why then does lintian complain ? Should I add an
override ?

#1128560#22
Date:
2026-03-09 23:17:59 UTC
From:
To:
Hi أحمد (2026.03.09_22:21:35_+0000)

Actually, they were installed under
/usr/lib/python3.13/dist-packages/cocotb/libs/

dh_python3 attempted to merge /usr/lib/python3.13/dist-packages/ and
/usr/lib/python3.14/dist-packages/ and couldn't because these libraries
differed.

You need to decide how to handle the difference. If these are C
libraries, not linking to anything Python-version-specific, then you can
just delete them from /usr/lib/python3.14/dist-packages/cocotb/libs/

If they are Python-verison-specific, then you need to rearrange them
somehow.

Stefano

#1128560#27
Date:
2026-03-11 05:59:04 UTC
From:
To:
---end quoted text---

Isn't being installed in a /usr/lib/python<ver>/... the proper arrangement
in such case ?

#1128560#32
Date:
2026-03-11 12:43:48 UTC
From:
To:
Hi أحمد (2026.03.11_05:59:04_+0000)

I was thinking more like patching the code to allow some
differentiation.

But yes, that location does practically work, it's just not widely used,
and not a documented location in the Debian Python Policy.

Stefano