From ebc999b2b3400219cc4baf9837f5544d2cbcc82f Mon Sep 17 00:00:00 2001 From: "Aaron D. Lee" Date: Sat, 10 Jan 2026 23:10:10 -0500 Subject: [PATCH] RPi: Simpler approach - filter lines containing turbo/mozjpeg --- rpi/setup.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rpi/setup.sh b/rpi/setup.sh index d684cb8..478c135 100755 --- a/rpi/setup.sh +++ b/rpi/setup.sh @@ -369,15 +369,12 @@ else # Patch setup.py to only build standard libjpeg versions echo " Patching setup.py to skip turbo/mozjpeg (need cmake)..." python3 -c " -import re with open('setup.py', 'r') as f: - content = f.read() -# Remove turbo and mozjpeg entries from libjpeg_versions dict -content = re.sub(r\"\\s*'turbo\\d+':[^,]+,\", '', content) -content = re.sub(r\"\\s*'mozjpeg\\d+':[^,]+,\", '', content) -content = re.sub(r\"\\s*#.*turbo.*\\n\", '\\n', content) + lines = f.readlines() +# Filter out lines containing turbo or mozjpeg +filtered = [l for l in lines if 'turbo' not in l and 'mozjpeg' not in l] with open('setup.py', 'w') as f: - f.write(content) + f.writelines(filtered) " # Build and install