-
-
Notifications
You must be signed in to change notification settings - Fork 267
Update travis scripts to install with pip #343
Conversation
|
@moylop260 thanks for looking into this. The setup directory is easily created with If you want to work with a specifc branch of a dependency instead of getting it from wheelhouse.odoo-community.org, you just add it to the You can even use different branches for different addons in the same repository. You can also declare other places to look for dependencies by adding So it's very flexible. |
In principle, look good to me |
@moylop260 there is nothing to change in OCA projects. We can remove oca_dependencies.txt when we are satisfied everything works fine. One limitation is that it currently does not work with OpenErp 7.0 because
Alternatively, I could preserve the current behaviour with oca_dependencies for 7.0, or use the new behaviour only if oca_dependencies.txt is not present. |
I got it I like use pip if oca_dependencies is not present |
Ok, I will do that, it allows for a progressive deployment |
It's a great idea to keep using the oca_dependencies.txt as now, and using pip installation when that file is not available. |
That mean pip will be used for all repos that have no oca_dependencies.txt today. There are many of them. I'm personally fine with that. I'll also need to disable the pip approach for 7.0 as we don't build wheels for 7.0 yet. |
Yes, but I would expect for no Odoo module to be actually pip installed in those repos: if you have no oca_dependencies.txt, you're not using any modules outside the repo. If you want to play safe, maybe you can use pip install only if a requirements.txt file is present, even if empty... |
51df03f
to
9269e00
Compare
This one should be good now. The new behavior is triggered if oca_dependencies.txt is absent. |
9269e00
to
c1e716f
Compare
AFAICS when we have an "oca_dependencies.txt" in the repo, behaviour is unchanged. Questions: |
Yes, setuptools-odoo does that.
OCA addons can only depend on OCA addons. All OCA repos are packaged for pip installation automatically by a script running nightly. An improvement I'm considering is to have travis push to wheelhouse.odoo-community.org on success, so we don't have to wait the next day in case we have new cross-repo dependencies. |
One thing that remains TODO here is to disable the pip install behavour for Odoo versions <= 7. |
@sbidoul May be this change is enough... acsone@01d3c99 |
You should also do the same for lower versions (6.1, or even 5.0, 4.2 as we have in OCA/l10n-spain). |
@pedrobaeza I'm not aware of projects using travis on branches < 7.0 In OCA/l10n-spain travis is not configured on 6.1, or even 5.0, 4.2 ) |
OK, you're right. Transifex is not mandatory for that old ones. |
I pushed the check for versions <= 7.0. I hate bash. |
bd52b5c
to
4cad6e5
Compare
So resuming the tooling, we will see in this space in the future:
We use |
I updated this PR for odoo 10.0 and pypi support. An example build of account-financial-reporting without I think it is ready to merge now. cc/ @dreispt |
travis/travis_install_nightly
Outdated
@@ -91,13 +112,17 @@ echo "Install webkit (wkhtmltopdf) patched" | |||
# |___ <OdooRepo>-<Branch>/ <-- Odoo Server | |||
# |___ maintainer-quality-tools/ | |||
# |___ build/<Owner>/<TestedRepo>/ | |||
# |___ dependencies/<DependencyRepo1>/ | |||
# |___ dependencies/<DependencyRepo2>/ |
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.
These dependency dirs will still be there if we have an oca_dependencies.txt
, so IMO we should keep this.
90bd451
to
2776c04
Compare
@dreispt indeed, that was a remnant of the initial prototype. Fixed and rebased. |
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.
This code work for months for the Alfodoo project... https://github.com/acsone/alfodoo/blob/10.0/.travis.yml#L32
nice feature, thanks a lot for this work 👍 |
superseded by #646 |
This is a proof of concept to illustrate how installing with pip can help with dependency management.
There is no need for oca_dependencies.txt anymore as all dependencies are expressed in the
__openerp__.py
, possibly refined bysetup.py
, itself refined byrequirements.txt
if present.This is IMHO a important enabler to progressively move towards smaller repos.
An example build with this PR is here: https://travis-ci.org/acsone/account-financial-reporting/builds/144847025 (including cross-repo dependencies).
If there is interest, I can finish this PR (ie update mqt test suite mainly).