Skip to content

Commit 4dce95a

Browse files
Merge pull request #691 from Tecnativa/fix-upgrade-cbor2
[FIX] Workarround pkg_resources removal in setuptools
2 parents b601ac1 + 877dbc8 commit 4dce95a

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

16.0.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,8 @@ RUN build_deps=" \
145145
# disable gevent version recommendation from odoo and use 22.10.2 used in debian bookworm as python3-gevent
146146
&& sed -i -E "s/(gevent==)21\.8\.0( ; sys_platform != 'win32' and python_version > '3.9' and python_version <= '3.10')/\122.10.2\2/;s/(greenlet==)1.1.2( ; sys_platform != 'win32' and python_version > '3.9' and python_version <= '3.10')/\12.0.2\2/" requirements.txt \
147147
# need to upgrade setuptools, since the fixes for CVE-2024-6345 rolled out in base images we get errors "error: invalid command 'bdist_wheel'"
148-
&& pip install --upgrade setuptools \
148+
# We need setuptools lower than 82 as odoo uses pkg_resources and it was removed in 82.0.0
149+
&& pip install --upgrade "setuptools<82" \
149150
&& pip install -r requirements.txt \
150151
'websocket-client~=0.56' \
151152
astor \

17.0.Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ RUN build_deps=" \
144144
# disable gevent version recommendation from odoo and use 22.10.2 used in debian bookworm as python3-gevent
145145
&& sed -i -E "s/(gevent==)21\.8\.0( ; sys_platform != 'win32' and python_version == '3.10')/\122.10.2\2/;s/(greenlet==)1.1.2( ; sys_platform != 'win32' and python_version == '3.10')/\12.0.2\2/" requirements.txt \
146146
# need to upgrade setuptools, since the fixes for CVE-2024-6345 rolled out in base images we get errors "error: invalid command 'bdist_wheel'"
147-
&& pip install --upgrade setuptools \
147+
# We need setuptools lower than 82 as odoo uses pkg_resources and it was removed in 82.0.0
148+
&& pip install --upgrade "setuptools<82" \
148149
&& pip install -r requirements.txt \
149150
'websocket-client~=0.56' \
150151
astor \

18.0.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ RUN build_deps=" \
143143
&& curl -o requirements.txt https://raw.githubusercontent.com/$ODOO_SOURCE/$ODOO_VERSION/requirements.txt \
144144
# disable gevent version recommendation from odoo and use 22.10.2 used in debian bookworm as python3-gevent
145145
&& sed -i -E "s/(gevent==)21\.8\.0( ; sys_platform != 'win32' and python_version == '3.10')/\122.10.2\2/;s/(greenlet==)1.1.2( ; sys_platform != 'win32' and python_version == '3.10')/\12.0.2\2/" requirements.txt \
146+
# cbor2==5.4.2 no longer builds as pkg_resources is removed, and 5.4.6 is already pre-built
147+
&& sed -i -E "s/(cbor2==)5\.4\.2( ; python_version < '3.12')/\15.4.6\2/" requirements.txt \
146148
# need to upgrade setuptools, since the fixes for CVE-2024-6345 rolled out in base images we get errors "error: invalid command 'bdist_wheel'"
147149
&& pip install --upgrade setuptools \
148150
&& pip install -r requirements.txt \

19.0.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ RUN build_deps=" \
143143
&& apt-get update \
144144
&& apt-get install -yqq --no-install-recommends $build_deps \
145145
&& curl -o requirements.txt https://raw.githubusercontent.com/$ODOO_SOURCE/$ODOO_VERSION/requirements.txt \
146+
# cbor2==5.4.2 no longer builds as pkg_resources is removed, and 5.4.6 is already pre-built
147+
&& sed -i -E "s/(cbor2==)5\.4\.2( ; python_version < '3.12')/\15.4.6\2/" requirements.txt \
146148
# need to upgrade setuptools, since the fixes for CVE-2024-6345 rolled out in base images we get errors "error: invalid command 'bdist_wheel'"
147149
&& pip install --upgrade setuptools \
148150
&& pip install -r requirements.txt \

0 commit comments

Comments
 (0)