Skip to content

Guide for "Single sourcing the package version" refers to setup.pyΒ #1260

@venthur

Description

@venthur

https://packaging.python.org/en/latest/guides/single-sourcing-package-version/ refers to setup.py and the many ways how to get the version into setup.py. pyproject.toml is mentioned only as a side note.

Since setup.py is deprecated in favour of pyproject.toml, I wonder what to do with this document. Single sourcing the version should be a non-issue. We could either strip the whole document down to pyproject.toml which would make the document very small, or move the relevant paragraph into the packaging tutorial:

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions