[spp] [PATCH] docs: fix version in guides
Thomas Monjalon
thomas at monjalon.net
Tue Dec 11 07:44:02 CET 2018
When building HTML guides, the type of the version string was wrong:
WARNING: The config value `version' has type `bytes', defaults to `str'.
WARNING: The config value `release' has type `bytes', defaults to `str'.
[...]
Exception occurred:
File "/usr/lib/python3.7/site-packages/sphinx/builders/html.py", line 479, in prepare_writing
release = return_codes_re.sub('', self.config.release),
TypeError: cannot use a string pattern on a bytes-like object
The version number is also updated to match the latest tag.
The option --no-print-directory is added to make showversion command,
so only the version number is printed in the doc.
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
---
GNUmakefile | 5 ++---
docs/guides/conf.py | 3 ++-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index 206a4c6..8984335 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2018 Nippon Telegraph and Telephone Corporation
-VERSION := 18.05.1
+VERSION := 18.08
ifneq ($(RTE_SDK),)
# Default target, can be overriden by command line or environment
@@ -16,8 +16,7 @@ endif
.PHONY: showversion
showversion:
- @set -- ;\
- printf $(VERSION);\
+ @echo $(VERSION)
# Compile RST documents
DOC_ROOT = docs/guides
diff --git a/docs/guides/conf.py b/docs/guides/conf.py
index c8d00b4..f7f0655 100644
--- a/docs/guides/conf.py
+++ b/docs/guides/conf.py
@@ -40,7 +40,8 @@ author = ''
# |version| and |release|, also used in various other places throughout the
# built documents.
-version = subprocess.check_output(['make', '-sRrC', '../../', 'showversion'])
+version = subprocess.check_output(['make', '-C', '../../',
+ '--no-print-directory', 'showversion']).decode('utf-8').rstrip()
# The full version, including alpha/beta/rc tags.
release = version
--
2.19.0
More information about the spp
mailing list