You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Contradictions/Inconsistencies between packaging tutorial and guide #887
"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.
Reacted by 5j9, cdfarrow, Jérome Perrin and Juan Luis Cano Rodríguez
"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. :)
"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 (pypa/sampleproject@fc8d83e), 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.
Activity
webknjaz commentedon Apr 27, 2021
Agreed. That sounds reasonable.
henryiii commentedon May 21, 2021
"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. :)
webknjaz commentedon May 21, 2021
@henryiii do you have an issue or a PR link with the change? I don't recall seeing that.
henryiii commentedon May 21, 2021
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 pypa/pip#9547.
pradyunsg commentedon May 21, 2021
Note that this still doesn't cover non-setuptools build backends.
henryiii commentedon May 21, 2021
Well, the comment about setup.py being required is also for the setuptools backend. But yes, it's not editable PEP 517 support.
bhrutledge commentedon May 25, 2021
This seems related to #866 (specifically #866 (comment)).
bhrutledge commentedon May 26, 2021
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.
bhrutledge commentedon Jun 19, 2021
This feels related to #792.
hugobuddel commentedon Apr 30, 2023
For whoever also wanted to know what "old Python" and "most recent pip" mean: the current sample project (pypa/sampleproject@fc8d83e), which has no
setup.py, does install withpip 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.pyshould 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 asetup.py.The guide should be updated, because it still refers to
setup.pyin the sample project, see #1184.Retire outdated setuptools packaging guide