We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ffef94d + 9c727ee commit b84d2a4Copy full SHA for b84d2a4
README.rst
@@ -31,6 +31,19 @@ To use setuptools_scm just modify your project's setup.py file like this:
31
...,
32
)
33
34
+3. Access the version number in your package via :code:`pkg_resources`
35
+
36
+ E.g. (`PEP-0396 <https://www.python.org/dev/peps/pep-0396>`_):
37
38
+ .. code:: python
39
40
+ from pkg_resources import get_distribution, DistributionNotFound
41
+ try:
42
+ __version__ = get_distribution(__name__).version
43
+ except DistributionNotFound:
44
+ # package is not installed
45
+ pass
46
47
48
Programmatic usage
49
------------------
0 commit comments