Skip to content

Is it time to update the packaging tutorial to remove setup.py and setup.cfg #1084

Closed

Description

@venthur

The tutorial still mentions that either have to use setup.py or setup.cfg to store your metadata.

Configuring metadata

There are two types of metadata: static and dynamic.

Static metadata (setup.cfg): guaranteed to be the same every time. This is simpler, easier to read, and avoids many common errors, like encoding errors.

Dynamic metadata (setup.py): possibly non-deterministic. Any items that are dynamic or determined at install-time, as well as extension modules or extensions to setuptools, need to go into setup.py.

Static metadata (setup.cfg) should be preferred. Dynamic metadata (setup.py) should be used only as an escape hatch when absolutely necessary. setup.py used to be required, but can be omitted with newer versions of setuptools and pip.

I believe this is not true anymore and all of those can now be stored in pyproject.yaml. I wonder if this can be fixed now or if there's a timeline or a required milestone before setup.py and setup.cfg can be removed in favour for pyproject.toml.

Activity

  1. linked a pull request that will close this issuefeat: add PEP 621 config only #1031on May 31, 2022
  2. bhrutledge commented on May 31, 2022

    @bhrutledge
    Contributor

    I asked for confirmation in pypa/setuptools#2671 (comment), but my understanding is that it is okay to just use pyproject.toml for core metadata (with the caveat that more complex configurations are still experimental or unsupported).

  3. added
    type: discussion
    on Jun 18, 2022
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

    component: tutorialstype: discussion

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions