Skip to content

Commit a018181

Browse files
committed
[FIX] conf: allow building the documentation with Python 3.6.
Commit 3d358fd introduced a new import of Odoo source files which complain about the minimal Python version if the hack added by 57e1e31 is not executed early enough. closes #1972 X-original-commit: 557b261 Signed-off-by: Antoine Vandevenne (anv) <[email protected]>
1 parent 3fb30d8 commit a018181

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@
8282
{'dir_list': '\n'.join([f'\t- {d.resolve()}' for d in odoo_sources_candidate_dirs])},
8383
)
8484
else:
85+
if (3, 6) < sys.version_info < (3, 7):
86+
# Running odoo needs python 3.7 min but monkey patch version_info to be compatible with 3.6.
87+
sys.version_info = (3, 7, 0)
8588
odoo_dir = odoo_sources_dirs[0].resolve()
8689
source_read_replace_vals['ODOO_RELPATH'] = '/../' + str(odoo_sources_dirs[0])
8790
source_read_replace_vals['ODOO_ABSPATH'] = str(odoo_dir)
8891
sys.path.insert(0, str(odoo_dir))
8992
import odoo.addons
9093
odoo.addons.__path__.append(str(odoo_dir) + '/addons')
91-
if (3, 6) < sys.version_info < (3, 7):
92-
# Running odoo needs python 3.7 min but monkey patch version_info to be compatible with 3.6
93-
sys.version_info = (3, 7, 0)
9494
from odoo import release as odoo_release # Don't collide with Sphinx's 'release' config option
9595
odoo_version = odoo_release.version.replace('~', '-') # Change saas~XX.Y to saas-XX.Y
9696
odoo_version = 'master' if 'alpha' in odoo_release.version else odoo_version

0 commit comments

Comments
 (0)