From fa9fda6e2ca47e4ddd80f4de143adfd535f1cf55 Mon Sep 17 00:00:00 2001 From: Andy Wilson Date: Fri, 25 Sep 2015 10:08:52 -0500 Subject: [PATCH] updated changelog --- CHANGELOG.rst | 5 +++++ doc/conf.py | 18 +++++++++++++----- doc/index.rst | 2 +- setup.py | 2 +- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e92a0fd..04c06fd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ Trep Changelog ============== +v1.0.2 (2015-09-25) +------------------- +* Renamed src/ folder to trep/ following convention [#33](https://github.com/MurpheyLab/trep/issues/33) +* Updated documentation theme to RTD template + v1.0.1 (2015-05-04) ------------------- * Method added to get trep include path [#31](https://github.com/MurpheyLab/trep/issues/31) diff --git a/doc/conf.py b/doc/conf.py index c1d625b..a5d58d0 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -23,6 +23,9 @@ # If your documentation needs a minimal Sphinx version, state it here. #needs_sphinx = '1.0' +# on_rtd is whether we are on readthedocs.org +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + # Add any Sphinx extension module names here, as strings. They can be extensions # coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ @@ -60,7 +63,12 @@ class GitError(StandardError): pass def get_version_from_git(): try: - p = subprocess.Popen(["git", "describe", "--dirty", "--always"], + if on_rtd: + p = subprocess.Popen(["git", "describe", "--always"], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + else: + p = subprocess.Popen(["git", "describe", "--dirty", "--always"], stdout=subprocess.PIPE, stderr=subprocess.PIPE) except EnvironmentError as e: @@ -150,12 +158,12 @@ def get_commit_date(): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -# on_rtd is whether we are on readthedocs.org -import os -on_rtd = os.environ.get('READTHEDOCS', None) == 'True' if not on_rtd: # only import and set the theme if we're building docs locally - import sphinx_rtd_theme + try: + import sphinx_rtd_theme + except ImportError: + print "\033[93mPlease install sphinx_rtd_theme from pip!\033[0m" html_theme = 'sphinx_rtd_theme' html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] else: diff --git a/doc/index.rst b/doc/index.rst index c0ae029..247acc4 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -31,7 +31,7 @@ If you have any questions or suggestions, please head over to our .. toctree:: :hidden: - Project Homepage + Project Homepage .. _api-ref: diff --git a/setup.py b/setup.py index 520f676..a0f7692 100755 --- a/setup.py +++ b/setup.py @@ -124,7 +124,7 @@ def get_approx_version(): cmd_class['build_sphinx'] = BuildDoc # See docstring for BuildDoc on how to set default options here. except ImportError: - pass + print "Note: Sphinx must be installed to build documentation" ext_modules = []