Skip to content

build: Migrate from pkg_resources to importlib#290

Open
EbonJaeger wants to merge 1 commit into
python-xlib:masterfrom
EbonJaeger:setuptools-82-fix
Open

build: Migrate from pkg_resources to importlib#290
EbonJaeger wants to merge 1 commit into
python-xlib:masterfrom
EbonJaeger:setuptools-82-fix

Conversation

@EbonJaeger

Copy link
Copy Markdown

Setuptools 82 removed the pkg_resources module. The replacement is mostly importlib, with some other modules. This fixes the use of the removed module.

Signed-off-by: Evan Maddock maddock.evan@vivaldi.net

Setuptools 82 removed the `pkg_resources` module.
The replacement is `importlib`. This fixes the use
of the removed module.

Signed-off-by: Evan Maddock <maddock.evan@vivaldi.net>
@EbonJaeger EbonJaeger force-pushed the setuptools-82-fix branch from 67adbb7 to d56cda1 Compare June 8, 2026 23:40
HarveyDevel added a commit to getsolus/packages that referenced this pull request Jun 8, 2026
**Summary**

Fix build with setuptools 82.

See python-xlib/python-xlib#290

**Test Plan**

See that the build was successful.

**Checklist**

- [x] Package was built and tested against unstable
- [ ] This change could gainfully be listed in the weekly sync notes
once merged <!-- Write an appropriate message in the Summary section,
then add the "Topic: Sync Notes" label -->
- [x] I agree to license this contribution and all my previous
contributions under the licensing terms in
[LICENSE.md](../blob/main/LICENSE.md) and have the power and authority
to grant those licenses.
@sethc555

Copy link
Copy Markdown

Independent verification: with this PR checked out, python -m build (sdist → wheel) succeeds in a clean python:3.12 container with current setuptools. Without it, the published python-xlib 0.33 sdist fails: ModuleNotFoundError: No module named 'pkg_resources' (removed in setuptools 82, 2026-02). Reproduce: docker run --rm python:3.12 pip install --no-binary :all: python-xlib. Found while build-checking the top-5000 PyPI packages — +1 for merge and release.

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