Skip to content

Commit

Permalink
[IMP] Use python 3.10 for Odoo 16
Browse files Browse the repository at this point in the history
  • Loading branch information
josep-tecnativa committed Nov 14, 2023
1 parent 1a50fcb commit 418c33b
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@ jobs:
odoo_version: ["17.0"]
pg_version: ["15"]
python_version: ["3.10"]
include:
# Older odoo versions don't support latest postgres and Python versions
- odoo_version: "16.0"
pg_version: "14"
python_version: "3.10"
- odoo_version: "15.0"
pg_version: "14"
python_version: "3.9"
- odoo_version: "14.0"
pg_version: "14"
python_version: "3.9"
- odoo_version: "13.0"
pg_version: "14"
python_version: "3.9"
env:
# Indicates what's the equivalent to tecnativa/doodba:latest image
LATEST_RELEASE: "17.0"
Expand All @@ -54,8 +68,6 @@ jobs:
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
- name: DF
run: df -h
# Install dev and test dependencies
- run: pip install poetry
- name: Patch $PATH
Expand Down
8 changes: 4 additions & 4 deletions 16.0.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.8-slim-bullseye AS base
FROM python:3.10-slim-bullseye AS base

EXPOSE 8069 8072

Expand Down Expand Up @@ -64,15 +64,15 @@ RUN apt-get -qq update \

WORKDIR /opt/odoo
COPY bin/* /usr/local/bin/
COPY lib/doodbalib /usr/local/lib/python3.8/site-packages/doodbalib
COPY lib/doodbalib /usr/local/lib/python3.10/site-packages/doodbalib
COPY build.d common/build.d
COPY conf.d common/conf.d
COPY entrypoint.d common/entrypoint.d
RUN mkdir -p auto/addons auto/geoip custom/src/private \
&& ln /usr/local/bin/direxec common/entrypoint \
&& ln /usr/local/bin/direxec common/build \
&& chmod -R a+rx common/entrypoint* common/build* /usr/local/bin \
&& chmod -R a+rX /usr/local/lib/python3.8/site-packages/doodbalib \
&& chmod -R a+rX /usr/local/lib/python3.10/site-packages/doodbalib \
&& cp -a /etc/GeoIP.conf /etc/GeoIP.conf.orig \
&& mv /etc/GeoIP.conf /opt/odoo/auto/geoip/GeoIP.conf \
&& ln -s /opt/odoo/auto/geoip/GeoIP.conf /etc/GeoIP.conf \
Expand Down Expand Up @@ -136,7 +136,7 @@ RUN build_deps=" \
python-magic \
watchdog \
wdb \
&& (python3 -m compileall -q /usr/local/lib/python3.8/ || true) \
&& (python3 -m compileall -q /usr/local/lib/python3.10/ || true) \
# generate flanker cached tables during install when /usr/local/lib/ is still intended to be written to
# https://github.com/Tecnativa/doodba/issues/486
&& python3 -c 'from flanker.addresslib import address' >/dev/null 2>&1 \
Expand Down

0 comments on commit 418c33b

Please sign in to comment.