diff options
-rw-r--r-- | doc/Makefile | 4 | ||||
-rwxr-xr-x | doc/_getdoctarget.py | 16 | ||||
-rw-r--r-- | doc/conf.py | 10 | ||||
-rw-r--r-- | tox.ini | 2 |
4 files changed, 28 insertions, 4 deletions
diff --git a/doc/Makefile b/doc/Makefile index 4ffb98b..aae1962 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -12,6 +12,8 @@ PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . +SITETARGET=$(shell ./_getdoctarget.py) + .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest help: @@ -36,8 +38,10 @@ help: clean: -rm -rf $(BUILDDIR)/* + install: clean html @rsync -avz $(BUILDDIR)/html/ testrun.org:/www/testrun.org/tox/latest + @rsync -avz $(BUILDDIR)/html/ testrun.org:/www/testrun.org/tox/$(SITETARGET) #dev #latexpdf #@scp $(BUILDDIR)/latex/*.pdf testrun.org:www-tox/latest diff --git a/doc/_getdoctarget.py b/doc/_getdoctarget.py new file mode 100755 index 0000000..1199221 --- /dev/null +++ b/doc/_getdoctarget.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python + +import py + +def get_version_string(): + fn = py.path.local(__file__).join("..", "..", + "tox", "__init__.py") + for line in fn.readlines(): + if "version" in line and not line.strip().startswith('#'): + return eval(line.split("=")[-1]) + +def get_minor_version_string(): + return ".".join(get_version_string().split(".")[:2]) + +if __name__ == "__main__": + print (get_minor_version_string()) diff --git a/doc/conf.py b/doc/conf.py index 79857d7..6094f60 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -13,6 +13,13 @@ import sys, os +# The short X.Y version. +sys.path.insert(0, os.path.dirname(__file__)) +import _getdoctarget + +version = _getdoctarget.get_minor_version_string() +release = _getdoctarget.get_version_string() + # 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. @@ -47,9 +54,6 @@ copyright = u'2015, holger krekel and others' # |version| and |release|, also used in various other places throughout the # built documents. # -# The short X.Y version. -release = "2.2" -version = "2.2.0" # The full version, including alpha/beta/rc tags. # The language for content autogenerated by Sphinx. Refer to documentation @@ -1,5 +1,5 @@ [tox] -envlist=py27,py26,py34,py33,pypy,flakes,py26-bare +envlist=py27,py26,py34,py33,py35,pypy,flakes,py26-bare [testenv:X] commands=echo {posargs} |