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

Merge pull request #3498 from jvonau/min_devs

calibre-web - compiler and header files only when needed
This commit is contained in:
A Holt 2023-03-20 10:21:09 -04:00 committed by GitHub
commit f52a7497bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,10 +3,17 @@
name:
- imagemagick
- python3-venv
#- python3-dev
- build-essential # 2023-03-18: Needed (e.g. on Ubuntu 22.04) now that scripts/ansible no longer installs python3-pip
state: present
# https://github.com/iiab/iiab/pull/3496#issuecomment-1475094542
- name: "Install packages: python3-dev, gcc to compile 'netifaces'"
package:
name:
- python3-dev # header files
- gcc # compiler
state: present
when: python_version is version('3.10', '>=')
- name: Allow ImageMagick to read PDFs, per /etc/ImageMagick-6/policy.xml, to create book cover thumbnails
lineinfile:
path: /etc/ImageMagick-6/policy.xml
@ -44,7 +51,7 @@
# ignore_errors: True
##
# Implementing this with Ansible command module for now.
- name: Download Calibre-Web dependencies (using pip) into python3 virtual environment {{ calibreweb_venv_path }}
- name: Download Calibre-Web dependencies from 'requirements.txt' into python3 virtual environment {{ calibreweb_venv_path }}
pip:
requirements: "{{ calibreweb_venv_path }}/requirements.txt"
virtualenv: "{{ calibreweb_venv_path }}" # /usr/local/calibre-web-py3
@ -95,6 +102,14 @@
backup: yes
when: not appdb.stat.exists
# https://github.com/iiab/iiab/pull/3496#issuecomment-1475094542
#- name: "Uninstall packages: python3-dev, gcc used to compile 'netifaces'"
# package:
# name:
# - python3-dev # header files
# - gcc # compiler
# state: absent
# when: python_version is version('3.10', '>=')
# RECORD Calibre-Web AS INSTALLED