From fcfdc75f7418fb707b3c8324dd2a40e9f55a2297 Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Sat, 12 Mar 2016 11:49:02 +0100 Subject: [PATCH] Fix version issue with Sphinx (hopefully) --- docs/Makefile | 4 ++-- docs/README.txt | 6 +----- docs/conf.py | 13 ++++++++----- docs/man/glances.1 | 2 +- 4 files changed, 12 insertions(+), 13 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index f3825434..30485295 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -2,7 +2,7 @@ # # You can set these variables from the command line. -SPHINXOPTS = -D version=2.6 -D release=2.6_RC1 +SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = BUILDDIR = _build @@ -158,7 +158,7 @@ man: @echo "Build finished. The manual pages are in $(BUILDDIR)/man." rm -f man/* cp $(BUILDDIR)/man/* man/ - @echo "The manual page have been copied in ./man." + @echo "The manual pages have been copied in ./man." .PHONY: texinfo texinfo: diff --git a/docs/README.txt b/docs/README.txt index 045dfce2..c41f1a76 100644 --- a/docs/README.txt +++ b/docs/README.txt @@ -7,16 +7,12 @@ First install Sphinx: or update it if already installed: - pip install --upgrade shpinx + pip install --upgrade sphinx Go to the docs folder: cd docs -Edit the Makefile (line 5): - - SPHINXOPTS = -D version=2.6 -D release=2.6_RC1 - Then build the HTML documentation: make html diff --git a/docs/conf.py b/docs/conf.py index 2e7e81c6..46a8b11a 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,17 +12,20 @@ # All configuration values have a default; values that are commented out # serve to show the default. -# import sys -# import os +import sys +import os from datetime import datetime -from glances import __version__ - # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) +# Insert Glances' path into the system. +sys.path.append(os.path.abspath('..')) + +from glances import __version__ + # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. @@ -67,7 +70,7 @@ release = version # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +#language = None # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: diff --git a/docs/man/glances.1 b/docs/man/glances.1 index 0bd3228b..d84083f4 100644 --- a/docs/man/glances.1 +++ b/docs/man/glances.1 @@ -1,6 +1,6 @@ .\" Man page generated from reStructuredText. . -.TH "GLANCES" "1" "mars 12, 2016" "2.6" "Glances" +.TH "GLANCES" "1" "March 12, 2016" "2.6_RC1" "Glances" .SH NAME glances \- An eye on your system .