File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change 14
14
15
15
import datetime
16
16
17
- import virtualenvwrapper .version
17
+ # Try to import the version from our package, but if that fails
18
+ # because of the way the RTD build works fall back to at least using
19
+ # the git tag information.
20
+ try :
21
+ from virtualenvwrapper .version import version
22
+ except ImportError :
23
+ import subprocess
24
+ p = subprocess .run (['git' , 'describe' ], stdout = subprocess .PIPE )
25
+ version = p .stdout .decode ('utf-8' ).strip ()
18
26
19
27
# If extensions (or modules to document with autodoc) are in another directory,
20
28
# add these directories to sys.path here. If the directory is relative to the
52
60
# built documents.
53
61
#
54
62
# The short X.Y version.
55
- version = virtualenvwrapper . version . version
63
+ # version = "SEE IMPORTS ABOVE"
56
64
# The full version, including alpha/beta/rc tags.
57
65
release = version
58
66
You can’t perform that action at this time.
0 commit comments