From 0ab75c1d28955e85c2069503b5a8428a69967d0d Mon Sep 17 00:00:00 2001 From: Alvin Schiller <103769832+AlvinSchiller@users.noreply.github.com> Date: Wed, 17 Apr 2024 23:30:46 +0200 Subject: [PATCH] hotfix pyzmq installation on bullseye (pin version <26) (#2345) * fix: pin pyzmq version to <26 * fix: add checks for installed ZMQ version and DRAFT_API * Bump version to hotfix v3.5.3 --- installation/routines/setup_jukebox_core.sh | 16 +++++++++++++++- src/jukebox/jukebox/version.py | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/installation/routines/setup_jukebox_core.sh b/installation/routines/setup_jukebox_core.sh index cb85198be..f5ef2eec2 100644 --- a/installation/routines/setup_jukebox_core.sh +++ b/installation/routines/setup_jukebox_core.sh @@ -86,7 +86,7 @@ _jukebox_core_build_and_install_pyzmq() { fi ZMQ_PREFIX="${JUKEBOX_ZMQ_PREFIX}" ZMQ_DRAFT_API=1 \ - pip install -v --no-binary pyzmq pyzmq + pip install -v --no-binary pyzmq 'pyzmq<26' else print_lc " Skipping. pyzmq already installed" fi @@ -120,6 +120,20 @@ _jukebox_core_check() { local pip_modules=$(get_args_from_file "${INSTALLATION_PATH}/requirements.txt") verify_pip_modules pyzmq $pip_modules + log " Verify ZMQ version '${JUKEBOX_ZMQ_VERSION}'" + local zmq_version=$(python -c 'import zmq; print(f"{zmq.zmq_version()}")') + if [[ "${zmq_version}" != "${JUKEBOX_ZMQ_VERSION}" ]]; then + exit_on_error "ERROR: ZMQ version '${zmq_version}' differs from expected '${JUKEBOX_ZMQ_VERSION}'!" + fi + log " CHECK" + + log " Verify ZMQ has 'DRAFT-API' activated" + local zmq_hasDraftApi=$(python -c 'import zmq; print(f"{zmq.DRAFT_API}")') + if [[ "${zmq_hasDraftApi}" != "True" ]]; then + exit_on_error "ERROR: ZMQ has 'DRAFT-API' '${zmq_hasDraftApi}' differs from expected 'True'!" + fi + log " CHECK" + verify_files_chmod_chown 644 "${CURRENT_USER}" "${CURRENT_USER_GROUP}" "${JUKEBOX_PULSE_CONFIG}" verify_files_chmod_chown 644 "${CURRENT_USER}" "${CURRENT_USER_GROUP}" "${SETTINGS_PATH}/jukebox.yaml" diff --git a/src/jukebox/jukebox/version.py b/src/jukebox/jukebox/version.py index b97391207..d62ef3e93 100644 --- a/src/jukebox/jukebox/version.py +++ b/src/jukebox/jukebox/version.py @@ -1,7 +1,7 @@ VERSION_MAJOR = 3 VERSION_MINOR = 5 -VERSION_PATCH = 2 +VERSION_PATCH = 3 VERSION_EXTRA = "" # build a version string in compliance with the SemVer specification