37 lines
1.2 KiB
Diff
37 lines
1.2 KiB
Diff
|
From 16c745b7e9e239535a8c71dc7022b477a5165e01 Mon Sep 17 00:00:00 2001
|
||
|
From: Robbie Harwood <rharwood@redhat.com>
|
||
|
Date: Wed, 13 Jun 2018 15:07:48 -0400
|
||
|
Subject: [PATCH] Make docs build python3-compatible
|
||
|
|
||
|
python3 removed execfile(), which we use for loading version data and
|
||
|
paths information in docs. Call exec() directly instead.
|
||
|
|
||
|
ticket: 8692 (new)
|
||
|
(cherry picked from commit a7c6d98480f1e33454173f88381921472d72f80a)
|
||
|
---
|
||
|
doc/conf.py | 4 ++--
|
||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
||
|
diff --git a/doc/conf.py b/doc/conf.py
|
||
|
index 25ba214a8..0555808e6 100644
|
||
|
--- a/doc/conf.py
|
||
|
+++ b/doc/conf.py
|
||
|
@@ -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>`'
|