Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate remaining python3 packages to python310 #4998

Merged
merged 23 commits into from
Jan 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bfe70fb
fishnet: Migrate to Python 3.10
th0ma7 Dec 13, 2021
3828d5d
bazarr: Update to version 1.0.2 and migrate to python310
th0ma7 Dec 19, 2021
4deef8e
gevent-websocket: Remove cross as now in requirements-crossenv.txt
th0ma7 Dec 19, 2021
d8ceca5
bazaar: Remove gevent from requirements
th0ma7 Dec 19, 2021
9bfb217
plexpy-custom: Migrate to python310
th0ma7 Dec 19, 2021
3b0858a
rutorrent: Migrate to python310
th0ma7 Dec 20, 2021
05b5168
bazarr: Update to beta10 pending finale 1.0.2 release
th0ma7 Dec 23, 2021
ca69c18
bazarr: Fix webrtc using unreleased version of wheel from github
th0ma7 Dec 23, 2021
890e0fd
bazarr: Add comments related to using github as source
th0ma7 Dec 23, 2021
40aeda5
bazarr: Update to latest beta 11
th0ma7 Dec 24, 2021
9d4c1c8
blasfeo: Add blas library for numpy optimization and building
th0ma7 Dec 26, 2021
a7625d0
bazarr: Add python310 compatible numpy version
th0ma7 Dec 26, 2021
f47e8da
bazarr: Declare armv5 as unsupported due to numpy
th0ma7 Dec 26, 2021
ad2b97b
bazarr: Update to version beta12
th0ma7 Dec 26, 2021
64a78de
blasfeo: Remove as unecessary
th0ma7 Jan 2, 2022
e88c620
bazarr: Use new python framework functionality for numpy
th0ma7 Jan 2, 2022
fc4256e
bazarr: Update to v1.0.2 finale & update digests
th0ma7 Jan 2, 2022
1fb3f00
bazarr: Adjust comment and change info
th0ma7 Jan 2, 2022
013614d
python310+bazarr: Migrate numpy to 1.22.0
th0ma7 Jan 2, 2022
e73f644
bazarr: Fixing typo
th0ma7 Jan 2, 2022
abcd69a
wheel-env.mk: bazarr+python310: Fix git+https type URL-based req
th0ma7 Jan 2, 2022
914fe56
bazarr: Move placement of compile FLAGS for numpy (@smaarn)
th0ma7 Jan 2, 2022
7658a7d
Update spk/fishnet/Makefile
th0ma7 Jan 2, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions cross/bazarr/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
PKG_NAME = bazarr

PKG_VERS = 1.0.1
PKG_VERS = 1.0.2
PKG_EXT = zip
PKG_DIST_NAME = $(PKG_NAME).$(PKG_EXT)
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
Expand Down
6 changes: 3 additions & 3 deletions cross/bazarr/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
bazarr-1.0.1.zip SHA1 b6922cc89631632cfb0cd1f676b523f4a61cf95c
bazarr-1.0.1.zip SHA256 418c53ff8fa4cf738b4f76525809d320036f0eaeb931c4ad235b43e34fadaff7
bazarr-1.0.1.zip MD5 85a524c21843fbdca22957f289cf0075
bazarr-1.0.2.zip SHA1 0dcce5e58416bd860334aec2c3586cce926604b5
bazarr-1.0.2.zip SHA256 688e6ec5f311f94a70c5b52c24d358623a955f67a993ad096ea587461078bfb2
bazarr-1.0.2.zip MD5 e3001844199036f6d3b2d805ed14bda7
14 changes: 0 additions & 14 deletions cross/gevent-websocket/Makefile

This file was deleted.

Empty file removed cross/gevent-websocket/PLIST
Empty file.
3 changes: 0 additions & 3 deletions cross/gevent-websocket/digests

This file was deleted.

1 change: 1 addition & 0 deletions mk/spksrc.wheel-env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ install_python_wheel:
if stat -t requirements*.txt >/dev/null 2>&1; then \
cp requirements*.txt $(STAGING_INSTALL_WHEELHOUSE) ; \
cat requirements*.txt >> $(STAGING_INSTALL_WHEELHOUSE)/$(WHEELS_DEFAULT) ; \
sed -i -e '/^#/! s/^.*egg=//g' $(STAGING_INSTALL_WHEELHOUSE)/requirements*.txt ; \
sort -u -o $(STAGING_INSTALL_WHEELHOUSE)/$(WHEELS_DEFAULT) $(STAGING_INSTALL_WHEELHOUSE)/$(WHEELS_DEFAULT) ; \
fi ; \
if stat -t *.whl >/dev/null 2>&1; then \
Expand Down
29 changes: 20 additions & 9 deletions spk/bazarr/Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,23 @@
SPK_NAME = bazarr

