File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ test: build
11
11
sdist :
12
12
$(PYTHON ) setup.py sdist
13
13
14
- doc-html :
14
+ doc-html : .version
15
15
$(MAKE ) -C doc html
16
16
17
17
clean :
@@ -28,5 +28,7 @@ distclean: clean
28
28
rm -rf pytest_dependency.egg-info
29
29
$(MAKE ) -C doc distclean
30
30
31
+ .version :
32
+ $(PYTHON ) setup.py check
31
33
32
34
.PHONY : build test sdist doc-html clean distclean
Original file line number Diff line number Diff line change 12
12
import sys , os
13
13
import os .path
14
14
15
- # Add the top source directory to the module path . This file is
16
- # exec'ed with its directory as cwd. This is "doc/src" relativ to the
17
- # top source directory. So we need to go 2 dirs up.
18
- sys . path . insert ( 0 , os .path .dirname (os .path .dirname (os .getcwd () )))
15
+ # The top source directory. This file is exec'ed with its directory
16
+ # as cwd. This is "doc/src" relativ to the top source directory. So
17
+ # we need to go 2 dirs up.
18
+ topdir = os .path .dirname (os .path .dirname (os .getcwd ()))
19
19
20
20
# If extensions (or modules to document with autodoc) are in another directory,
21
21
# add these directories to sys.path here. If the directory is relative to the
50
50
# The version info for the project you're documenting, acts as replacement for
51
51
# |version| and |release|, also used in various other places throughout the
52
52
# built documents.
53
- #
54
- # The short X.Y version.
55
- version = '0.4'
56
- # The full version, including alpha/beta/rc tags.
57
- release = '0.4.0'
53
+ with open (os .path .join (topdir , ".version" ), "rt" ) as f :
54
+ release = f .read ()
55
+ version = "." .join (release .split ("." )[0 :2 ])
58
56
59
57
# The language for content autogenerated by Sphinx. Refer to documentation
60
58
# for a list of supported languages.
You can’t perform that action at this time.
0 commit comments