File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ instead use ``pkg_resources`` after editable/real installation:
80
80
81
81
.. code :: python
82
82
83
+ # contents of docs/conf.py
83
84
from pkg_resources import get_distribution
84
85
release = get_distribution(' myproject' ).version
85
86
# for example take major/minor
@@ -284,12 +285,21 @@ The callable must return the configuration.
284
285
285
286
.. code :: python
286
287
288
+ # content of setup.py
289
+ import setuptools
290
+
287
291
def myversion ():
288
292
from setuptools_scm.version import get_local_dirty_tag
289
293
def clean_scheme (version ):
290
294
return get_local_dirty_tag(version) if version.dirty else ' +clean'
291
295
292
296
return {' local_scheme' : clean_scheme}
297
+
298
+ setup(
299
+ ... ,
300
+ use_scm_version = myversion,
301
+ ...
302
+ )
293
303
294
304
295
305
Code of Conduct
You can’t perform that action at this time.
0 commit comments