File tree 1 file changed +14
-4
lines changed
1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change 11
11
# All configuration values have a default; values that are commented out
12
12
# serve to show the default.
13
13
14
- import sys , os
14
+ import os
15
+ import re
16
+ import sys
17
+
18
+ # Path to this project
19
+ project_path = os .path .join (os .path .dirname (__file__ ), '..' )
15
20
16
21
# If extensions (or modules to document with autodoc) are in another directory,
17
22
# add these directories to sys.path here. If the directory is relative to the
18
23
# documentation root, use os.path.abspath to make it absolute, like shown here.
19
- # sys.path.insert(0, os.path.abspath('.') )
24
+ sys .path .insert (0 , project_path )
20
25
21
26
# -- General configuration -----------------------------------------------------
22
27
48
53
# built documents.
49
54
#
50
55
# The short X.Y version.
51
- version = 'TODO'
56
+ # Read the version from bigml.__version__ without importing the package
57
+ # (and thus attempting to import packages it depends on that may not be
58
+ # installed yet).
59
+ init_py_path = os .path .join (project_path , 'bigml' , '__init__.py' )
60
+ version = re .search ("__version__ = '([^']+)'" ,
61
+ open (init_py_path ).read ()).group (1 )
52
62
# The full version, including alpha/beta/rc tags.
53
- release = 'TODO'
63
+ release = version
54
64
55
65
# The language for content autogenerated by Sphinx. Refer to documentation
56
66
# for a list of supported languages.
You can’t perform that action at this time.
0 commit comments