-
Notifications
You must be signed in to change notification settings - Fork 23k
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
[ADD] setup: pep518 support #44001
base: 17.0
Are you sure you want to change the base?
[ADD] setup: pep518 support #44001
Conversation
e2cbb49
to
8851a95
Compare
@d-fence have had a chance to think about this one? |
I think that the idea is really attractive but it seems that setuptools 41 is needed. |
@d-fence thanks for looking into this. Actually the setuptools 41 requirement is the one that has the When running So this should be safe to merge, independently of the distro version for pip and setuptools. |
@d-fence would you consider this for v14? |
Debian buster only provides setup-tools 40. |
But as I mentioned above, this is not needed at runtime nor for debian packaging. And even on buster |
@d-fence do you thing this can be considered for v15 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works like a charm.
Tested on master, so @sbidoul maybe would be accepted more easily on that branch ?
@rousseldenis I'll be more than happy to rebase and improve this if/when someone at Odoo acknowledges it will be considered for inclusion. |
I have to test it further and yes it would be better to target master. |
@d-fence thanks for reaching back ! I'll rebase on master. I think its no risk for stable though. Let me know if there are specific tests you have in mind, I'm happy to do them too. |
I want to be sure that it won't clash with our build system and, even better, that it could integrate with our build system. |
You may want to test building the sdist (and why not a wheel), with PyPA build. |
@d-fence any update? |
8851a95
to
1d41185
Compare
I cleaned-up and modernized the code, and made it more robust. |
1d41185
to
6f79c0d
Compare
@d-fence any chance this can be considered for v16 ? I retargeted this branch to master. |
@d-fence gentle reminder. Thanks |
I'm getting plenty of warnings like this when building Odoo with this PR enabled:
Should you add some method to find packages that is more future-proof? 🤔 |
@yajo these are setuptools deprecation warnings that are not directly related to this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not unlink existing symlink
75b0730
to
d581730
Compare
d581730
to
b4d081e
Compare
Allow building a wheel or an sdist through the pep517 interface, taking care of the required pre-processing to copy addons in odoo/addons. Force the setuptools compat mode for editable installs. This mode is the simplest, since it just installs a .pth files which extends PYTHONPATH with the Odoo root directory.
b4d081e
to
cc4f941
Compare
@KangOl thanks for your review! I updated and rebased on 17 as requested. |
Here's the patch for Odoo 16, for those that still need it there. |
@KangOl @d-fence this PR is becoming more pressing. Indeed there are more and more situations where pip defaults to doing a PEP 660 editable install which triggers a setuptools installation mode that is not compatible with Odoo. It is therefore important to force the Pretty please 🙏 |
This is a non-intrusive solution for #16700, that leverages the PEP 517 build backend interface, so
pip install .
andpip wheel .
work out of the box for Odoo.