File tree Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Expand file tree Collapse file tree 1 file changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -36,13 +36,12 @@ version_file = "pkg/_version.py"
36
36
Where `` pkg `` is the name of your package.
37
37
38
38
39
- .. code-block:: shell
40
-
41
- $ python -m setuptools_scm
42
-
43
- # To explore other options, try:
44
- $ python -m setuptools_scm --help
39
+ ``` commandline
40
+ $ python -m setuptools_scm
45
41
42
+ # To explore other options, try:
43
+ $ python -m setuptools_scm --help
44
+ ```
46
45
47
46
## as cli tool
48
47
@@ -104,9 +103,9 @@ version = get_version(root='..', relative_to=__file__)
104
103
### version at runtime
105
104
106
105
If you have opted not to hardcode the version number inside the package,
107
- you can retrieve it at runtime from PEP-0566 _ metadata using
106
+ you can retrieve it at runtime from [ PEP-0566 ] ( https://www.python.org/dev/peps/pep-0566/ ) metadata using
108
107
`` importlib.metadata `` from the standard library (added in Python 3.8)
109
- or the ` importlib_metadata ` _ backport:
108
+ or the [ ` importlib_metadata ` ] ( https://pypi.org/project/importlib-metadata/ ) backport:
110
109
111
110
``` python
112
111
# contents of package_name/__init__.py
@@ -119,9 +118,6 @@ except PackageNotFoundError:
119
118
pass
120
119
```
121
120
122
- .. _ PEP-0566: https://www.python.org/dev/peps/pep-0566/
123
- .. _ importlib_metadata: https://pypi.org/project/importlib-metadata/
124
-
125
121
126
122
### Usage from Sphinx
127
123
You can’t perform that action at this time.
0 commit comments