DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version
@ 2020-11-19 10:41 Anatoly Burakov
  2020-11-19 11:24 ` Bruce Richardson
  2020-11-20  9:19 ` David Marchand
  0 siblings, 2 replies; 8+ messages in thread
From: Anatoly Burakov @ 2020-11-19 10:41 UTC (permalink / raw)
  To: dev; +Cc: thomas, bruce.richardson

Currently, when building sphinx documentation, the build will only
succeed if being run from the build system, because the conf.py script
expects DPDK_VERSION environment variable to be set, and crashes if it
is not.

However, there are certain external tools (such as sphinx documentation
preview extensions for certain IDE's) that use live preview and thus
rely on running their own sphinx commands. In these cases, it is useful
to permit building sphinx documentation without specifying the
DPDK_VERSION environment variable. The version string is the only thing
preventing manual sphinx build commands from working.

Fix the conf.py to use "None" as a version string in cases when
DPDK_VERSION environment variable is not set.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
---
 doc/guides/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 9de490e1c4..aceeb62a4f 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -36,7 +36,7 @@
 html_show_copyright = False
 highlight_language = 'none'
 
-release = environ['DPDK_VERSION']
+release = environ.setdefault('DPDK_VERSION', "None")
 version = release
 
 master_doc = 'index'
-- 
2.17.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-11-20  9:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-19 10:41 [dpdk-dev] [PATCH] doc: allow sphinx build with no DPDK version Anatoly Burakov
2020-11-19 11:24 ` Bruce Richardson
2020-11-19 11:44   ` Burakov, Anatoly
2020-11-19 11:48     ` Bruce Richardson
2020-11-19 12:03       ` Burakov, Anatoly
2020-11-19 12:22         ` Bruce Richardson
2020-11-19 14:11           ` Thomas Monjalon
2020-11-20  9:19 ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).