]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Make docs build python3-compatible 790/head
authorRobbie Harwood <rharwood@redhat.com>
Wed, 13 Jun 2018 19:07:48 +0000 (15:07 -0400)
committerGreg Hudson <ghudson@mit.edu>
Thu, 14 Jun 2018 00:57:55 +0000 (20:57 -0400)
python3 removed execfile(), which we use for loading version data and
paths information in docs.  Call exec() directly instead.

ticket: 8692 (new)

doc/conf.py

index 25ba214a8638124301cee8df9e09099063c74cf7..0555808e6abb9b538c7cdfffb09df309970080fe 100644 (file)
@@ -50,7 +50,7 @@ copyright = u'1985-2018, MIT'
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
-execfile("version.py")
+exec(open("version.py").read())
 # The short X.Y version.
 r_list = [r_major, r_minor]
 if r_patch:
@@ -238,7 +238,7 @@ if 'mansubs' in tags:
     ckeytab = '``@CKTNAME@``'
 elif 'pathsubs' in tags:
     # Read configured paths from a file produced by the build system.
-    execfile('paths.py')
+    exec(open("paths.py").read())
 else:
     bindir = ':ref:`BINDIR <paths>`'
     sbindir = ':ref:`SBINDIR <paths>`'