diff --git a/docs/conf.py b/docs/conf.py index cb7b896..e689425 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -16,6 +16,7 @@ import sys import os import shlex +import imp # 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 @@ -60,10 +61,21 @@ # |version| and |release|, also used in various other places throughout the # built documents. # +if sys.version_info.major == 2: + import imp + + pysox_version = imp.load_source('sox.version', + '../sox/version.py') +else: + from importlib.machinery import SourceFileLoader + + pysox_version = SourceFileLoader('sox.version', + '../sox/version.py').load_module() + # The short X.Y version. -version = '0.1' +version = pysox_version.short_version # The full version, including alpha/beta/rc tags. -release = '0.1' +release = pysox_version.version # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages.