1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #2240 from jvonau/cal_py3

Cal py3 [Calibre-Web: move to Python 3] ...uncovers 2 Calibre-Web issues: slow shutdown & "Perform Update" button risks
This commit is contained in:
A Holt 2020-03-09 12:20:25 -04:00 committed by GitHub
commit 2041c36671
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 14 deletions

View file

@ -16,7 +16,7 @@
calibreweb_version: 0.6.6 # WAS: master, 0.6.4, 0.6.5
calibreweb_venv_path: /usr/local/calibre-web
calibreweb_venv_path: /usr/local/calibre-web-py3
calibreweb_exec_path: "{{ calibreweb_venv_path }}/cps.py"
# Config files put in:

View file

@ -42,23 +42,14 @@
# ignore_errors: True
##
# Implementing this with Ansible command module for now.
- name: Download Calibre-Web dependencies (using pip) into python2.7 virtual environment {{ calibreweb_venv_path }}
- name: Download Calibre-Web dependencies (using pip) into python3 virtual environment {{ calibreweb_venv_path }}
pip:
requirements: "{{ calibreweb_venv_path }}/requirements.txt"
virtualenv: "{{ calibreweb_venv_path }}" # /usr/local/calibre-web
virtualenv: "{{ calibreweb_venv_path }}" # /usr/local/calibre-web-py3
virtualenv_site_packages: no
virtualenv_command: /usr/bin/virtualenv
virtualenv_python: python2.7
virtualenv_command: python3 -m venv {{ calibreweb_venv_path }}
when: internet_available | bool
# 2020-02-02: IS PYTHON 3 POSSIBLE ABOVE AND BELOW?
- name: Symlink {{ calibreweb_venv_path }}/vendor -> {{ calibreweb_venv_path }}/lib/python2.7/site-packages - to keep {{ calibreweb_venv_path }}/cps.py happy
file:
src: "{{ calibreweb_venv_path }}/lib/python2.7/site-packages"
path: "{{ calibreweb_venv_path }}/vendor" # /usr/local/calibre-web
state: link
- name: Install /etc/systemd/system/calibre-web.service from template
template:
src: calibre-web.service.j2

View file

@ -3,7 +3,7 @@ Description=Calibre-Web
[Service]
Type=simple
User={{ calibreweb_user }}
ExecStart={{ calibreweb_exec_path }} -p {{ calibreweb_config }}/{{ calibreweb_settings_database }}
ExecStart={{ calibreweb_venv_path }}/bin/python3 {{ calibreweb_exec_path }} -p {{ calibreweb_config }}/{{ calibreweb_settings_database }}
[Install]
WantedBy=multi-user.target