Skip to content

Commit 062d787

Browse files
committed
mention setuptools_scm in single_source_version.rst
1 parent 49bf76f commit 062d787

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

source/single_source_version.rst

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Single-sourcing the Project Version
55
===================================
66

77
:Page Status: Complete
8-
:Last Reviewed: 2015-09-08
8+
:Last Reviewed: 2015-12-03
99

1010

11-
There are a few techniques to store the version in your project code without duplicating the value stored in
12-
``setup.py``:
11+
There are many techniques to maintain a single source of truth for the version
12+
number of your project:
1313

1414
#. Read the file in ``setup.py`` and parse the version with a regex. Example (
1515
from `pip setup.py <https://github.com/pypa/pip/blob/1.5.6/setup.py#L33>`_)::
@@ -115,3 +115,8 @@ There are a few techniques to store the version in your project code without dup
115115
``sample/__init__.py`` imports packages from ``install_requires``
116116
dependencies, which will very likely not be installed yet when ``setup.py``
117117
is run.
118+
119+
120+
#. Keep the version number in the tags of a version control system (Git, Mercurial, etc)
121+
instead of in the code, and automatically extract it from there using
122+
`setuptools_scm <https://pypi.python.org/pypi/setuptools_scm>`_.

0 commit comments

Comments
 (0)