From 8b3419b0a9d826d3bae86d42a6a6d1ceafededae Mon Sep 17 00:00:00 2001 From: Gregory Haynes Date: Mon, 20 Jun 2016 18:36:42 -0700 Subject: [PATCH] Fix sphinx-build to not depend on diskimage-builder Currently, running sphinx_build fails for us because we depend on diskimage-builder in our sphinx conf.py. This causes doc generation on sites like rtfd to fail unless they install the diskimage-builder module beforehand. We can, alternatively, import pbr directly and not require the module as part of doc generation. Change-Id: I41f222ff9c67950fc30841935a6a603f5718395e --- doc/source/conf.py | 8 +++++--- requirements.txt | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 253ea2244..cc04f6b0b 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -27,11 +27,13 @@ copyright = u'2015, OpenStack Foundation' # built documents. # -from diskimage_builder import version as dib_version +import pbr.version + +version_info = pbr.version.VersionInfo('diskimage-builder') # The short X.Y version. -release = dib_version.version_info.release_string() +release = version_info.release_string() # The full version, including alpha/beta/rc tags. -version = dib_version.version_info.version_string() +version = version_info.version_string() # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/requirements.txt b/requirements.txt index dbfbdb01f..f2333c0bd 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,3 +7,4 @@ pbr>=1.6 # Apache-2.0 PyYAML>=3.1.0 # MIT flake8<2.6.0,>=2.5.4 # MIT six>=1.9.0 # MIT +oslosphinx>=2.5.0,!=3.4.0 # Apache-2.0