summaryrefslogtreecommitdiff
path: root/doc/source/conf.py
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2015-07-05 22:06:22 +0300
committerIgor Pashev <pashev.igor@gmail.com>2015-07-05 22:06:22 +0300
commit622812485150fa7864910ee2f710d5aab2fa9e6d (patch)
treeb3bc4fd72bb80e74ba5a60d8b3d47e610dff012e /doc/source/conf.py
parent798846ab8337471998b0a4d796d6d409453faa7d (diff)
parentfdd173dd444098ed533cbcd541a7f10f228bc47e (diff)
downloadpython-apt-622812485150fa7864910ee2f710d5aab2fa9e6d.tar.gz
Merge git://anonscm.debian.org/apt/python-apt
Conflicts: debian/changelog python/apt_pkgmodule.cc
Diffstat (limited to 'doc/source/conf.py')
-rw-r--r--doc/source/conf.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 8fbf2c11..c4dde305 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -26,18 +26,16 @@ if os.path.exists("../../build"):
sys.path.insert(0, os.path.abspath(os.path.dirname(apt_pkg_path)))
try:
import apt_pkg
+ apt_pkg # pyflakes
except ImportError as exc:
# Not the correct version
sys.stderr.write('W: Ignoring error %s\n' % exc)
sys.path.pop(0)
else:
sys.stdout.write('I: Found apt_pkg.so in %s\n' % sys.path[0])
- # Hack: Disable compatibility mode
- apt_pkg._COMPAT_0_7 = 0
break
-
# General configuration
# ---------------------
@@ -69,7 +67,7 @@ copyright = u'2009-2010, Julian Andres Klode <jak@debian.org>'
#
try:
- release=os.environ['DEBVER']
+ release = os.environ['DEBVER']
except KeyError:
from subprocess import Popen, PIPE
p1 = Popen(["dpkg-parsechangelog", "-l../../debian/changelog"],
@@ -77,13 +75,15 @@ except KeyError:
p2 = Popen(["sed", "-n", 's/^Version: //p'], stdin=p1.stdout, stdout=PIPE)
release = p2.communicate()[0]
+if sys.version_info.major >= 3:
+ release = release.decode("utf-8")
# Handle the alpha release scheme
release_raw = "0"
for c in release.split("~")[0].split(".")[2]:
if not c.isdigit():
break
release_raw += c
-
+
if int(release_raw) >= 90:
version_s = release.split("~")[0].split(".")[:3]
# Set the version to 0.X.100 if the release is 0.X.9Y (0.7.90 => 0.7.100)
@@ -95,7 +95,7 @@ if int(release_raw) >= 90:
version = '.'.join(version_s)
del version_s
else:
- version = '.'.join(release.split("~")[0].split('.')[:3])
+ version = '.'.join(release.split("~")[0].split('.')[:2])
del release_raw
# The language for content autogenerated by Sphinx. Refer to documentation
@@ -164,7 +164,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 = None
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
@@ -213,8 +213,8 @@ 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 = [
- ('contents', 'python-apt.tex', ur'python-apt Documentation',
- ur'Julian Andres Klode <jak@debian.org>', 'manual'),
+ ('contents', 'python-apt.tex', u'python-apt Documentation',
+ u'Julian Andres Klode <jak@debian.org>', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of