Contradictions/Inconsistencies between packaging tutorial and guide
Page 1: Packaging Python Projects Page 2: Packaging and distributing projects
The first states
"setup.py # optional, needed to make editable pip installs work"
The second states
"The most important file is setup.py which exists at the root of your project directory."
The first mentions pyproject.toml, whereas the second doesn't mention it at all.
I know that one's a "tutorial" and the other is a "guide", and the website states that guides have more detailed information. In this case it appears there's some detail in the tutorial that isn't in the guide.
Agreed. That sounds reasonable.
"needed to make editable pip installs work" is actually not true anymore since the most recent pip release. Unless you are on an old Python unsupported by the most recent pip release. :)
@henryiii do you have an issue or a PR link with the change? I don't recall seeing that.
Either https://pip.pypa.io/en/stable/news/#v21-1 (under features, can't really link to the header because they are auto-generated, so identical for all versions) or https://github.com/pypa/pip/pull/9547.
Note that this still doesn't cover non-setuptools build backends.
Well, the comment about setup.py being required is also for the setuptools backend. But yes, it's not editable PEP 517 support.
This seems related to #866 (specifically https://github.com/pypa/packaging.python.org/issues/866#issuecomment-845951158).
Also, rather than update https://packaging.python.org/guides/distributing-packages-using-setuptools/, could it be replaced with links to the setuptools docs? They've seen some dramatic improvements.
This feels related to https://github.com/pypa/packaging.python.org/issues/792.
"needed to make editable pip installs work" is actually not true anymore since the most recent pip release. Unless you are on an old Python unsupported by the most recent pip release. :)
For whoever also wanted to know what "old Python" and "most recent pip" mean: the current sample project (https://github.com/pypa/sampleproject/commit/fc8d83efd5749853507be959d858629d0aaf5c6e), which has no setup.py, does install with pip install -e . for pip 21.3.1 and Python 3.7, but not with the older pip 21.3 or Python 3.6.
Since Python 3.6 is end of life, all currently supported Python versions support a recent enough pip, and thus editable pip installs sans setup.py should work on all currently supported systems. This was not true at the time the parent comment was written, since Python 3.6 was still supported then. So to me there seems to be no reason anymore to include a setup.py.
The guide should be updated, because it still refers to setup.py in the sample project, see #1184.