-
-
Notifications
You must be signed in to change notification settings - Fork 114
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add support for pip install of odoo and addons
- Loading branch information
1 parent
15d810c
commit 6d681a3
Showing
37 changed files
with
1,418 additions
and
6 deletions.
There are no files selected for viewing
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,56 @@ | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
||
# C extensions | ||
*.so | ||
|
||
# Distribution / packaging | ||
.Python | ||
env/ | ||
bin/ | ||
build/ | ||
develop-eggs/ | ||
dist/ | ||
eggs/ | ||
lib/ | ||
lib64/ | ||
parts/ | ||
sdist/ | ||
var/ | ||
*.egg-info/ | ||
.installed.cfg | ||
*.egg | ||
|
||
# Installer logs | ||
pip-log.txt | ||
pip-delete-this-directory.txt | ||
|
||
# Unit test / coverage reports | ||
htmlcov/ | ||
.tox/ | ||
.coverage | ||
.cache | ||
nosetests.xml | ||
coverage.xml | ||
|
||
# Translations | ||
*.mo | ||
|
||
# Pycharm | ||
.idea | ||
|
||
# Mr Developer | ||
.mr.developer.cfg | ||
.project | ||
.pydevproject | ||
|
||
# Rope | ||
.ropeproject | ||
|
||
# Sphinx documentation | ||
docs/_build/ | ||
|
||
# Backup files | ||
*~ | ||
*.swp |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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,58 @@ | ||
--- | ||
|
||
- name: Install Odoo dependencies | ||
apt: pkg={{ item }} | ||
state=installed | ||
update_cache={{ odoo_apt_update_cache }} | ||
cache_valid_time={{ odoo_apt_cache_valid_time }} | ||
with_items: "{{ odoo_debian_packages }}" | ||
tags: | ||
- odoo_packages | ||
|
||
- name: Generate sample requirements.txt file | ||
template: src=odoo-{{ odoo_version }}-pip-requirements.txt dest="/home/{{ odoo_user }}/requirements.txt" | ||
owner={{ odoo_user }} group={{ odoo_user }} mode=0600 | ||
|
||
- name: Install build dependencies | ||
apt: pkg={{ item }} | ||
state=installed | ||
update_cache={{ odoo_apt_update_cache }} | ||
cache_valid_time={{ odoo_apt_cache_valid_time }} | ||
with_items: "{{ odoo_pip_build_dependencies }}" | ||
|
||
- name: Prepare the Python virtual environment | ||
become: yes | ||
become_user: "{{ odoo_user }}" | ||
shell: "{{ odoo_pip_venv_cmd }}" | ||
args: | ||
creates: "{{ odoo_pip_venv_path }}" | ||
|
||
- name: Download the pip requirements file | ||
get_url: url="{{ odoo_pip_requirements_url }}" | ||
force=yes | ||
dest="/home/{{ odoo_user }}/requirements.txt" | ||
|
||
|
||
- name: Install Odoo dependencies (PyPi) | ||
pip: | ||
name: "{{ item }}" | ||
extra_args: --upgrade | ||
virtualenv: "{{ odoo_pip_venv_path }}" | ||
with_items: "{{ odoo_pypi_packages }}" | ||
|
||
- name: Install Odoo from pip external requirements file | ||
pip: | ||
requirements: /home/{{ odoo_user }}/requirements.txt | ||
extra_args: --upgrade | ||
virtualenv: "{{ odoo_pip_venv_path }}" | ||
|
||
- import_tasks: config.yml | ||
tags: | ||
- odoo_config | ||
|
||
- name: Generate Odoo init script | ||
template: src=odoo-pip.init dest=/etc/init.d/{{ odoo_service }} | ||
owner=root group=root mode=0755 | ||
force={{ odoo_force_config and 'yes' or 'no' }} | ||
backup=yes | ||
notify: Restart Odoo |
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,2 @@ | ||
-e git+https://github.com/odoo/[email protected]#egg=odoo | ||
-e git+https://github.com/OCA/[email protected]#egg=odoo10_addon_date_range&subdirectory=setup/date_range |
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
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,2 @@ | ||
-e git+https://github.com/odoo/[email protected]#egg=odoo | ||
-e git+https://github.com/OCA/[email protected]#egg=odoo11_addon_date_range&subdirectory=setup/date_range |
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
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 @@ | ||
-e git+https://github.com/odoo/[email protected]#egg=odoo |
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
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 @@ | ||
-e git+https://github.com/odoo/[email protected]#egg=odoo |
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
Oops, something went wrong.