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

Switch to using pyproject.toml over setup.py for package #989

Open
jackwotherspoon opened this issue Jan 27, 2024 · 1 comment
Open

Switch to using pyproject.toml over setup.py for package #989

jackwotherspoon opened this issue Jan 27, 2024 · 1 comment
Assignees
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.

Comments

@jackwotherspoon
Copy link
Collaborator

Nowadays it is recommended to package python libraries using pyproject.toml over setup.py

This comes with the added benefit of having all configuration in one file, so the removal of mypy.ini, pytest.ini etc etc.

@jackwotherspoon jackwotherspoon added type: cleanup An internal cleanup or hygiene concern. priority: p2 Moderately-important priority. Fix may not be included in next release. labels Jan 27, 2024
@jackwotherspoon jackwotherspoon self-assigned this Jan 27, 2024
@jackwotherspoon
Copy link
Collaborator Author

To keep version in version.py for release-please and user agent config:

[project]
name = "package"
dynamic = ["version"]

[tool.setuptools.dynamic]
version = {attr = "package.__version__"}

ref: https://packaging.python.org/en/latest/guides/single-sourcing-package-version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p2 Moderately-important priority. Fix may not be included in next release. type: cleanup An internal cleanup or hygiene concern.
Projects
None yet
Development

No branches or pull requests

1 participant