summaryrefslogtreecommitdiff
path: root/doc/source/conf.py
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2009-07-23 21:42:17 +0200
committerJulian Andres Klode <jak@debian.org>2009-07-23 21:42:17 +0200
commitd8c0ca6ff164f79910b315c9525fa77417084edf (patch)
tree68fb49f5b69c3c3c2163a9f8049496774375a45a /doc/source/conf.py
parent22d8199e2d047dc6b258241cf33e67d77aa33ca6 (diff)
downloadpython-apt-d8c0ca6ff164f79910b315c9525fa77417084edf.tar.gz
doc/source: Big documentation reorganisation.
Due to the new C++ API and because I wanted to include some tutorials, the documentation is now seperated into 4 sections: library => Documentation of modules. tutorials => Tutorials for using python-apt and contributing whatsnew => Release notes c++ => Documentation,Tutorials for the C++ API This commit also includes a new overview page, like the Python documentation.
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r--doc/source/conf.py31
1 files changed, 20 insertions, 11 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 86e6868c..0a9d5ed5 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -54,7 +54,7 @@ extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest',
intersphinx_mapping = {'http://docs.python.org/': None}
# Add any paths that contain templates here, relative to this directory.
-templates_path = ['.templates']
+templates_path = ['templates']
# The suffix of source filenames.
source_suffix = '.rst'
@@ -63,7 +63,7 @@ source_suffix = '.rst'
#source_encoding = 'utf-8'
# The master toctree document.
-master_doc = 'index'
+#master_doc = 'contents'
# General information about the project.
project = u'python-apt'
@@ -77,12 +77,21 @@ copyright = u'2009, Julian Andres Klode <jak@debian.org>'
try:
release=os.environ['DEBVER']
except KeyError:
- from debian_bundle.changelog import Changelog
- changes = Changelog(open('../../debian/changelog'))
- # The full version, including alpha/beta/rc tags.
- release = changes.full_version
-
-version = '.'.join(release.split('.')[:3])
+ from subprocess import Popen, PIPE
+ p1 = Popen(["dpkg-parsechangelog", "-l../../debian/changelog"],
+ stdout=PIPE)
+ p2 = Popen(["sed", "-n", 's/^Version: //p'], stdin=p1.stdout, stdout=PIPE)
+ release = p2.communicate()[0]
+
+# Handle the alpha release scheme.
+if int(release.split("~")[0].split(".")[2]) >= 90:
+ version_s = release.split("~")[0].split(".")[:3]
+ version_s[1] = str(int(version_s[1]) + 1)
+ version_s[2] = "0"
+ version = '.'.join(version_s)
+ del version_s
+else:
+ version = '.'.join(release.split("~")[0].split('.')[:3])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -150,7 +159,7 @@ html_static_path = ['.static']
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
-#html_last_updated_fmt = '%b %d, %Y'
+html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
@@ -161,7 +170,7 @@ html_static_path = ['.static']
# Additional templates that should be rendered to pages, maps page names to
# template names.
-#html_additional_pages = {}
+html_additional_pages = {"index": "indexcontent.html"}
# If false, no module index is generated.
#html_use_modindex = True
@@ -199,7 +208,7 @@ htmlhelp_basename = 'python-aptdoc'
# Grouping the document tree into LaTeX files. List of tuples
# (source index, target name, title, author, document class [howto/manual]).
latex_documents = [
- ('index', 'python-apt.tex', ur'python-apt Documentation',
+ ('contents', 'python-apt.tex', ur'python-apt Documentation',
ur'Julian Andres Klode <jak@debian.org>', 'manual'),
]