SPK_VERS = 1.0.1
SPK_REV = 2
SPK_VERS = 1.0.2
SPK_REV = 3

SPK_ICON = src/bazarr.png

BUILD_DEPENDS = cross/python38
BUILD_DEPENDS = cross/python310

DEPENDS = cross/$(SPK_NAME)
DEPENDS += cross/unrar
DEPENDS += cross/numpy
DEPENDS += cross/webrtcvad
DEPENDS += cross/greenlet

SPK_DEPENDS = "python38:ffmpeg"
SPK_DEPENDS = "python310:ffmpeg"

MAINTAINER = smaarn

DESCRIPTION = "Bazarr is a companion application to Sonarr and Radarr. It manages and downloads subtitles based on your requirements. You define your preferences by TV show or movies and Bazarr takes care of everything for you."
DISPLAY_NAME = Bazarr
STARTABLE = yes
CHANGELOG = "Several provider fixes + improved UI stability during heavy tasks"
CHANGELOG = "1. Update to version 1.0.2<br/>2. Migration to Python 3.10"

HOMEPAGE = https://www.bazarr.media
LICENSE = GPLv3
Expand All @@ -34,6 +31,20 @@ SERVICE_PORT_TITLE = $(DISPLAY_NAME)
# Admin link for in DSM UI
ADMIN_PORT = $(SERVICE_PORT)

WHEELS = src/requirements.txt
WHEELS = src/requirements-crossenv.txt src/requirements-pure.txt

# [numpy] gcc-4.6.4 failed with exit status 1
# https://github.com/numpy/numpy/issues/20664
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS)

include ../../mk/spksrc.common.mk

# [numpy] Fix wheel building with older compilers
ifeq ($(call version_lt, ${TCVERSION}, 7.0),1)
WHEELS_CPPFLAGS = [numpy] -std=c++0x
ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
WHEELS_CFLAGS = [numpy] -O0
endif
endif

include ../../mk/spksrc.spk.mk
11 changes: 11 additions & 0 deletions spk/bazarr/src/requirements-crossenv.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Download bazarr from github directly as not available on pypi
# Current not supported:
# https://github.com/morpheus65535/bazarr/issues/1648
# git+https://github.com/morpheus65535/bazarr@v1.0.2#egg=bazarr==1.0.2

greenlet==1.1.2
numpy==1.22.0

# webrtcvad==2.0.10 # requires unreleased version at specific commit for qoriq arch
git+https://github.com/wiseman/py-webrtcvad@3bd761332a9404f5c9276105070ee814c4428342#egg=webrtcvad==2.0.10
1 change: 1 addition & 0 deletions spk/bazarr/src/requirements-pure.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zope.event==4.5.0
1 change: 0 additions & 1 deletion spk/bazarr/src/requirements.txt

This file was deleted.

15 changes: 5 additions & 10 deletions spk/bazarr/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
FFMPEG_DIR="/var/packages/ffmpeg/target"
PYTHON_DIR="/var/packages/python38/target"
PATH="${SYNOPKG_PKGDEST}/bin:${SYNOPKG_PKGDEST}/env/bin:${PYTHON_DIR}/bin:${FFMPEG_DIR}/bin:${PATH}"
FFMPEG_DIR="/var/packages/ffmpeg/target/bin"
th0ma7 marked this conversation as resolved.
Show resolved Hide resolved
PYTHON_DIR="/var/packages/python310/target/bin"
PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${PYTHON_DIR}:${FFMPEG_DIR}:${PATH}"
PYTHON="${SYNOPKG_PKGDEST}/env/bin/python3"
VIRTUALENV="${PYTHON_DIR}/bin/python3 -m venv"
PIP=${SYNOPKG_PKGDEST}/env/bin/pip
LANGUAGE="env LANG=en_US.UTF-8 LC_ALL=en_US.utf8"

GROUP="sc-download"
Expand All @@ -15,14 +13,11 @@ SERVICE_COMMAND="$LANGUAGE $PYTHON ${SVC_CWD}/bazarr.py --no-update --config ${S

