Bug 2477013 - python3-pkg-resources is missing the required bundled packages
Summary: python3-pkg-resources is missing the required bundled packages
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-setuptools80
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Miro Hrončok
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 2461178
TreeView+ depends on / blocked
 
Reported: 2026-05-13 13:36 UTC by Miro Hrončok
Modified: 2026-05-13 15:23 UTC (History)
2 users (show)

Fixed In Version: python-setuptools80-80.10.2-4.fc45
Clone Of:
Environment:
Last Closed: 2026-05-13 15:23:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Fedora Package Sources python-setuptools80 pull-request 2 0 None None None 2026-05-13 14:12:18 UTC

Description Miro Hrončok 2026-05-13 13:36:30 UTC
python3-pkg-resources-80.10.2-3.fc45.noarch installed *without* python3-setuptools and without python3-setuptools80:

>>> import pkg_resources
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import pkg_resources
  File "/usr/lib/python3.14/site-packages/pkg_resources/__init__.py", line 85, in <module>
    import packaging.markers
ModuleNotFoundError: No module named 'packaging'


After installing python3-packaging:

>>> import pkg_resources
Traceback (most recent call last):
  File "<python-input-0>", line 1, in <module>
    import pkg_resources
  File "/usr/lib/python3.14/site-packages/pkg_resources/__init__.py", line 90, in <module>
    from jaraco.text import drop_comment, join_continuation, yield_lines
ModuleNotFoundError: No module named 'jaraco'


This goes on. I can install python3-setuptools80 or even python3-setuptools version 82 to fix this.

When the package was split, we did not anticipate this problem.





Reproducible: Always

Comment 1 Miro Hrončok 2026-05-13 13:39:38 UTC
/usr/lib/python3.14/site-packages/pkg_resources/__init__.py


import packaging.markers
import packaging.requirements
import packaging.specifiers
import packaging.utils
import packaging.version
from jaraco.text import drop_comment, join_continuation, yield_lines
from platformdirs import user_cache_dir as _user_cache_dir

Those are the only such imports.

The path is extedned by sys.path.extend(((vendor_path := os.path.join(os.path.dirname(os.path.dirname(__file__)), 'setuptools', '_vendor')) not in sys.path) * [vendor_path])

This works when python3-setuptools 82 is installed. Or when all 3 depndencies are installed.

But if a future version of setuptools drops some of the 3, installing setuptools will no longer work.

Comment 2 Miro Hrončok 2026-05-13 13:45:50 UTC
Solution 1: 

Add:

  Requires: python3-jaraco-text
  Requires: python3-packaging
  Requires: python3-platformdirs

This will likely work, but additional dependencies might not be expected here. Also, they will likely not be checked in %check.




Solution 2:

Add:

  Requires: (python3-setuptools with bundled(python3dist(jaraco-text)) with bundled(python3dist(packaging)) with bundled(python3dist(platformdirs)))

This will pull in setuptools 80 or 82 successfully. It might no longer work in the future, but it will work as long as setuptools keeps the 3 bundled libraries.

When the bundled libraries are updated to an incompatible version in the main setuptools package, again it will likely not be tested in %check.



Solution 3:

  Move the bundled things from setuptools80 to pkg-resources by mv and a small patch. I will experiment with this to see how much effort it is. Likely the safest option.

Comment 4 Fedora Update System 2026-05-13 15:19:03 UTC
FEDORA-2026-3d00dafc3b (python-setuptools80-80.10.2-4.fc45) has been submitted as an update to Fedora 45.
https://bodhi.fedoraproject.org/updates/FEDORA-2026-3d00dafc3b

Comment 5 Fedora Update System 2026-05-13 15:23:14 UTC
FEDORA-2026-3d00dafc3b (python-setuptools80-80.10.2-4.fc45) has been pushed to the Fedora 45 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.