Skip to content

Drop runtime pkg_resources dependency for setuptools >= 82 compatibility - #102

Open
pmrv wants to merge 1 commit into
ICAMS:masterfrom
pmrv:drop-pkg-resources-upstream
Open

Drop runtime pkg_resources dependency for setuptools >= 82 compatibility#102
pmrv wants to merge 1 commit into
ICAMS:masterfrom
pmrv:drop-pkg-resources-upstream

Conversation

@pmrv

@pmrv pmrv commented Aug 8, 2026

Copy link
Copy Markdown

setuptools 82 removed the pkg_resources module entirely, which broke 'pacemaker' and pyace.multispecies_basisextension at import time (ModuleNotFoundError: No module named 'pkg_resources').

Replace pkg_resources.resource_filename with importlib.resources.files, keeping a pkg_resources fallback for Python 3.8 where importlib.resources.files is unavailable. Also drop the unused distutils.version.LooseVersion import from setup.py (distutils was removed from the stdlib in Python 3.12).

Description of Changes

Checklist

  • Code is well-documented.
  • All tests have been run and passed.
  • Relevant documentation has been updated if necessary.

License Agreement

By submitting this pull request, I agree that:

  • The code submitted in this pull request will be distributed under the Academic Software License (free for academic non-commercial use, not free for commercial use), see LICENSE.md for more details.
  • The copyright for the code, including the submitted code, remains with Ruhr University Bochum. Ruhr University Bochum retains the right to transfer or modify the copyright.

Thank you for your contribution!

setuptools 82 removed the pkg_resources module entirely, which broke
'pacemaker' and pyace.multispecies_basisextension at import time
(ModuleNotFoundError: No module named 'pkg_resources').

Replace pkg_resources.resource_filename with importlib.resources.files,
keeping a pkg_resources fallback for Python 3.8 where
importlib.resources.files is unavailable. Also drop the unused
distutils.version.LooseVersion import from setup.py (distutils was
removed from the stdlib in Python 3.12).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rATYdnCXiGYC3bkbirURw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants