-
Notifications
You must be signed in to change notification settings - Fork 307
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
[IMP] Add option to automatically install repo requirements #71
Conversation
Why Travis is failing? Maybe it is expecting that value to be True? |
Hrmmm same error as in #62 - I've been seeing this randomly across all PRs:
|
It seems to be #65 |
635050e
to
e88faa0
Compare
@yajo - I'm about to rebase this, but it's going to suck with all the commits. Do you mind if I squash your's into mine in order to make the rebase easier in terms of conflicts? Admittedly I'm being lazy, but less commits are better right? 😆 |
Squashing actually made it so there were no conflicts. Pretty pleeeeaaaaseeee?! |
Do it please 😊 |
95e5554
to
c44858a
Compare
Done! |
build.d/200-dependencies
Outdated
req_files = [] | ||
# pip `requirements.txt` files found in repositories | ||
if name == "pip" and AUTO_REQUIREMENTS: | ||
for repo in addons_config(): |
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.
addons_config
changed its return since #84. I think this should fail as it is.
Anyways, you can be dumber here and just use req_files += glob.glob(join(SRC_DIR, "*", "requirements.txt"))
8.0.Dockerfile
Outdated
@@ -17,6 +17,7 @@ ONBUILD ARG DEPTH_MERGE=100 | |||
ONBUILD ARG CLEAN=true | |||
ONBUILD ARG COMPILE=true | |||
ONBUILD ARG CONFIG_BUILD=true | |||
ONBUILD ARG AUTO_REQUIREMENTS=false |
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.
Add this to 11.0.Dockerfile
too
Saner auto requirements installation - Shortcut for installation that reduces the logic size. - Cannot install from repositories before aggregation. - Auto dependencies should come in before manual ones. - Drop support of deprecated /opt/custom/src/requirements.txt file. [FIX] Default requirements installation to false Fix tests for auto installation of requirements.txt files found in repositories
- Sort arguments in py2 Dockerfiles. - Add to py3 Dockerfile. - Use glob to get files. - Test it.
c44858a
to
5e58adf
Compare
Travis errors unrelated. |
This feature was introduced in #71, but time has proven it buggy and not much useful. This feature has a chicken-and-egg problem in the devel environment: code doesn't exist at build time, but it is expected to be able to find the `requirements.txt` files inside it. It confuses the developer and creates divergencies between devel and test/prod environments (where that problem doesn't exist). Also it's breaking #174, which is a more important and actually used feature. The best fix is to drop support for this. If you really want to have requirements from remotes, you can add this to your `dependencies/pip.txt` file: ``` # Assuming you are installing all from server-tools -r https://raw.githubusercontent.com/OCA/server-tools/11.0/requirements.txt ``` It's a better choice because: - It's basic official pip. - It's explicit. - It works fine across environments.
This feature was introduced in #71, but time has proven it buggy and not much useful. This feature has a chicken-and-egg problem in the devel environment: code doesn't exist at build time, but it is expected to be able to find the `requirements.txt` files inside it. It confuses the developer and creates divergencies between devel and test/prod environments (where that problem doesn't exist). Also it's breaking #174, which is a more important and actually used feature. The best fix is to drop support for this. If you really want to have requirements from remotes, you can add this to your `dependencies/pip.txt` file: ``` # Assuming you are installing all from server-tools -r https://raw.githubusercontent.com/OCA/server-tools/11.0/requirements.txt ``` It's a better choice because: - It's basic official pip. - It's explicit. - It works fine across environments.
Ref #28 except with defaults that don't suck! 🚀