-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[BUG] An empty directory with an empty pyproject.toml file is a valid setuptools project #3765
Comments
x-ref #2329 That was closed with the rationale that (a) this is useful for testing and (b) that higher level tools protect against this. I really don't think (a) is a strong argument -- getting a clear error message and manually adding 1 line is much better than having users be confused because a build proceeded despite not having any metadata. Notably, this prevents using And, as demonstrated (b) is not true. |
This behaviour has been a consistent source of user-confusion. In ~60 seconds and a couple of searches, I can find:
Please reconsider this behaviour of setuptools and fail explicitly when given "degenerate" build configuration instead of proceeding to do a degenerate build. |
Hi @pradyunsg, I would like to clarify that in the listed issues the source of user-confusion is not related to the behaviour being discussed here. There might be other issues in that the assumption is correct, but specifically in the links listed above the packages are indeed providing enough metadata for the build. The origin of the problems is different: either there was no version of setuptools available at that point in time capable of parsing Implementing the changes proposed would not change the user-confusion if an older version of setuptools gets accidentally used during the build. There would still be a If we do a mental exercise for the given examples and imagine a scenario where setuptools had failed explicitly instead of proceeding with a degenerate build, users would still be confused, because they were indeed declaring user and version so the explicit exception would make no sense... Of course, there might be other (better) examples. We just have to be careful to not accidentally step into a XY-problem-style reasoning to justify the need for change in the |
@pradyunsg, would you like to keep this issue to centralise the discussion or #3511? |
Bah, #3511 is good enough. Sorry for the duplicate! |
setuptools version
setuptools==65.7.0
Python version
N/A
OS
N/A
Additional environment information
No response
Description
Setuptools does not refuse to build a project if it is missing a name or a version.
Expected behavior
Setuptools should fail because this project did not declare a name and a version for this package.
How to Reproduce
Output
See above.
The text was updated successfully, but these errors were encountered: