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

Re: Bug#1079175: python3-pkg-resources: pkg_resources cannot be imported: No module named 'packaging'



Bonjour Cyril,

On 2024-08-20 11:45, Cyril Brulebois wrote:
> I couldn't replicate the FTBFS within a devel sid chroot that has tons of
> extra packages, including python3-packaging, and python3-platformdirs, but
> not python3-jaraco.text.
 
Could it be that your sid chroot has an older version of
python3-packaging? 70.3.0-2 works, 72.2.0-1 does not.

I just tried building a fresh git checkout of debian-installer in sbuild
and could reproduce the error:

mkdir -p ./tmp/netboot/depthcharge
depthchargectl build -v \
	--board amd64-generic \
	--kernel-release 6.10.6-amd64 \
	--kernel ./tmp/netboot/vmlinuz \
	--initramfs ./tmp/netboot/initrd.gz \
	--root none \
	--kernel-cmdline "--- quiet" \
	--output ./tmp/netboot/depthcharge/kernel.img
[...]
  File "/usr/lib/python3/dist-packages/depthcharge_tools/__init__.py", line 11, in <module>
    import pkg_resources
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 95, in <module>
    import packaging.specifiers
ModuleNotFoundError: No module named 'packaging'

> Purging python3-platformdirs still gives me a successful build.
> 
> And from the error/call site quoted above, it seems python3-packaging
> could be sufficient? (It doesn't list anything but python3:any in
> Depends or Recommends…)
> 
> I haven't tried just adding python3-packaging under sbuild though, I'm
> merely a little curious why the two other packages would be necessary.

AIUI the problem is that some of the modules used by pkg_resources used
to be vendored, and now they're not anymore. In any case Matthias
already uploaded setuptools 73.0.0-1 which fixes this.


Reply to: