Skip to content

Commit

Permalink
Sickchill: update with Py3.8.12 and DSM7 support (#4920)
Browse files Browse the repository at this point in the history
* Sickchill rebuild inc DSM6&7 with new py3.8.12

* Sickchill cross and requirements updates

* SickChill 6 7 with Py3.8.12-6 tested working!

* Update wizard to warn users that the first start can take longer.

Co-authored-by: Sebastian Schmidt <publicarray@users.noreply.github.com>

* Fix regression in python wheel cross build.  Reverts `mk/spksrc.common.mk`, `mk/spksrc.wheel.mk` from 98dc6b4

* SickChill 6 7 update requirements* and makefile

Co-authored-by: Sebastian Schmidt <publicarray@users.noreply.github.com>
Co-authored-by: Vincent Fortier <th0ma7@gmail.com>
  • Loading branch information
3 people authored Nov 5, 2021
1 parent 1b606e4 commit 5ace92b
Show file tree
Hide file tree
Showing 8 changed files with 103 additions and 87 deletions.
4 changes: 2 additions & 2 deletions mk/spksrc.common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ RUN = cd $(WORK_DIR)/$(PKG_DIR) && env $(ENV)
PIP ?= pip
# Why ask for the same thing twice? Always cache downloads
PIP_CACHE_OPT ?= --cache-dir $(PIP_DIR)
PIP_ARGS = --no-binary :all: $(PIP_CACHE_OPT) --no-deps
PIP_WHEEL = $(PIP) wheel $(PIP_ARGS) --global-option="build_ext" --global-option="-j$(NCPUS)" --wheel-dir $(WHEELHOUSE)
PIP_WHEEL_ARGS = wheel --no-binary :all: $(PIP_CACHE_OPT) --no-deps --wheel-dir $(WHEELHOUSE)
PIP_WHEEL = $(PIP) $(PIP_WHEEL_ARGS)
PIP_DOWNLOAD = $(PIP) download $(PIP_ARGS) --dest $(BASE_DISTRIB_DIR)

# Available languages
Expand Down
2 changes: 1 addition & 1 deletion mk/spksrc.wheel.mk
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ build_wheel_target: $(PRE_WHEEL_TARGET)
if [ -z "$(CROSSENV)" ]; then \
$(RUN) _PYTHON_HOST_PLATFORM="$(TC_TARGET)" CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $(WHEELS_CFLAGS)" LDFLAGS="$(LDFLAGS) $(WHEELS_LDFLAGS)" $(PIP_WHEEL) --requirement $(WHEELHOUSE)/$(WHEELS_CROSS_COMPILE) ; \
else \
. $(CROSSENV) && $(RUN) _PYTHON_HOST_PLATFORM="$(TC_TARGET)" CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $(WHEELS_CFLAGS)" LDFLAGS="$(LDFLAGS) $(WHEELS_LDFLAGS)" $(PIP_WHEEL) --no-build-isolation --requirement $(WHEELHOUSE)/$(WHEELS_CROSS_COMPILE) ; \
. $(CROSSENV) && $(RUN) _PYTHON_HOST_PLATFORM="$(TC_TARGET)" CFLAGS="$(CFLAGS) -I$(STAGING_INSTALL_PREFIX)/$(PYTHON_INC_DIR) $(WHEELS_CFLAGS)" LDFLAGS="$(LDFLAGS) $(WHEELS_LDFLAGS)" pip $(PIP_WHEEL_ARGS) --no-build-isolation --requirement $(WHEELHOUSE)/$(WHEELS_CROSS_COMPILE) ; \
fi ; \
fi ; \
if [ -f "$(WHEELHOUSE)/$(WHEELS_PURE_PYTHON)" ]; then \
Expand Down
19 changes: 8 additions & 11 deletions spk/sickchill/Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
SPK_NAME = sickchill
SPK_VERS = 20210729
SPK_REV = 2
SPK_REV = 3
SPK_ICON = src/sickchill.png

DEPENDS = cross/$(SPK_NAME)
SPK_DEPENDS = "python38:git"
PIP=pip3
BUILD_DEPENDS = cross/python38 cross/setuptools cross/pip cross/wheel cross/poetry cross/lxml
# cross/cffi cross/setuptools cross/cryptography cross/poetry
DEPENDS = cross/PyNaCl cross/$(SPK_NAME)
SPK_DEPENDS = "python38"

WHEELS = src/requirements.txt
WHEELS = src/requirements-cross.txt src/requirements.txt

MAINTAINER = miigotu
DESCRIPTION = Automatic Video Library Manager for TV Shows. It watches for new episodes of your favorite shows, and when they are posted it does its magic.
DESCRIPTION_SPN = Gestor automático para bibliotecas de series. Busca nuevos episodios de tus series favoritas, y cuando son publicados hace su magia.
STARTABLE = yes
DISPLAY_NAME = SickChill
CHANGELOG = "Initial SickChill env fix and move to Python 3.8"
CHANGELOG = "1. SickChill environment fix<br/>2. Move to Python 3.8 without git<br/>3. Added DSM7 Support"

HOMEPAGE = https://sickchill.github.io/
LICENSE = GPL
LICENSE = GPLv3+

SERVICE_USER = auto
SERVICE_SETUP = src/service-setup.sh
Expand All @@ -31,9 +31,6 @@ WIZARDS_DIR = src/wizard/

POST_STRIP_TARGET = sickchill_extra_install

# Pure Python package, make sure ARCH is not defined
override ARCH=

include ../../mk/spksrc.spk.mk

.PHONY: sickchill_extra_install
Expand Down
16 changes: 16 additions & 0 deletions spk/sickchill/src/requirements-cross.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
cffi==1.15.0
chardet==4.0.0
click==8.0.3
###cryptography==3.4.7
future==0.18.2
greenlet==1.1.2
###importlib-metadata==1.7.0
kodipydent-alt==2021.7.16
###py38 lxml==4.6.3
MarkupSafe==2.0.1
msgpack==1.0.2
###PyNaCl==1.4.0
sgmllib3k==1.0.0
SQLAlchemy==1.4.26 #py38
wrapt==1.13.3
###python-dateutil==2.8.2
119 changes: 57 additions & 62 deletions spk/sickchill/src/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,88 +1,83 @@
appdirs==1.4.4
attrdict==2.0.1
babelfish==0.5.5
beautifulsoup4==4.9.3
###beekeeper==0.9.2
###poetry adds with removal of cross/poetry
poetry==1.2.0a2
poetry-core==1.1.0a6
poetry-date-version-plugin==2021.7.16-6
###py38 appdirs==1.4.4
babelfish==0.6.0
beautifulsoup4==4.10.0
beekeeper-alt==2021.7.16
bencode.py==4.0.0
CacheControl==0.12.6
certifi==2020.11.8
###cffi==1.14.3
chardet==3.0.4
click==7.1.2
cloudscraper==1.2.48
cachecontrol==0.12.9
certifi==2021.10.8
charset-normalizer==2.0.7
cloudscraper==1.2.58
colorama==0.4.4
configobj==5.0.6
###cryptography==3.2.1
decorator==4.4.2
decorator==5.1.0
deluge-client==1.9.0
Deprecated==1.2.10
dogpile.cache==1.0.2
deprecated==1.2.13
dogpile.cache==1.1.4
enzyme==0.4.1
feedparser==6.0.2
future==0.18.2
feedparser==6.0.8
gntp==1.0.3
guessit==3.1.1
guessit==3.4.0
html5lib==1.1
httplib2==0.18.1
idna==2.10
httplib2==0.20.2
###py38 idna==3.3
ifaddr==0.1.7
imagesize==1.2.0
IMDbPY==2020.9.25
ipaddress==1.0.23
Js2Py==0.70
jsonrpclib-pelix==0.4.2
###kodipydent==0.3.1
###lxml==4.6.1
Mako==1.1.3
markdown2==2.3.10
MarkupSafe==1.1.1
msgpack==1.0.0
IMDbPY==2021.4.18
###py38 ipaddress==1.0.23
Js2Py==0.71
jsonrpclib-pelix==0.4.3.1
###kodipydent-alt==2021.7.16
Mako==1.1.5
markdown2==2.4.1
new-rtorrent-python==1.0.1a0
oauthlib==3.1.0
packaging==20.4
pbr==5.5.1
oauthlib==3.1.1
packaging==21.2
pbr==5.7.0
profilehooks==1.12.0
putio.py==8.7.0
pyaes==1.6.1
pycparser==2.20
PyGithub==1.53
###py38 pycparser==2.20
pygithub==1.55
###py38 pyopenssl==21.0.0
pyjsparser==2.7.1
PyJWT==1.7.1
pymediainfo==4.3
PyNMA==1.0
pyOpenSSL==19.1.0
pyparsing==2.4.7
PySocks==1.7.1
pyjwt==2.3.0
pymediainfo==5.1.0
pynma==1.0
###py38 pyopenssl==20.0.1
pyparsing==3.0.4
pysocks==1.7.1
pysrt==1.1.2
python-dateutil==2.8.1
python-slugify==4.0.1
###python-dateutil==2.8.2
python-slugify==5.0.2
python-twitter==3.5
python3-fanart==2.0.0
pytz==2020.4
qbittorrent-api==2020.10.11
pytz==2021.3
qbittorrent-api==2021.8.23
rarfile==4.0
rebulk==2.0.1
requests==2.24.0
rebulk==3.1.0
requests==2.26.0
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
Send2Trash==1.5.0
sgmllib3k==1.0.0
six==1.15.0
soupsieve==2.0.1
SQLAlchemy==1.3.20
stevedore==3.2.2
send2trash==1.8.0
###py38 six==1.16.0
soupsieve==2.3
stevedore==3.5.0
subliminal==2.1.0
text-unidecode==1.3
timeago==1.0.14
tmdbsimple==2.6.6
timeago==1.0.15
tmdbsimple==2.8.0
tornado==6.1
tus.py==1.3.4
tvdbsimple==1.0.6
twilio==6.47.0
tzlocal==2.1
Unidecode==1.1.1
urllib3==1.26.0
validators==0.18.1
tzlocal==4.1
unidecode==1.3.2
urllib3==1.26.7
validators==0.18.2
webencodings==0.5.1
win-inet-pton==1.1.0
wrapt==1.12.1
xmltodict==0.10.1
xmltodict==0.12.0
zipp==3.6.0
24 changes: 16 additions & 8 deletions spk/sickchill/src/service-setup.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
PYTHON_DIR="/var/packages/python38/target"
PIP=${SYNOPKG_PKGDEST}/env/bin/pip3
PATH="${SYNOPKG_PKGDEST}/bin:${SYNOPKG_PKGDEST}/env/bin:${PYTHON_DIR}/bin:${PATH}"
HOME="${SYNOPKG_PKGDEST}/var"
VIRTUALENV="${PYTHON_DIR}/bin/virtualenv"
HOME="${SYNOPKG_PKGVAR}"
VIRTUALENV="${PYTHON_DIR}/bin/python3 -m venv"
PYTHON="${SYNOPKG_PKGDEST}/env/bin/python3"
SC_INSTALL_DIR="${SYNOPKG_PKGDEST}/share/SickChill"
SC_BINARY="${SC_INSTALL_DIR}/SickChill.py"
SC_DATA_DIR="${SYNOPKG_PKGDEST}/var/data"
SC_DATA_DIR="${SYNOPKG_PKGVAR}/data"
SC_CFG_FILE="${SC_DATA_DIR}/config.ini"


Expand Down Expand Up @@ -42,20 +42,28 @@ EOF
service_postinst() {
# Create a Python virtualenv
${VIRTUALENV} --system-site-packages ${SYNOPKG_PKGDEST}/env


# attempt to get current pip updated during install procedure
${PYTHON} -m pip install --upgrade pip

# Install the wheels
${PIP} install --no-deps --no-index -U --force-reinstall -f ${SYNOPKG_PKGDEST}/share/wheelhouse ${SYNOPKG_PKGDEST}/share/wheelhouse/*.whl

wheelhouse=${SYNOPKG_PKGDEST}/share/wheelhouse
${PIP} install --extra-index-url https://wheel-index.linuxserver.io/ubuntu/ --upgrade --force-reinstall --find-links ${wheelhouse} ${wheelhouse}/*.whl

if [ "${SYNOPKG_PKG_STATUS}" == "INSTALL" ]; then
set_config
fi

set_unix_permissions "${SYNOPKG_PKGDEST}"
if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 7 ]; then
set_unix_permissions "${SYNOPKG_PKGDEST}"
fi
}

service_postupgrade() {
set_config
set_unix_permissions "${SYNOPKG_PKGDEST}"
if [ $SYNOPKG_DSM_VERSION_MAJOR -lt 7 ]; then
set_unix_permissions "${SYNOPKG_PKGDEST}"
fi
}

service_preupgrade ()
Expand Down
2 changes: 1 addition & 1 deletion spk/sickchill/src/wizard/install_uifile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@
}]
},
{
"desc": "Permissions for all download-related packages are managed with the group <b>'sc-download'</b> in DSM.<br>Please read <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> for details."
"desc": "<p>The first time SickChill is started it might take a few moments for the interface to become available!</p><p>Permissions for all download-related packages are managed with the group <b>'sc-download'</b> in DSM.<br>Please read <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> for details.</p>"
}]
}]
4 changes: 2 additions & 2 deletions spk/sickchill/src/wizard/upgrade_uifile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[{
"step_title": "Attention! DSM Permissions",
"step_title": "Attention!",
"items": [{
"desc": "Permissions for all download-related packages are managed with the group <b>'sc-download'</b> in DSM.<br>Please read <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> for details."
"desc": "<p>The first time SickChill is started it might take a few moments for the interface to become available!</p><p>Permissions for all download-related packages are managed with the group <b>'sc-download'</b> in DSM.<br>Please read <a target=\"_blank\" href=\"https://github.com/SynoCommunity/spksrc/wiki/Permission-Management\">Permission Management</a> for details.</p>"
}]
}]

0 comments on commit 5ace92b

Please sign in to comment.