Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
164 changes: 164 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
[build-system]
requires = ["hatchling", "hatch-odoo"]
build-backend = "hatchling.build"


[project]
name = "oca-custom"
version = "18.0"
description = "Odoo by OCA"
# readme = "README.md"
requires-python = "==3.12.*"
dynamic = ["dependencies"]

[tool.hatch.build]
packages = ["./"]

# Enable the hatch-odoo metadata hook to generate dependencies from addons manifests.
[tool.hatch.metadata.hooks.odoo-addons-dependencies]
# Enable the hatch-odoo build hook to locate the Odoo addons and package them in odoo/addons.
# if not provided, "locals" modules (those in './') are not found and cannot be installed...
[tool.hatch.build.hooks.odoo-addons-dirs]

[tool.hatch-odoo]
# dependencies that are not in the addons manifest
dependencies = [
"odoo==18.0.*",
# indirect unrealeased dependencies
#"odoo-addons-design-themes==18.0.*",
# Add some constraints to Odoo deps that should be in their setup.py
"pyyaml==6.0.2",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did you get this requirement from?

"appdirs==1.4.4",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this one? I can go on for each module, but the general question would be:

Can you base yourself on:

https://github.com/odoo/odoo/blob/18.0/requirements.txt

Because basically that's all that we need, any other requirements and their versions should be defined in the manifest of the OCA modules and not here. For example this one (just as an example, this particular module is not used in this project)

"argcomplete==3.5.2",
"argh==0.31.3",
"asn1crypto==1.5.1",
"astor==0.8.1",
"attrs==24.3.0",
"Babel==2.13.1",
"beautifulsoup4==4.12.3",
"bs4==0.0.2",
"cached-property==2.0.1",
"cachetools==5.5.0",
"certifi==2024.12.14",
"cbor2==5.6.2",
"chardet==5.2.0",
"click==8.1.8",
"click-odoo==1.7.0",
"click-odoo-contrib==1.20",
"colorama==0.4.6",
"cryptography==42.0.8",
"cssselect==1.2.0",
"decorator==5.1.1",
"deepl==1.20.0",
"defusedxml==0.7.1",
"docutils==0.20.1",
"ebaysdk==2.2.0",
"freezegun==1.2.2",
"geoip2==4.7.0",
"geojson==3.2.0",
"gevent==24.11.1",
"greenlet==3.1.1",
"html2text==2024.2.26",
"idna==3.6",
"importlib-metadata==8.5.0",
"importlib-resources==6.4.5",
"importmagic3==0.2.0",
"isodate==0.7.2",
"jedi==0.19.2",
"Jinja2==3.1.2",
"libsass==0.22.0",
"lxml-html-clean",
"lxml==5.2.1",
"Mako==1.3.8",
"MarkupSafe==2.1.5",
"mock==5.1.0",
"num2words==0.5.13",
"ofxparse==0.21",
"openpyxl==3.1.2",
"passlib==1.7.4",
"pg-activity==3.5.1",
"phonenumbers==8.13.52",
"Pillow==10.2.0",
"polib==1.2.0",
"psutil==5.9.8",
"psycopg2==2.9.9",
"ptvsd==4.3.2",
"pudb==2024.1.3",
"pydot==3.0.3",
"Pygments==2.18.0",
"pyldap==3.0.0.post1",
"pyopenssl==24.1.0",
"pyparsing==3.2.0",
"PyPDF2==2.12.1",
"pyserial==3.5",
"python-dateutil==2.8.2",
"python-dotenv==1.0.1",
"python-ldap==3.4.4",
"python-magic==0.4.27",
"python-stdnum==1.19",
"pytz==2024.2",
"pyusb==1.2.1",
"qrcode==7.4.2",
"raven==6.10.0",
"reportlab==4.1.0",
"requests==2.31.0",
"requests-toolbelt==1.0.0",
"rjsmin==1.2.2",
"Shapely==2.0.6",
"six==1.17.0",
"soupsieve==2.6",
"spark-parser==1.8.9",
"typing-extensions==4.12.2",
"uncompyle6==3.9.2",
"Unidecode==1.3.8",
"urllib3==2.1.0",
"urwid==2.6.16",
"vobject==0.9.6.1",
"watchdog==6.0.0",
"wdb==3.3.0",
"websocket-client==1.8.0",
"Werkzeug==3.0.1",
"xdis==6.1.3",
"xlrd==2.0.1",
"XlsxWriter==3.1.9",
"xlwt==1.3.0",
"zeep==4.2.1",
"zipp==3.21.0",
]
addons_dirs = ["./"]

[tool.uv]
# On OCA 14.0 series translations commits are realeased
# in pre-release state
prerelease = "allow"
# tell uv when dependencies may change
cache-keys = [{ file = "pyproject.toml" }, { file = "**/__manifest__.py" }]

[dependency-groups]
dev = [
"parameterized>=0.9.0",
"pytest>8",
"pytest-odoo==2.1.2",
"pytest-cov>=5.0.0",
"pytest-xdist>=3.6.1",
"manifestoo>=1.0",
"odoo-test-helper",
"websocket-client",
]
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What would be nice if, in our PR, we can see which has been taken over from the old 14.0 file and which is added as a change to 18.0. So for this we can pull over the original commit(s) using a technical git command, and then put our changes on top. The technical commands to do this are roughly these

which would translate in this case to something like

$ git clone https://github.com/OCA/$repo -b 14.0
$ cd $repo
$ git checkout -b 18.0-add-pyproject-toml origin/18.0
$ git format-patch --keep-subject --stdout origin/18.0..origin/14.0 -- pyproject.toml | git am -3 --keep

And then overwrite pyproject.toml with the current file with your edits, and commit the changes:
$ cp /tmp/pyproject.toml .
$ git commit -m "[MIG] pyproject.toml 14 to 18" 



[tool.uv.sources]
# Use fix updating account move line update membership line
odoo = { git = "https://github.com/OCA/OCB" }

# unreleased dependency, add it to test-requirements.txt to let the
# test pipeline to use it as well
#odoo-addons-design-themes = { git = "https://github.com/acsone/design-themes", branch = "14.0-with-pyproject" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can leave this one out completely, we don't need a website theme

#odoo18-addon-website-apps-store = { git = "https://github.com/OCA/apps-store", rev = "refs/tree/18.0/head"}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be left out completely, we are deinstalling the app store modules as part of the migration


# Example to develop module from an other repository
# installing in editable mode
# odoo14-addon-membership-delegated-partner-line = { path = "src/vertical-association/setup/membership_delegated_partner_line", editable = true }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This module is added here:

OCA/vertical-association#214

So for that I think we should add something like:

odoo18-addon-membership-delegated-partner-line = { path = "https://github.com/gfcapalbo/membership", branch = "18.0-MIG-membership_delegated_partner_line" }

Until it gets merged of course


[tool.pytest]
addopts = "-v -s --cov-report term-missing"
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# generated from manifests external_dependencies
responses
Loading
Loading