File tree Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Expand file tree Collapse file tree 2 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 13
13
14
14
import setuptools
15
15
16
+
17
+ def local_scheme (version ):
18
+ """Generate a PEP440 compatible version if PEP440_VERSION is enabled"""
19
+ import os
20
+ import setuptools_scm .version # only present during setup time
21
+
22
+ return (
23
+ ''
24
+ if 'PEP440_VERSION' in os .environ
25
+ else setuptools_scm .version .get_local_node_and_date (version )
26
+ )
27
+
28
+
16
29
if __name__ == '__main__' :
17
- setuptools .setup (use_scm_version = True , setup_requires = ["setuptools_scm" ])
30
+ setuptools .setup (
31
+ use_scm_version = {'local_scheme' : local_scheme },
32
+ setup_requires = ["setuptools_scm" ],
33
+ )
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ commands=sphinx-build -W -b html doc/source doc/build
26
26
[testenv:packaging]
27
27
description = Validate project packaging
28
28
skip_install = true
29
+ setenv =
30
+ PEP440_VERSION =true
29
31
deps =
30
32
check-manifest
31
33
commands =
You can’t perform that action at this time.
0 commit comments