# HG changeset patch
# User Vincent Hatakeyama <vincent.hatakeyama@xcg-consulting.fr>
# Date 1619443866 -7200
#      Mon Apr 26 15:31:06 2021 +0200
# Node ID cfe8d31ce81b5b16c26039896d23507a925b30ef
# Parent  eea9f9ddbdddba850ed2ab9a36ad517cb88fa5a7
🚑 fix building some images due to incompatibility with python version

diff --git a/NEWS.rst b/NEWS.rst
--- a/NEWS.rst
+++ b/NEWS.rst
@@ -7,6 +7,8 @@
 
 Clarify chown message.
 
+Fix issue when trying to build an image using python 3.5 with development tools.
+
 7.0.4
 -----
 
diff --git a/odoo_scripts/docker_build.py b/odoo_scripts/docker_build.py
--- a/odoo_scripts/docker_build.py
+++ b/odoo_scripts/docker_build.py
@@ -148,10 +148,17 @@
             )
             if odoo_type in ("odoo11", "odoo13"):
                 myfile.write(
-                    "python3-watchdog python3-ipdb python3-pyinotify\n"
+                    "python3-watchdog python3-ipdb python3-pyinotify "
+                    "python3-wheel\n"
+                )
+                # newer setuptools_scm>6 is not compatible with python 3.5 due
+                # to the use of f-strings
+                myfile.write(
+                    "RUN python3 -m pip install "
+                    "\"setuptools_scm<6;python_version<='3.5'\"\n"
                 )
                 # Install pdb++
-                myfile.write("RUN pip3 install pdbpp\n")
+                myfile.write("RUN python3 -m pip install pdbpp\n")
             elif odoo_type in ("odoo10",):
                 myfile.write("python-ipdb\n")
                 myfile.write(