From a1c19f8389aa5135330042c72df36e603c1645db Mon Sep 17 00:00:00 2001 From: "Adam J. Stewart" Date: Thu, 19 Oct 2017 02:26:04 -0500 Subject: [PATCH] Allow documentation to build in Python 3 (#5736) --- lib/spack/docs/conf.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/spack/docs/conf.py b/lib/spack/docs/conf.py index b27a3a5538..9b4101fdfe 100644 --- a/lib/spack/docs/conf.py +++ b/lib/spack/docs/conf.py @@ -61,11 +61,6 @@ os.environ['SPACK_ROOT'] = spack_root os.environ['PATH'] += '%s%s/bin' % (os.pathsep, spack_root) -# Get the spack version for use in the docs -spack_version = subprocess.Popen( - [spack_root + '/bin/spack', '-V'], - stderr=subprocess.PIPE).communicate()[1].strip().split('.') - # Set an environment variable so that colify will print output like it would to # a terminal. os.environ['COLIFY_SIZE'] = '25x120' @@ -192,9 +187,9 @@ def setup(sphinx): # built documents. # # The short X.Y version. -version = '.'.join(spack_version[:2]) +version = str(spack.spack_version.up_to(2)) # The full version, including alpha/beta/rc tags. -release = '.'.join(spack_version[:2]) +release = str(spack.spack_version.up_to(2)) # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.