Skip to content

Commit

Permalink
fix: Add a dynamic version attribute for the setuptools build-backe…
Browse files Browse the repository at this point in the history
…nd (#188)

The template for the setuptools build-backend had an issue where the project version was declared as a dynamic attribute but the associated pyproject.toml file did not contain a [tool.setuptools.dynamic] TOML table. This caused the version to be returned as 0.0.0, instead of the correct version being read from the specified file.
  • Loading branch information
agriyakhetarpal authored Nov 13, 2023
1 parent 7ab065e commit 21fa953
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ dependencies = [
{% endif %}
]

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

[project.urls]
Homepage = "{{ cookiecutter.project_url }}"
"Bug Tracker" = "{{ cookiecutter.project_url }}/issues"
Expand Down

0 comments on commit 21fa953

Please sign in to comment.