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

setuptools: Disable auto discovery #1223

Merged
merged 1 commit into from
Mar 29, 2022

Conversation

tobias-urdin
Copy link
Contributor

The latest release of setuptools 61.0 made a breaking change[1] and
because of this change 'pip install' fails with the following error.

~~
error: Multiple top-level packages discovered in a flat-layout:
['lib', 'spec', 'manifests', 'releasenotes'].
~~

Users that don't set 'packages', 'py_modules', or configuration'
are still likely to observe the auto-discovery behavior, which may
halt the build if the project contains multiple directories and/or
multiple Python files directly under the project root.

To disable auto discovery, one can do below in setup.py

~~
setuptools.setup(..,packages=[],..)
~~

or

~~
setuptools.setup(..,py_modules=[],..)
~~

[1] pypa/setuptools#3197

The latest release of setuptools 61.0 made a breaking change[1] and
because of this change 'pip install' fails with the following error.

~~
error: Multiple top-level packages discovered in a flat-layout:
['lib', 'spec', 'manifests', 'releasenotes'].
~~

Users that don't set 'packages', 'py_modules', or configuration'
are still likely to observe the auto-discovery behavior, which may
halt the build if the project contains multiple directories and/or
multiple Python files directly under the project root.

To disable auto discovery, one can do below in setup.py

~~
setuptools.setup(..,packages=[],..)
~~

or

~~
setuptools.setup(..,py_modules=[],..)
~~

[1] pypa/setuptools#3197
@tobias-urdin tobias-urdin merged commit 5a9ba4d into gnocchixyz:master Mar 29, 2022
@tobias-urdin
Copy link
Contributor Author

@Mergifyio backport stable/4.4

@mergify
Copy link
Contributor

mergify bot commented Mar 29, 2022

backport stable/4.4

✅ Backports have been created

tobias-urdin added a commit that referenced this pull request Mar 29, 2022
setuptools: Disable auto discovery (backport #1223)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant