Skip to content

Commit

Permalink
Merge pull request #41 from acsone/imp-dependencies-sbi
Browse files Browse the repository at this point in the history
Refine depencies + Odoo 18 support
  • Loading branch information
sbidoul authored Oct 8, 2024
2 parents 6193833 + 2ce8eba commit b3b76b5
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
8 changes: 5 additions & 3 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,23 @@ project_trigram:

odoo_series:
type: str
default: "16.0"
default: "18.0"
choices:
- "17.0"
- "16.0"
- "17.0"
- "18.0"

odoo_enterprise:
type: bool
default: False

python_version:
type: str
default: "3.10"
default: "3.12"
choices:
- "3.10"
- "3.11"
- "3.12"

kwkhtmltopdf_test_service:
type: bool
Expand Down
24 changes: 21 additions & 3 deletions src/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,30 @@ dependencies = [
"odoo-addon-session_db",
# Optional Odoo dependencies not in Odoo's setup.py
"freezegun",
"reportlab<4",
"lxml[html_clean]",
"num2words",
"pdfminer",
"phonenumbers",
"python-slugify[unidecode]",
{%- if odoo_series == "18.0" %}
"packaging", # https://github.com/odoo/odoo/pull/181768
{%- endif %}
# Constraints
{%- if odoo_series == "16.0" %}
"pypdf2<3",
"setuptools<71", # https://github.com/pypa/setuptools/issues/4516
"werkzeug==2.0.*",
"xlrd<2", # for xlsx support
{%- elif odoo_series == "17.0" %}
"pypdf2<3",
# xlrd<2 because Odoo relies on it to import xlsx files and xlrd 2 dropped that capability
"xlrd<2",
"setuptools<71", # https://github.com/pypa/setuptools/issues/4516
"werkzeug==3.0.*",
"xlrd<2", # for xlsx support
{%- elif odoo_series == "18.0" %}
"pypdf2<3",
"werkzeug==3.0.*",
"xlrd<2", # for xlsx support
{%- endif %}
]
addons_dirs = ["odoo/addons"]
Expand Down
6 changes: 2 additions & 4 deletions src/requirements.txt.in.jinja
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# odoo
# -r https://raw.githubusercontent.com/odoo/odoo/{{ odoo_series }}/requirements.txt
pypdf2<2
werkzeug<2.1
# This file should contain only git references

odoo @ git+https://github.com/acsone/odoo.git@{{ odoo_series }}-{{ project_trigram }}_master
{%- if odoo_enterprise %}
odoo-addons-enterprise @ git+ssh://[email protected]/acsone/enterprise.git@{{ odoo_series }}-{{ project_trigram }}_master
Expand Down

0 comments on commit b3b76b5

Please sign in to comment.