Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
venthur opened this issue May 31, 2022 · 1 comment · Fixed by #1031
Closed

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

venthur opened this issue May 31, 2022 · 1 comment · Fixed by #1031
Labels
component: tutorials type: discussion Discussion of general ideas, design, etc.

Comments

@venthur
Copy link
Contributor

venthur commented May 31, 2022

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.

@bhrutledge
Copy link
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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tutorials type: discussion Discussion of general ideas, design, etc.
Projects
None yet
3 participants