-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
4 changed files
with
37 additions
and
53 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/usr/bin/env python | ||
# Copyright 2017 LasLabs Inc. | ||
|
||
from os.path import join | ||
|
||
from odoobaselib import ( | ||
addons_config, | ||
AUTO_REQUIREMENTS, | ||
CUSTOM_DIR, | ||
FILE_APT_BUILD, | ||
SRC_DIR, | ||
) | ||
from odoobaselib.installer import install, INSTALLERS | ||
|
||
|
||
# Build dependencies installed before any others | ||
install("apt", FILE_APT_BUILD) | ||
|
||
for name in INSTALLERS: | ||
req_files = [] | ||
# pip `requirements.txt` files found in repositories | ||
if name == "pip" and AUTO_REQUIREMENTS: | ||
for repo in addons_config(): | ||
req_files.append(join(SRC_DIR, repo, 'requirements.txt')) | ||
# Normal dependency installation | ||
req_files.append(join(CUSTOM_DIR, 'dependencies', '%s.txt' % name)) | ||
for req_file in req_files: | ||
install(name, req_file) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters