Modified documentation configuration to search for build specific to Python version. Updated copyright. First attempt at using llvm._version to set documentation version.
This commit is contained in:
parent
cada51e297
commit
894539681b
1 changed files with 14 additions and 7 deletions
|
|
@ -21,9 +21,10 @@ import sys, os, glob
|
||||||
# Support sphinx.ext.autodoc to extract docstrings from modules without installing
|
# Support sphinx.ext.autodoc to extract docstrings from modules without installing
|
||||||
# complete package.
|
# complete package.
|
||||||
# The python modules depend on _core, so we must build entire package first though.
|
# The python modules depend on _core, so we must build entire package first though.
|
||||||
built_lib = glob.glob('../../build/lib.*/')
|
built_lib = glob.glob('../../build/lib.*-%d.%d/' % sys.version_info[:2])
|
||||||
if not built_lib:
|
if not built_lib:
|
||||||
print "WARNING: To build complete documentation you must build package first"
|
sys.stderr.write("WARNING: To build complete documentation you must build "
|
||||||
|
"package first\n")
|
||||||
else:
|
else:
|
||||||
# lib dir has platform suffix
|
# lib dir has platform suffix
|
||||||
sys.path.insert(0, os.path.abspath(built_lib[0]))
|
sys.path.insert(0, os.path.abspath(built_lib[0]))
|
||||||
|
|
@ -51,16 +52,22 @@ master_doc = 'index'
|
||||||
|
|
||||||
# General information about the project.
|
# General information about the project.
|
||||||
project = u'llvmpy'
|
project = u'llvmpy'
|
||||||
copyright = u'2012, Mahadevan R (2008-2010), Continuum Analytics (2012)'
|
copyright = u'2013, Mahadevan R (2008-2010), Continuum Analytics (2012-2013)'
|
||||||
|
|
||||||
# The version info for the project you're documenting, acts as replacement for
|
# The version info for the project you're documenting, acts as replacement for
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
try:
|
||||||
version = '0.9'
|
import llvm
|
||||||
# The full version, including alpha/beta/rc tags.
|
version_strs = llvm.__version__.split('.')
|
||||||
release = '0.9.0'
|
# The short X.Y version.
|
||||||
|
version = '.'.join(version_strs[:2])
|
||||||
|
# The full version, including alpha/beta/rc tags.
|
||||||
|
release = '%s.%s' % (version, '-'.join(version_strs[2].split('-')[:2]))
|
||||||
|
except ImportError:
|
||||||
|
version = 'unknown-version'
|
||||||
|
release = 'unknown-release'
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue