Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use Distribution object to resolve packages #18

Merged
merged 1 commit into from
Mar 16, 2024
Merged

Conversation

thrau
Copy link
Member

@thrau thrau commented Mar 16, 2024

Motivation

The previous package finding mechanism wasn't resolving namespace packages correctly. There is a special PEP420PackageFinder that we could use, but while investigating, I noticed that the setuptools Distribution object already resolves packages correctly based on the tool.setuptools.package.find config in either the setup.cfg or pyproject.toml. Using this instead instead of setuptools.find_package directly this also solves the outstanding issue of correctly passing where, exclude, and include parameters to the finder.

We still require the source path (where) to load all modules, code which we already introduced in #17.

Changes

  • plux now resolves packages from the Distribution object instead of calling setuptools.find_package manually.

@thrau thrau merged commit 8793b87 into main Mar 16, 2024
5 checks passed
@thrau thrau deleted the better-package-finder branch March 16, 2024 22:22
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.

None yet

1 participant