from subprocess import run, PIPE, STDOUT
from distutils.version import StrictVersion
-(sphinx, src, dst) = sys.argv[1:] # assign parameters to variables
+(sphinx, version, src, dst) = sys.argv[1:] # assign parameters to variables
+
+# set the version in environment for sphinx to pick up
+os.environ['DPDK_VERSION'] = version
# for sphinx version >= 1.7 add parallelism using "-j auto"
ver = run([sphinx, '--version'], stdout=PIPE,
# Copyright(c) 2010-2015 Intel Corporation
from __future__ import print_function
-import subprocess
from docutils import nodes
from distutils.version import LooseVersion
from sphinx import __version__ as sphinx_version
html_show_copyright = False
highlight_language = 'none'
-# If MAKEFLAGS is exported by the user, garbage text might end up in version
-version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'],
- env=dict(environ, MAKEFLAGS=""))
-version = version.decode('utf-8').rstrip()
-release = version
+release = environ['DPDK_VERSION']
master_doc = 'index'
html_guides = custom_target('html_guides',
input: files('index.rst'),
output: 'html',
- command: [sphinx_wrapper, sphinx, meson.current_source_dir(), meson.current_build_dir()],
+ command: [sphinx_wrapper, sphinx, meson.project_version(),
+ meson.current_source_dir(), meson.current_build_dir()],
depfile: '.html.d',
build_by_default: get_option('enable_docs'),
install: get_option('enable_docs'),