On 27 June 2018 at 22:09, Pradyun Gedam firstname.lastname@example.org wrote:
On Wed, Jun 27, 2018 at 9:15 PM Paul Moore email@example.com wrote:
On 27 June 2018 at 15:59, Pradyun Gedam firstname.lastname@example.org wrote:
Assuming we are going to disallow missing build-requires, I think a better way for this would be to allow a user to override build-requires on a per-package basis. It'd be a more verbose and also clearer about which packages are needing some sort of work-around to install, pushing packages to just directly specify build-requires in future releases.
- Project has pyproject.toml with build-system.requires specified. No
problem, full PEP 518 behaviour (and pip uses build isolation). 2. Project has pyproject.toml but no build-system.requires, Illegal, confirmed by this discussion, so terminate with an error (pip currenly warns, but will move to an error after a deprecation period). 3. Project has no pyproject.toml. Old-style project, PEP 518 says that the default is [setuptools, wheel]. Pip will actually use the legacy (no build isolation) code path, which is a backward compatibility choice. I'm not actually sure PEP 518 needs to even comment on this case, as such projects clearly don't conform to that PEP and tools like pip will of necessity have to handle them as "legacy".
The only case where I can see your "per-package overrides" fitting in would be (3), which is outside the scope of PEP 518 and so really a pip-only issue.
I am suggesting it for (2).
But Brett clearly stated that he views PEP 518 as stating that the build-system.requires key in pyproject.toml is *not* optional. And I think that's the correct reading of the PEP.
Projects that want to use pyproject.toml for tool settings can, and should, just set build-system.requires (presumably to ['setuptools', 'wheel'] as they obviously don't need a non-default value).
I'll elaborate on the tracker.
OK. But I'm going to take the view that having explicitly requested clarification on distutils-sig, if we want to do anything other than reject a pyproject.toml with a missing build-system.requires as invalid, we need to first of all get the PEP changed. And for that we'll have to have a good use case to justify the change. Personally, I don't see the value.
This is already a feature request for pip for a different use case and I think it's a reasonable request.
What's the issue number? I don't recall seeing anything like this.
I found that discussion confusing at the time, and on rereading I don't think my view has changed :-(
I'm going to be offline for a week or two, but if you do raise a tracker item, I'll pick it up once I return. Paul