Skip to content

Commit 2a32499

Browse files
updated the __version__ description
1 parent 0598c69 commit 2a32499

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

source/single_source_version.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ One of the challenges in building packages is that the version string can be req
1212
* It needs to be specified when building the package (e.g. in :file:``pyproject.toml``)
1313
- That will assure that it is properly assigned in the distribution file name, and in the installed package.
1414

15-
* A package may, if the maintainers think it useful, to be able to determine the version of the package from Python code without relying on a package manager's metadata, set a top level ``__version__`` attribute.
16-
The value of ``__version__`` attribute and that passed to the build system can (and should) be kept in sync in :ref:`the build systems's recommended way <how_to_set_version_links>`.
15+
* A package may set a top level ``__version__`` attribute to provide runtime access to the version of the installed package. If this is done, the value of ``__version__`` attribute and that used by the build system to set the distribution's version should be kept in sync in :ref:`the build systems's recommended way <how_to_set_version_links>`.
1716

1817
In the cases where a package does not set a top level ``__version__`` attribute, the version may still be accessible using ``importlib.metadata.version("distribution_name")``.
1918

0 commit comments

Comments
 (0)