Skip to content

Commit e4f80b9

Browse files
Merge pull request #244 from pypa/RonnyPfannschmidt-patch-1
enhance documentation for sphinx usage
2 parents b93a511 + cce58be commit e4f80b9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ instead use ``pkg_resources`` after editable/real installation:
8080

8181
.. code:: python
8282
83+
# contents of docs/conf.py
8384
from pkg_resources import get_distribution
8485
release = get_distribution('myproject').version
8586
# for example take major/minor
@@ -284,12 +285,21 @@ The callable must return the configuration.
284285

285286
.. code:: python
286287
288+
# content of setup.py
289+
import setuptools
290+
287291
def myversion():
288292
from setuptools_scm.version import get_local_dirty_tag
289293
def clean_scheme(version):
290294
return get_local_dirty_tag(version) if version.dirty else '+clean'
291295
292296
return {'local_scheme': clean_scheme}
297+
298+
setup(
299+
...,
300+
use_scm_version=myversion,
301+
...
302+
)
293303
294304
295305
Code of Conduct

0 commit comments

Comments
 (0)