Skip to content

Commit

Permalink
change VERSION to __version__ in the example (#4590)
Browse files Browse the repository at this point in the history
change VERSION to __Version__ in the example

change string, list or tuple to "string" -- in the footnote about attr -- it is only referenced by dynamic version -- and the version should only be a string (PEP 440).

---------

Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
  • Loading branch information
ChrisBarker-NOAA and abravalheri authored Aug 27, 2024
1 parent e30a556 commit 5c829ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/userguide/pyproject_config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ corresponding entry is required in the ``tool.setuptools.dynamic`` table
dynamic = ["version", "readme"]
# ...
[tool.setuptools.dynamic]
version = {attr = "my_package.VERSION"}
version = {attr = "my_package.__version__"} # any module attribute compatible with ast.literal_eval
readme = {file = ["README.rst", "USAGE.rst"]}
In the ``dynamic`` table, the ``attr`` directive [#directives]_ will read an
Expand Down Expand Up @@ -280,7 +280,7 @@ not installed yet. You may also need to manually add the project directory to
directive for ``tool.setuptools.dynamic.version``.

.. [#attr] ``attr`` is meant to be used when the module attribute is statically
specified (e.g. as a string, list or tuple). As a rule of thumb, the
specified (e.g. as a string). As a rule of thumb, the
attribute should be able to be parsed with :func:`ast.literal_eval`, and
should not be modified or re-assigned.

Expand Down

0 comments on commit 5c829ac

Please sign in to comment.