-
Notifications
You must be signed in to change notification settings - Fork 121
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
Restore setup.cfg only packages? #302
Comments
(Of course, also happy if pip reverts to not building setup.cfg-only packages with no pyproject.toml, but either way they should match) |
pypa/pip#9547 is the relevant pip PR and discussion. |
The change didn't happen in pypa/pip#9547, though; that only added editable installs for setup.cfg - that was part of Pip 21.1.0 and 21.1.1. The change happened in pypa/pip#9945, and is only part of Pip 21.1.2. |
Note this has nothing to do with editable installs, just with the verification step. Pip used to check for pyproject.toml or setup.py, now it checks for setup.cfg too, which means a setup.cfg but no pyproject.toml or setup.py is now valid in pip. Before build 0.4.0, it was also valid in build. Build and pip should do the same thing. It's all a "correctness" check, both tools are just fine with a setup.cfg only package if you remove the checks. |
Can someone explain why we'd want to allow this? You can't invoke setuptools without a |
Technically you can:
This is explicitly supported by setuptools and is (roughly) what pip is doing. |
You can, not have a module or script and use Python's |
I don’t disagree with your reasoning; I don’t think |
The setuptools upstream has denied adding that as an entrypoints, so I don't think doing |
Setuptools is trying to make From a practical standpoint, it's already hard to convince users to move from setup.py to setup.cfg, and hard to convince them to use pyproject.toml, and hard to convince them to use All the machinery already exists for this! Build < 0.4 supported it, pip supported it as soon as the check was loosened. The only think is a static check that was added to provide a better error message if someone targets the wrong directory when building. I think we should probably loosen the check - if someone points at a directory with just a Longer term, I think PEP 517 should be modified to say that "classic" builds have |
As per the reasoning I presented in pypa/pip#9945, I am gonna deny this. |
Seems reasonable. Maybe someone will make a PR to pip or propose an edit PEP 517 to make the |
The pip PR removing support for these projects was just merged a few minutes ago. |
That's awesome! Then I'm happy. :) Xref: pypa/pip#10031 |
Pip 21.1.2 gained support for building legacy packages with just setup.cfg, which we lost in 0.4.0. The argument that convinced me of that breaking change was pip's lack of support for it - but now that's not true anymore. Should we restore support for setup.cfg only projects? I think it's a bad idea for pip to be able to
pip wheel .
a package but build cannot build it.See #260, specifically #260 (comment), and pypa/pip#9945.
Edit: This has been corrected in pip, so build 0.4.0 is correct. :)
The text was updated successfully, but these errors were encountered: