-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working with hatchling 1.19+ #12
Comments
The workaround to make it work for now: -requires = ['hatchling', 'hatch-odoo']
+requires = ['hatchling<1.19', 'hatch-odoo'] |
I also found another workaround (or maybe definitive solution?): +[tool.hatch.build.targets.wheel]
+packages = ['odoo.addons'] I found out you already knew this @sbidoul from pypa/hatch#1113 (comment). Did you find a fix back then? |
I think the issue was with hatchling 1.19 only. Other more recent versions should work. |
Don't hesitate to reopen if you see issues with more recent versions of hatchling. |
Yeah I think that was fixed. There is also the |
Indeed, adding this to the +[tool.hatch.build.targets.wheel]
+bypass-selection = true So, which fix is better? This one or #12 (comment)? Are there any differences between choosing one or the other workaround? |
@yajo can't you just avoid hatchling 1.19 ? It works just fine with all other versions. |
I have added this patch over the original file, just to make sure I'm using the latest versions: -requires = ['hatchling', 'hatch-odoo']
+requires = ['hatchling==1.24.2', 'hatch-odoo==1.0'] Then:
So the problem happens with hatchling 1.19 and later versions AFAICS. |
Perhaps open up a new issue on this repository with your full project config file. |
Nothing has changed... it's the same as #12 (comment) 🤷🏼♂️ |
I think the simplest way to fix this is #15 |
Ok, so I'm reopening. Thanks for the reproducer, @yajo. This combination of # git clone https://github.com/odoo/design-themes
# cat <<EOF > pyproject.toml
[build-system]
requires = ['hatchling', 'hatch-odoo']
build-backend = 'hatchling.build'
[project]
name = 'odoo-addons-design-themes'
version = '16.0'
requires-python = '>=3.7'
dynamic = ['dependencies']
[tool.hatch.metadata.hooks.odoo-addons-dependencies]
[tool.hatch.build.hooks.odoo-addons-dirs]
[tool.hatch-odoo]
addons_dirs = ['.']
dependencies = []
odoo_version_override = '16.0'
EOF
# pip install -e . |
And I can confirm the reproducer above does work with hatchling<1.19. |
Issue with plugin or Hatchling? I thought everything was fixed (as your tests and current usage show). |
@ofek thanks for chiming in. I had not tested the specific case in #12 (comment) yet, but I verified just now that it started breaking with hatchling 1.19. I also note the problem is in editable mode only, for which the workaround proposed in #15 does not feel natural. Can't tell more at the moment. |
But at the moment, my bet is on an issue with hatchling ;) |
Can you please tell me about how that case that was untested is different? |
That particular usage mode creates a directory named Would there be a way for the plugin to tell hatchling that this is the expected outcome? |
Hm, not quite. The mode that works also adds a .pth but nothing else. Forget about that, I'll fire my debugger and try to understand better. |
@ofek I have done some digging, and think its a hatchling issue. Indeed in the case that fails, the plugin creates and adds a .pth file in For non editable wheels pypa/hatch#1120 fixed pypa/hatch#1113 (comment) by considering Alternatively would there be a way to let the plugin expand I have added a failing test reproducing this issue in #16 |
I can work around it by adding my .pth file in |
Thank you for debugging, that helps a lot! When @potiuk finishes pypa/hatch#1511 then I will take the time to fix the issue here and make a release which will contain both. Right now I'm deep into the workspaces implementation and want to focus on finishing. |
Yeah. I am on it. I am at conference (running a data-engineering track there :) ) this next 3 days so I am not sure if I manage to finish it quickly but I absolutely intend to do it :) |
Take your time, I really don't want to context-switch away from workspaces 😄 |
As seen in the release notes:
It seems that error is creating problems with hatch-odoo plugin.
If I add this
pyproject.toml
file to https://github.com/odoo/design-themes I get an exception when building the wheel:The error:
@moduon MT-1075
The text was updated successfully, but these errors were encountered: