Skip to content

Commit

Permalink
hotfix pyzmq installation on bullseye (pin version <26) (#2345)
Browse files Browse the repository at this point in the history
* fix: pin pyzmq version to <26

* fix: add checks for installed ZMQ version and DRAFT_API

* Bump version to hotfix v3.5.3
  • Loading branch information
AlvinSchiller authored Apr 17, 2024
1 parent 5138bb5 commit 0ab75c1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
16 changes: 15 additions & 1 deletion installation/routines/setup_jukebox_core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/jukebox/jukebox/version.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 0ab75c1

Please sign in to comment.