Skip to content

Commit dc9c5c4

Browse files
committed
Merge branch 'future3/develop' into pr/astnerdev/2557
2 parents 3aa1c09 + bb01989 commit dc9c5c4

6 files changed

Lines changed: 32 additions & 13 deletions

File tree

.flake8

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ ignore =
88
# continuation line under-indented for visual indent
99
E128,
1010
# line break before binary operator
11-
W503
11+
W503,
12+
# global name / nonlocal name is unused: name is never assigned in scope
13+
F824
1214
per-file-ignores =
1315
# Only in __init__files ignore imported but unused
1416
# Not necessary, if __all__ is declared in __init__ file

.github/workflows/pythonpackage_future3.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,23 @@ on:
55
branches:
66
- 'future3/**'
77
paths:
8+
- '.github/workflows/pythonpackage_future3.yml'
9+
- '.flake8'
10+
- 'run_flake8.sh'
11+
- '.coveragerc'
12+
- 'run_pytest.sh'
13+
- '**requirements*.txt'
814
- '**.py'
915
pull_request:
1016
branches:
1117
- 'future3/**'
1218
paths:
19+
- '.github/workflows/pythonpackage_future3.yml'
20+
- '.flake8'
21+
- 'run_flake8.sh'
22+
- '.coveragerc'
23+
- 'run_pytest.sh'
24+
- '**requirements*.txt'
1325
- '**.py'
1426

1527
jobs:
@@ -19,7 +31,7 @@ jobs:
1931
strategy:
2032
max-parallel: 4
2133
matrix:
22-
python-version: ['3.9', '3.10', '3.11', '3.12']
34+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
2335

2436
steps:
2537
- uses: actions/checkout@v4
@@ -31,6 +43,11 @@ jobs:
3143
run: |
3244
sudo apt-get update
3345
sudo apt-get install -y libasound2-dev pulseaudio
46+
47+
CUR_DIR="$(pwd)"
48+
mkdir -p tmp && cd tmp && wget -q http://abyz.me.uk/lg/lg.zip && unzip lg.zip > /dev/null && cd lg && make && sudo make install
49+
cd "${CUR_DIR}" && sudo rm -rf tmp > /dev/null
50+
3451
python3 -m venv .venv
3552
source ".venv/bin/activate"
3653

installation/includes/02_helpers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ verify_optional_service_enablement() {
399399
# 1 : textfile to read
400400
get_args_from_file() {
401401
local package_file="$1"
402-
sed 's/.*#egg=//g' ${package_file} | sed -E 's/(#|=|>|<|;).*//g' | xargs echo
402+
sed 's/.*#egg=//g' ${package_file} | sed -E 's/(#|=|>|<|;|--).*//g' | xargs echo
403403
}
404404

405405
# Check if all passed packages are installed. Fail on first missing.

installation/routines/setup_jukebox_core.sh

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,13 @@ _jukebox_core_install_os_dependencies() {
2121
--allow-change-held-packages
2222
}
2323

24-
_jukebox_core_build_and_install_lgpio() {
24+
_jukebox_core_build_and_install_lg() {
2525
local tmp_path="${HOME_PATH}/tmp"
2626
local lg_filename="lg"
2727
local lg_zip_filename="${lg_filename}.zip"
2828

29-
sudo apt-get -y install swig unzip python3-dev python3-setuptools
29+
# always build lg and lgpio from source as pypi wheels are incomplete (armv6, python3.13) or broken (bullseye)
30+
# build needs apt packages "swig python3-dev"
3031
mkdir -p "${tmp_path}" && cd "${tmp_path}" || exit_on_error
3132
download_from_url "http://abyz.me.uk/lg/${lg_zip_filename}" "${lg_zip_filename}"
3233
unzip ${lg_zip_filename} || exit_on_error
@@ -47,14 +48,9 @@ _jukebox_core_install_python_requirements() {
4748
# Remove excluded libs, if installed - see https://github.com/MiczFlor/RPi-Jukebox-RFID/pull/2470
4849
pip uninstall -y -r "${INSTALLATION_PATH}"/requirements-excluded.txt
4950

50-
# prepare lgpio build for bullseye as the binaries are broken
51-
local pip_install_options=""
52-
if [ "$(is_debian_version_at_least 12)" = false ]; then
53-
_jukebox_core_build_and_install_lgpio
54-
pip_install_options="--no-binary=lgpio"
55-
fi
51+
_jukebox_core_build_and_install_lg
5652

57-
pip install --no-cache-dir -r "${INSTALLATION_PATH}/requirements.txt" ${pip_install_options}
53+
pip install --no-cache-dir -r "${INSTALLATION_PATH}/requirements.txt"
5854
}
5955

6056
_jukebox_core_configure_pulseaudio() {

packages-core.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,9 @@ pulseaudio-utils
1414
python3
1515
python3-venv
1616
python3-dev
17+
python3-setuptools
1718
rsync
19+
swig # needed for lg build
20+
tar
21+
unzip
1822
wget

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ tornado
2222

2323
# RPi's GPIO packages:
2424
# use shim to keep current RPi.GPIO behavior also under Bookworm - see https://github.com/MiczFlor/RPi-Jukebox-RFID/issues/2313
25-
rpi-lgpio
25+
rpi-lgpio --no-binary=lgpio
2626
gpiozero
2727

2828
# PyZMQ is a special case:

0 commit comments

Comments
 (0)