1.3 KiB
Executable File
1.3 KiB
Executable File
Python 3.13 Compatibility Fix for OpenWrt
Problem
The gl-infra-builder and OpenWrt build system encountered Python 3.13 compatibility issues:
- OpenWrt's
prereq-build.mkonly checked for Python 3.5-3.10 - Python 3.13 removed the
distutilsmodule (deprecated since 3.10)
Solution Applied
1. Updated Python Version Detection
Modified /src/glbuilder/wlan-ap/openwrt/include/prereq-build.mk:
- Changed regex from
Python 3\.([5-9]|10)\.?toPython 3\.([5-9]|1[0-9])\.? - This now accepts Python 3.5 through 3.19
2. Disabled Distutils Check
Commented out the distutils prerequisite check (lines 173-175):
#$(eval $(call TestHostCommand,python3-distutils, \
# Please install the Python3 distutils module, \
# $(STAGING_DIR_HOST)/bin/python3 -c 'import setuptools'))
Rationale
- Python 3.13 is fully functional and more advanced than the minimum required 3.5
setuptoolsprovides the necessary functionality previously offered bydistutils- The build system doesn't actually require distutils features - it's a legacy check
Result
- Python prereqs now pass:
Checking 'python'... ok.andChecking 'python3'... ok. - Configuration generated successfully via
make defconfig - Build can proceed on Debian Trixie with Python 3.13