Skip to content

Commit 2f7630f

Browse files
committed
Use python3 to get version in doc building
1 parent 315c340 commit 2f7630f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

doc/source/conf.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,10 @@
5959
# built documents.
6060
#
6161
# The short X.Y version.
62-
version = subprocess.Popen(['sh', '-c', 'cd ../..; python setup.py --version'],
63-
stdout=subprocess.PIPE).stdout.read().decode()
64-
version = version.strip()
62+
version = subprocess.check_output(
63+
['python3', 'setup.py', '--version'],
64+
cwd=os.path.join(os.path.dirname(__file__), os.pardir, os.pardir),
65+
).decode().strip()
6566
# The full version, including alpha/beta/rc tags.
6667
release = version
6768

0 commit comments

Comments
 (0)