Add local Pillow build support and update 32-bit download script for ARMhf compatibility
This commit is contained in:
29
build_pillow_local.sh
Executable file
29
build_pillow_local.sh
Executable file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# Build Pillow from source and place wheel in req_libraries_32bit
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
echo "======================================="
|
||||||
|
echo " BUILD PILLOW FROM SOURCE (32-bit) "
|
||||||
|
echo "======================================="
|
||||||
|
|
||||||
|
# Ensure virtual environment is activated
|
||||||
|
echo "Activating .venv..."
|
||||||
|
source .venv/bin/activate
|
||||||
|
|
||||||
|
# Find Pillow source tar.gz
|
||||||
|
PILLOW_SRC=$(ls req_libraries_32bit/Pillow-*.tar.gz 2>/dev/null | head -1)
|
||||||
|
if [ -z "$PILLOW_SRC" ]; then
|
||||||
|
echo "❌ Pillow source distribution not found in req_libraries_32bit."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Building Pillow from source: $PILLOW_SRC"
|
||||||
|
pip wheel "$PILLOW_SRC" -w req_libraries_32bit
|
||||||
|
|
||||||
|
if ls req_libraries_32bit/pillow*.whl >/dev/null 2>&1; then
|
||||||
|
echo "✅ Pillow wheel built successfully!"
|
||||||
|
echo "You can now install it offline with ./install_32bit.sh."
|
||||||
|
else
|
||||||
|
echo "❌ Pillow wheel build failed. Check build dependencies."
|
||||||
|
fi
|
||||||
@@ -22,12 +22,25 @@ echo " Target architecture: linux_armv7l"
|
|||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
# Download with explicit 32-bit ARM platform targeting
|
# Download with explicit 32-bit ARM platform targeting
|
||||||
echo "🔄 Downloading with forced 32-bit architecture..."
|
|
||||||
|
echo "🔄 Downloading with forced 32-bit architecture (armv7l and armhf)..."
|
||||||
|
|
||||||
|
# Download for armv7l (wheels only)
|
||||||
pip download -r requirements.txt -d req_libraries_32bit/ \
|
pip download -r requirements.txt -d req_libraries_32bit/ \
|
||||||
--platform linux_armv7l \
|
--platform linux_armv7l \
|
||||||
--only-binary=:all: \
|
--only-binary=:all: \
|
||||||
--python-version 311 \
|
--python-version 311 \
|
||||||
--abi cp311
|
--abi cp311 || true
|
||||||
|
# Download for armhf (wheels only)
|
||||||
|
pip download -r requirements.txt -d req_libraries_32bit/ \
|
||||||
|
--platform linux_armhf \
|
||||||
|
--only-binary=:all: \
|
||||||
|
--python-version 311 \
|
||||||
|
--abi cp311 || true
|
||||||
|
|
||||||
|
# Download Pillow as source if wheel is not available
|
||||||
|
echo "🔄 Downloading Pillow source distribution for local build..."
|
||||||
|
pip download Pillow -d req_libraries_32bit/ --no-binary=:all: || true
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "📊 Download results:"
|
echo "📊 Download results:"
|
||||||
@@ -46,21 +59,26 @@ if [ "$WHEEL_COUNT" -gt 0 ]; then
|
|||||||
echo " ⚠️ Architecture unclear"
|
echo " ⚠️ Architecture unclear"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ls req_libraries_32bit/pillow*.whl >/dev/null 2>&1; then
|
if ls req_libraries_32bit/pillow*.whl >/dev/null 2>&1; then
|
||||||
PILLOW_FILE=$(basename $(ls req_libraries_32bit/pillow*.whl | head -1))
|
PILLOW_FILE=$(basename $(ls req_libraries_32bit/pillow*.whl | head -1))
|
||||||
echo " 🖼️ PILLOW: $PILLOW_FILE"
|
echo " 🖼️ PILLOW: $PILLOW_FILE"
|
||||||
if [[ "$PILLOW_FILE" == *"armv7l"* ]]; then
|
if [[ "$PILLOW_FILE" == *"armv7l"* ]]; then
|
||||||
echo " ✅ Correct 32-bit architecture"
|
echo " ✅ Correct 32-bit architecture"
|
||||||
fi
|
fi
|
||||||
|
elif ls req_libraries_32bit/Pillow-*.tar.gz >/dev/null 2>&1; then
|
||||||
|
PILLOW_SRC=$(basename $(ls req_libraries_32bit/Pillow-*.tar.gz | head -1))
|
||||||
|
echo " 🖼️ PILLOW source: $PILLOW_SRC"
|
||||||
|
echo " ⚠️ No wheel available for 32-bit ARM. Will need to build locally."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "✅ 32-bit libraries download completed!"
|
echo "✅ 32-bit libraries download completed!"
|
||||||
echo ""
|
echo ""
|
||||||
echo "📋 Next steps:"
|
echo "📋 Next steps:"
|
||||||
echo " 1. Copy this folder to your 32-bit Raspberry Pi"
|
echo " 1. Copy this folder to your 32-bit Raspberry Pi"
|
||||||
echo " 2. Run: ./install_32bit.sh"
|
echo " 2. Run: ./install_32bit.sh"
|
||||||
|
echo " 3. If Pillow wheel is missing, run: ./build_pillow_local.sh (see instructions below)"
|
||||||
else
|
else
|
||||||
echo "❌ No wheel files downloaded"
|
echo "❌ No wheel files downloaded"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
@@ -8,16 +8,25 @@ echo " TKINTER PLAYER OFFLINE INSTALL"
|
|||||||
echo "================================="
|
echo "================================="
|
||||||
|
|
||||||
# 1. Check architecture
|
# 1. Check architecture
|
||||||
|
|
||||||
|
# Detect architecture, treating armhf and armv7l as 32-bit
|
||||||
ARCH=$(uname -m)
|
ARCH=$(uname -m)
|
||||||
echo "Architecture: $ARCH"
|
if lscpu | grep -qi 'armhf'; then
|
||||||
|
ARCH_TYPE="armhf"
|
||||||
|
else
|
||||||
|
ARCH_TYPE="$ARCH"
|
||||||
|
fi
|
||||||
|
echo "Architecture: $ARCH_TYPE"
|
||||||
|
|
||||||
# 2. Select library folder
|
# 2. Select library folder
|
||||||
if [ "$ARCH" = "armv7l" ]; then
|
|
||||||
|
# Use 32-bit libraries for armv7l or armhf
|
||||||
|
if [ "$ARCH_TYPE" = "armv7l" ] || [ "$ARCH_TYPE" = "armhf" ]; then
|
||||||
LIBS_FOLDER="req_libraries_32bit"
|
LIBS_FOLDER="req_libraries_32bit"
|
||||||
echo "Using: 32-bit libraries"
|
echo "Using: 32-bit libraries (armv7l/armhf)"
|
||||||
elif [ "$ARCH" = "aarch64" ]; then
|
elif [ "$ARCH_TYPE" = "aarch64" ]; then
|
||||||
LIBS_FOLDER="req_libraries"
|
LIBS_FOLDER="req_libraries"
|
||||||
echo "Using: 64-bit libraries"
|
echo "Using: 64-bit libraries (aarch64)"
|
||||||
else
|
else
|
||||||
LIBS_FOLDER="req_libraries"
|
LIBS_FOLDER="req_libraries"
|
||||||
echo "Using: default libraries"
|
echo "Using: default libraries"
|
||||||
|
|||||||
BIN
req_libraries_32bit/pillow-11.3.0.tar.gz
Normal file
BIN
req_libraries_32bit/pillow-11.3.0.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
req_libraries_32bit/setuptools-80.9.0-py3-none-any.whl
Normal file
BIN
req_libraries_32bit/setuptools-80.9.0-py3-none-any.whl
Normal file
Binary file not shown.
BIN
req_libraries_32bit/wheel-0.45.1-py3-none-any.whl
Normal file
BIN
req_libraries_32bit/wheel-0.45.1-py3-none-any.whl
Normal file
Binary file not shown.
7
requirements.txt
Normal file
7
requirements.txt
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
python-vlc
|
||||||
|
Pillow
|
||||||
|
pyautogui
|
||||||
|
requests
|
||||||
|
bcrypt
|
||||||
|
setuptools
|
||||||
|
wheel
|
||||||
Reference in New Issue
Block a user