service_postinst ()
{

# Create a Python virtualenv
${VIRTUALENV} --system-site-packages ${SYNOPKG_PKGDEST}/env

wheelhouse=${SYNOPKG_PKGDEST}/share/wheelhouse
install_python_virtualenv

# Install the wheels (using virtual env through PATH)
${PIP} install --no-deps --no-index --upgrade --force-reinstall --find-links ${wheelhouse} ${wheelhouse}/*.whl
install_python_wheels
th0ma7 marked this conversation as resolved.
Show resolved Hide resolved

mkdir -p "${SYNOPKG_PKGVAR}/data"

Expand Down
11 changes: 5 additions & 6 deletions spk/fishnet/Makefile
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
SPK_NAME = fishnet
# SPK_VERS must be in sync with src/requirements.txt
# SPK_VERS must be in sync with src/requirements-pure.txt
SPK_VERS = 1.18.1
SPK_REV = 1
SPK_REV = 2
SPK_ICON= src/fishnet.png

DEPENDS = cross/stockfish-niklasf

SPK_DEPENDS = "python3>=3.4"
PIP = pip3
SPK_DEPENDS = "python310"

MAINTAINER = mayweed
DESCRIPTION = FishNet is a distributed Stockfish analysis service for lichess.org. You need an api key from lichess.org to run this service.
DISPLAY_NAME = FishNet
HOMEPAGE = https://github.com/niklasf/fishnet#readme
CHANGELOG = "Initial release with fishnet-20200613."
CHANGELOG = "1. Initial release with fishnet-20200613<br/>2. Migration to Python 3.10"

LICENSE = GPLv3
STARTABLE = no

UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS)

WHEELS = src/requirements.txt
WHEELS = src/requirements-pure.txt
SERVICE_SETUP = src/service-setup.sh

POST_STRIP_TARGET = fishnet_extra_install
Expand Down
File renamed without changes.
13 changes: 6 additions & 7 deletions spk/fishnet/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@

PYTHON_DIR="/var/packages/python3/target/bin"
VIRTUALENV="${PYTHON_DIR}/python3 -m venv"
# Define python310 binary path
PYTHON_DIR="/var/packages/python310/target/bin"
# Add local bin, virtualenv along with python310 to the default PATH
PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${PYTHON_DIR}:${PATH}"

service_postinst ()
{
# Create a Python virtualenv
${VIRTUALENV} --system-site-packages ${SYNOPKG_PKGDEST}/env
install_python_virtualenv

# Install the wheels
wheelhouse=${SYNOPKG_PKGDEST}/share/wheelhouse
${SYNOPKG_PKGDEST}/env/bin/pip3 install --no-deps --no-index --upgrade --force-reinstall --find-links ${wheelhouse} ${wheelhouse}/*.whl

install_python_wheels

# get target file independent of python3 version
target=$(${SYNOPKG_PKGDEST}/env/bin/python3 -m site | grep -o "[^']*${SYNOPKG_PKGNAME}/env[^']*")/fishnet.py
Expand Down
6 changes: 3 additions & 3 deletions spk/plexpy-custom/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
SPK_NAME = plexpy-custom
SPK_VERS = $(shell date +%Y%m%d)
SPK_REV = 5
SPK_REV = 6
SPK_ICON = src/plexpy-custom.png

DEPENDS =
SPK_DEPENDS = "python3>=3.7.7:git"
SPK_DEPENDS = "python310:git"

MAINTAINER = cytec
DESCRIPTION = PlexPy Custom allows you to run the fork of your choice of PlexPy. You will be asked for the fork\'s git URL during install.
DESCRIPTION_FRE = PlexPy Custom vous permet d\'exécuter la variante de PlexPy votre choix. Il vous sera demandé l\'URL git de la variante à l\'installation.
RELOAD_UI = yes
DISPLAY_NAME = PlexPy Custom
CHANGELOG = "Update to Python3."
CHANGELOG = "Update to Python3.10"

HOMEPAGE = https://tautulli.com
LICENSE = GPL
Expand Down
24 changes: 10 additions & 14 deletions spk/plexpy-custom/src/service-setup.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
PYTHON_DIR="/var/packages/python3/target/bin"
# Define python310 binary path
PYTHON_DIR="/var/packages/python310/target/bin"
# Define git binary path
GIT_DIR="/var/packages/git/target/bin"
PATH="${SYNOPKG_PKGDEST}/bin:${SYNOPKG_PKGDEST}/env/bin:${PYTHON_DIR}:${GIT_DIR}:${PATH}"
# Add local bin, virtualenv along with python310 and git to the default PATH
PATH="${SYNOPKG_PKGDEST}/env/bin:${SYNOPKG_PKGDEST}/bin:${PYTHON_DIR}:${GIT_DIR}:${PATH}"
PYTHON="${SYNOPKG_PKGDEST}/env/bin/python"
GIT="${GIT_DIR}/git"
VIRTUALENV="${PYTHON_DIR}/python3 -m venv"
PLEXPY="${SYNOPKG_PKGDEST}/var/plexpy/PlexPy.py"
CFG_FILE="${SYNOPKG_PKGDEST}/var/config.ini"
PLEXPY="${SYNOPKG_PKGVAR}/plexpy/PlexPy.py"
CFG_FILE="${SYNOPKG_PKGVAR}/config.ini"

SERVICE_COMMAND="${PYTHON} ${PLEXPY} --daemon --pidfile ${PID_FILE} --config ${CFG_FILE} --datadir ${SYNOPKG_PKGDEST}/var/"
SERVICE_COMMAND="${PYTHON} ${PLEXPY} --daemon --pidfile ${PID_FILE} --config ${CFG_FILE} --datadir ${SYNOPKG_PKGVAR}"

GROUP="sc-download"
LEGACY_GROUP="sc-media"


validate_preinst ()
{
# Check fork
Expand All @@ -25,16 +26,11 @@ validate_preinst ()
service_postinst ()
{
# Create a Python virtualenv
${VIRTUALENV} --system-site-packages ${SYNOPKG_PKGDEST}/env
install_python_virtualenv

if [ "${SYNOPKG_PKG_STATUS}" == "INSTALL" ]; then
# Clone the repository
${GIT} clone -q -b ${wizard_fork_branch:=master} ${wizard_fork_url:=git://github.com/Tautulli/Tautulli.git} ${SYNOPKG_PKGDEST}/var/plexpy
${GIT} clone -q -b ${wizard_fork_branch:=master} ${wizard_fork_url:=git://github.com/Tautulli/Tautulli.git} ${SYNOPKG_PKGVAR}/plexpy
fi

# Remove legacy user
# Commands of busybox from spk/python
delgroup "${USER}" "users"
deluser "${USER}"
}

5 changes: 2 additions & 3 deletions spk/python310/src/requirements-crossenv.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@
# - DSM6 require WHEELS_CFLAGS=-std=c++0x
# - aarch64-6.1 require workaround WHEELS_CFLAGS=-O0
# ref: https://github.com/numpy/numpy/issues/13622
# numpy==1.21.5
# git+https://github.com/numpy/numpy@v1.22.0rc3#egg=numpy
# numpy==1.22.0

# webrtcvad==2.0.10 # requires unreleased version at specific commit for qoriq arch
# git+https://github.com/wiseman/py-webrtcvad@3bd761332a9404f5c9276105070ee814c4428342#egg=webrtcvad
# git+https://github.com/wiseman/py-webrtcvad@3bd761332a9404f5c9276105070ee814c4428342#egg=webrtcvad==2.0.10
17 changes: 9 additions & 8 deletions spk/rutorrent/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
SPK_NAME = rutorrent
SPK_VERS = 3.10
SPK_REV = 10
SPK_REV = 11
SPK_ICON = src/rutorrent.png
DSM_UI_DIR = app

# some dependents require C++11 support
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS)
# unsupported with cross/rtorrent
UNSUPPORTED_ARCHS += $(ARMv7L_ARCHS)
SPK_DEPENDS = "python310:PHP5.6"
WHEELS = src/requirements-pure.txt

DEPENDS = cross/busybox cross/curl cross/procps-ng cross/mediainfo cross/rtorrent cross/rutorrent cross/screen cross/unzip
DEPENDS += cross/sox
Expand All @@ -18,7 +16,7 @@ ADMIN_URL = /rutorrent/
RELOAD_UI = yes
STARTABLE = yes
DISPLAY_NAME = ruTorrent
CHANGELOG = "1. Update rutorrent to 3.10<br/>2. Update rtorrent to 0.9.8<br/>3. Update openssl to 1.1<br/>4. Fix bug issue no. 4295<br/>5. Move rtorrent configuration file to web volume for direct user access"
CHANGELOG = "1. Update rutorrent to 3.10<br/>2. Update rtorrent to 0.9.8<br/>3. Update openssl to 1.1<br/>4. Fix bug issue no. 4295<br/>5. Move rtorrent configuration file to web volume for direct user access<br/>6. Update to Python 3.10"

HOMEPAGE = https://github.com/Novik/ruTorrent
LICENSE = GPLv3
Expand All @@ -42,9 +40,12 @@ POST_STRIP_TARGET = rutorrent_extra_install
BUSYBOX_CONFIG = usrmng nice procutils
ENV += BUSYBOX_CONFIG="$(BUSYBOX_CONFIG)"

include ../../mk/spksrc.spk.mk
# some dependents require C++11 support
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS) $(OLD_PPC_ARCHS)
# unsupported with cross/rtorrent
UNSUPPORTED_ARCHS += $(ARMv7L_ARCHS)

SPK_DEPENDS = "python3>=3.7.7:php5.6"
include ../../mk/spksrc.spk.mk

.PHONY: rutorrent_extra_install
rutorrent_extra_install:
Expand Down
1 change: 1 addition & 0 deletions spk/rutorrent/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rsc:share/wheelhouse
1 change: 1 addition & 0 deletions spk/rutorrent/src/requirements-pure.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cloudscraper==1.2.58
Loading