[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

python-module packaging: builtin distutils vs python3-setuptools



Hello,

I am trying to unbreak building of gpgme python bindings (#1054786).
The build result differs/breaks when python3-setuptools is installed.

Afaiui python3-setuptools is a newer/extended version of python's
built-in distutil (which is scheduled for removal). If
python3-setuptools the new code is used. dh-python recently has grown a
dependency on python3-setuptools, breaking the gpgme build.

An unchanged build would install to /usr/local. distutils seems to be
patched to not only support --install-layout=deb but also to use it by
default, whereas python3-setuptools supports it but does enable it by
default. That is easily fixed, however the layout still is different:

distutils installed[1] to 
usr/lib/python3/site-packages/gpg
usr/lib/python3/site-packages/gpg/constants
usr/lib/python3/site-packages/gpg/constants/data
usr/lib/python3/site-packages/gpg/constants/data/__pycache__
[...]
plus a gpg-1.18.0.egg-info directly in usr/lib/python3/site-packages/
which we shipped in dist-packages.

python3-setuptools produces[1]
usr/lib/python3/dist-packages/
usr/lib/python3/dist-packages/gpg-1.18.0-py3.11-linux-amd64.egg
usr/lib/python3/dist-packages/gpg-1.18.0-py3.11-linux-amd64.egg/gpg
usr/lib/python3/dist-packages/gpg-1.18.0-py3.11-linux-amd64.egg/gpg/constants
usr/lib/python3/dist-packages/gpg-1.18.0-py3.11-linux-amd64.egg/gpg/constants/tofu
usr/lib/python3/dist-packages/gpg-1.18.0-py3.11-linux-amd64.egg/gpg/constants/tofu/__pycache__
[...]
usr/lib/python3/dist-packages/gpg-1.18.0-py3.11-linux-amd64.egg/EGG-INFO

Looking at other Debian packages this does not look like right. However I
have checked "python3 setup.py  install --help" and tried to look at
python3-setuptools documentation to find the correct knob/setting to
switch to the other layout but just could not find it.

TIA, cu Andreas


[1] well, it used to. If I now "dpkg --purge --force-depends
python3-setuptools" it seems to install to dist-packages. 
-- 
`What a good friend you are to him, Dr. Maturin. His other friends are
so grateful to you.'
`I sew his ears on from time to time, sure'


Reply to: