From 771bbd834bc92f4994fd1f449b2b35752a34cc80 Mon Sep 17 00:00:00 2001 From: Koushik Dutta Date: Wed, 22 Mar 2023 13:15:35 -0700 Subject: [PATCH] python-codecs: use pillow-simd if possible --- plugins/python-codecs/package-lock.json | 4 ++-- plugins/python-codecs/package.json | 2 +- plugins/python-codecs/src/requirements.txt | 6 +++++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/python-codecs/package-lock.json b/plugins/python-codecs/package-lock.json index d75dde506..3fa820e63 100644 --- a/plugins/python-codecs/package-lock.json +++ b/plugins/python-codecs/package-lock.json @@ -1,12 +1,12 @@ { "name": "@scrypted/python-codecs", - "version": "0.1.16", + "version": "0.1.17", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@scrypted/python-codecs", - "version": "0.1.16", + "version": "0.1.17", "devDependencies": { "@scrypted/sdk": "file:../../sdk" } diff --git a/plugins/python-codecs/package.json b/plugins/python-codecs/package.json index 34a7e8cde..6f90d1974 100644 --- a/plugins/python-codecs/package.json +++ b/plugins/python-codecs/package.json @@ -1,6 +1,6 @@ { "name": "@scrypted/python-codecs", - "version": "0.1.16", + "version": "0.1.17", "description": "Python Codecs for Scrypted", "keywords": [ "scrypted", diff --git a/plugins/python-codecs/src/requirements.txt b/plugins/python-codecs/src/requirements.txt index 366586191..5d40b8808 100644 --- a/plugins/python-codecs/src/requirements.txt +++ b/plugins/python-codecs/src/requirements.txt @@ -3,4 +3,8 @@ PyGObject>=3.30.4; sys_platform != 'win32' # libav doesnt work on arm7 av>=10.0.0; sys_platform != 'linux' or platform_machine == 'x86_64' or platform_machine == 'aarch64' pyvips; sys_platform != 'win32' -Pillow + +# in case pyvips fails to load, use a pillow fallback. +# pillow for anything not intel linux, pillow-simd is available on x64 linux +Pillow>=5.4.1; sys_platform != 'linux' or platform_machine != 'x86_64' +pillow-simd; sys_platform == 'linux' and platform_machine == 'x86_64'