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

pyproject.toml: include subpackages in setuptools config #56

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

ichard26
Copy link
Contributor

@ichard26 ichard26 commented Aug 22, 2022

The glob patterns (include/exclude) must match the entire package name to take effect, so we need to add a wildcard pattern for subpackages. Otherwise, any wheels built won't include subpackages (like pathspec.patterns) and things will break >.<

To see the impact of the invalid configuration simply try the following:

  • pip install https://github.com/cpburnz/python-path-specification/archive/master.zip (pip will build a wheel from source and then install it)
  • python -c "import pathspec"
  • See it blow up with ImportError: cannot import name 'patterns' from partially initialized module 'pathspec'

Thank you for maintaining pathspec by the way! 🖤 I am one of the maintainers of Black which uses pathspec and it's been great. I noticed this issue since I run black's test suite daily using the development versions of our dependencies (to catch issues early-on, before they get released).

The glob patterns (include/exclude) must match the entire package name
to take effect, so we need to add a wildcard pattern for subpackages.

Otherwise, any wheels built won't include subpackages (like
pathspec.patterns) and things will break >.<
@cpburnz
Copy link
Owner

cpburnz commented Aug 23, 2022

Thanks for finding this. It's odd that pip lets this pass when building the wheel from the source distribution but not a ZIP.

@cpburnz cpburnz merged commit 829e142 into cpburnz:master Aug 23, 2022
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