cloud-sql-python-connector icon indicating copy to clipboard operation
cloud-sql-python-connector copied to clipboard

Switch to using `pyproject.toml` over `setup.py` for package

Open jackwotherspoon opened this issue 1 year ago • 1 comments

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 avatar Jan 27 '24 22:01 jackwotherspoon

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

jackwotherspoon avatar Feb 15 '24 17:02 jackwotherspoon