[PATCH] Documentation: Provide default values for version/release

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Provide default values for version/release so it would be possible to
run Sphinx outside of the build system. Useful for rst-sphinx backend
of flycheck in Emacs, for example.

Signed-off-by: Andrey Smirnov <andrew.smirnov@xxxxxxxxx>
---
 Documentation/conf.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/conf.py b/Documentation/conf.py
index ec6ec0470b..bcd8633c91 100644
--- a/Documentation/conf.py
+++ b/Documentation/conf.py
@@ -53,9 +53,9 @@ copyright = u'2014, The barebox project'
 # The short X.Y version.
 import os
 
-version = os.environ["KERNELVERSION"]
+version = os.environ.get("KERNELVERSION", 'unknown version')
 # The full version, including alpha/beta/rc tags.
-release = os.environ["KERNELRELEASE"]
+release = os.environ.get("KERNELRELEASE", 'unknown release')
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
-- 
2.21.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux