Skip to content

Contradictions/Inconsistencies between packaging tutorial and guide #887

Done

Description

@primesun

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.

Activity

  1. added
    type: enhancement
    on Apr 27, 2021
  2. webknjaz commented on Apr 27, 2021

    @webknjaz
    Member

    Agreed. That sounds reasonable.

  3. henryiii commented on May 21, 2021

    @henryiii
    Contributor

    "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. :)

  4. webknjaz commented on May 21, 2021

    @webknjaz
    Member

    @henryiii do you have an issue or a PR link with the change? I don't recall seeing that.

  5. henryiii commented on May 21, 2021

    @henryiii
    Contributor

    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.

  6. pradyunsg commented on May 21, 2021

    @pradyunsg
    Member

    Note that this still doesn't cover non-setuptools build backends.

  7. henryiii commented on May 21, 2021

    @henryiii
    Contributor

    Well, the comment about setup.py being required is also for the setuptools backend. But yes, it's not editable PEP 517 support.

  8. bhrutledge commented on May 25, 2021

    @bhrutledge
    Contributor

    This seems related to #866 (specifically #866 (comment)).

  9. bhrutledge commented on May 26, 2021

    @bhrutledge
    Contributor

    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.

  10. bhrutledge commented on Jun 19, 2021

    @bhrutledge
    Contributor

    This feels related to #792.

  11. added
    type: bug
    and removed
    type: enhancement
    on Mar 19, 2022
  12. hugobuddel commented on Apr 30, 2023

    @hugobuddel

    "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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bug

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions