From 0bdc750700f78fb56bfcab1937dc27c977e6a969 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Tue, 2 Nov 2021 13:09:17 +0000 Subject: [PATCH] [FIX] conf: allow to build on python 3.6 Since odoo/odoo@794677fb6a3391379 Odoo requires python 3.7 min. However, it still runs fine in 3.6 and this is the python version of the build server. Fake the version to be able to build the doc on the nightly server. To be removed once the nightly server is migrated. closes odoo/documentation#1259 X-original-commit: 4fb6c72d757b9e58fe86ff9b733bd9b6e22146af Signed-off-by: Martin Trigaux (mat) Signed-off-by: Antoine Vandevenne (anv) --- conf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/conf.py b/conf.py index 6aab5504a..69248265e 100644 --- a/conf.py +++ b/conf.py @@ -74,6 +74,10 @@ if not odoo_dir.is_dir(): ) else: sys.path.insert(0, str(odoo_dir.absolute())) + if sys.version_info < (3, 7) and sys.version_info > (3, 6): + # running odoo needs python 3.7 min but monkey patch version_info to be + # able to build the doc in python 3.6 + sys.version_info = (3, 7, 0) from odoo import release as odoo_release # Don't collide with Sphinx's 'release' config option odoo_version = odoo_release.version if 'alpha' not in odoo_release.version else 'master' if release != odoo_version: