-
Notifications
You must be signed in to change notification settings - Fork 48
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
Pip installation and auto installed "glue" addons #12
Comments
One way to handle this is to add them to the import setuptools
setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
install_requires=[
'odoo8-addon-account_invoice_merge_payment',
'odoo8-addon-account_invoice_merge_purchase',
],
) |
That's a new feature to develop, right? |
No no, it's implemented. These setup.py are entirely normal so anything that is supported by setuptools can be added. Existing keys are preserved except keys of list type (such as install_requires) which are extended by setuptools-odoo.
|
My |
Indeed. I've no idea how to do that though. |
I have an idea I can try. |
You can start here. How would you determine what the main addon is? |
Also glue modules may be created after the main module' setup.py already exists... so definitely not easy to automate. |
Thanks for the pointer. |
PS: found it! |
@dreispt the default The install_requires list is populated from the addon manifest and external python dependencies when setup.py is executed with the code you refer to. What you want to do is adapt |
That is a corner case we can live without. In a nutshell, the idea is: when packaging an addon, scan the repo dir for I'm not yet sure about the wokflow of the packaging script. I get the is that it first prepares the |
In OCA, the nightly packaging script does this:
|
Addon modules feature "autoinstall" flag, that makes them be automatically installed once all their dependencies are installed.
For example, a "project_sale" glue module would be automatically installed after both "project" and "sale" have been installed.
But if we are using pip install to get modules (rather than git cloning a repo with many modules), "project_sale" won't be available in our env, and won't be auto-installed.
Is there a way for pip installation to support glue modules?
A "recommended" list?
Detecting them when packaging and having them as additional dependencies?
The text was updated successfully, but these errors were encountered: