pip: PEP 518: Behavior when pyproject.toml doesn't have build-system.requires
If other @pypa/pip-committers think it’s a good idea, we should not isolate if there’s no build-system.requires
in the pyproject.toml
file.
This isn’t something I noticed earlier but maybe this would have eased transitions (prevented issues like the one with pandas). I still think it would be a good idea to do this.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 36 (35 by maintainers)
Commits related to this issue
- add build-system section to pyproject.toml this makes the file valid and prepares for https://github.com/pypa/pip/issues/5416 and https://github.com/pypa/pip/pull/5512 — committed to RonnyPfannschmidt/pytest by RonnyPfannschmidt 6 years ago
- fix PEP 518 configuration Add `build-system.requires` key to `pyproject.toml`: - this is necessary with pip 10.0.1, as otherwise the defaults will be to require both `setuptools` and `wheel` (and w... — committed to benoit-pierre/setuptools by benoit-pierre 6 years ago
- fix PEP 518 configuration Add `build-system.requires` key to `pyproject.toml`: - this is necessary with pip 10.0.1, as otherwise the defaults will be to require both `setuptools` and `wheel` (and w... — committed to benoit-pierre/setuptools by benoit-pierre 6 years ago
My intent is to bring pip in line with the PEP. I like what @pfmoore proposes as a compromise since it seems a lot of tools have come to rely upon non-compliant pyproject.toml files now. It also gives users the opportunity to push to update PEP 518 if having the “build-system.requires” key is to be made optional.
As long as we come around to being in compliance with what the PEP says eventually (read by the end of this year) I’m happy. 😃
Okay then. With #5626 and #5627, we’re in compliance with PEP 518.
PEP 518 now allows packages to omit the
build-system
table entirely and pip is going to currently isolate when the table is missing – treating it the same as["setuptools", "wheel"]
and building it in isolation.It seems to me that it’s clear what we want to do here:
pyproject.toml
files without abuild-system.requires
are not valid per se; after a standard deprecation, we’ll start erroring out in that scenario./cc @brettcannon
@pradyunsg I agree. I’m not 100% clear what use cases there are for a
pyproject.toml
that doesn’t containbuild-system.requires
- the only one I’m aware of is that I think black usespyproject.toml
for configuration (which is allowed by PEP 518, but only with a compliantpyproject.toml
).If it’s just people using the “you can put project config in here” part of PEP 518 without following the full spec, I’m +1 on rejecting
pyproject.toml
if it doesn’t contain the mandatorybuild-system.requires
key. If people want to be able to do this, they should get the PEP updated first.And yes, it is pushy, but “please conform to the standards we took ages to define, when using a brand new file that never existed before the standard” seems like a perfectly OK point to be pushy on 😄