Skip to content

Commit 7eebaa9

Browse files
committed
link setup.py version with sphinx
1 parent aec7319 commit 7eebaa9

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

doc/conf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# add these directories to sys.path here. If the directory is relative to the
1818
# documentation root, use os.path.abspath to make it absolute, like shown here.
1919
sys.path.insert(0, os.path.abspath('..'))
20+
from setup import kw
2021

2122
# -- General configuration -----------------------------------------------------
2223

@@ -47,10 +48,11 @@
4748
# |version| and |release|, also used in various other places throughout the
4849
# built documents.
4950
#
50-
# The short X.Y version.
51-
version = '0.1'
5251
# The full version, including alpha/beta/rc tags.
53-
release = '0.1.0'
52+
release = kw['version']
53+
54+
# The short X.Y version.
55+
version = release
5456

5557
# The language for content autogenerated by Sphinx. Refer to documentation
5658
# for a list of supported languages.

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,4 +127,5 @@ def run(self):
127127
kw['cmdclass']['develop'] = DevelopCommand
128128
kw['cmdclass']['bdist_egg'] = BdistEggCommand
129129

130-
setup(**kw)
130+
if __name__ == '__main__':
131+
setup(**kw)

0 commit comments

Comments
 (0)