# Python 3.13 Compatibility Fix for OpenWrt ## Problem The `gl-infra-builder` and OpenWrt build system encountered Python 3.13 compatibility issues: 1. OpenWrt's `prereq-build.mk` only checked for Python 3.5-3.10 2. Python 3.13 removed the `distutils` module (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)\.?` to `Python 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): ```makefile #$(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 - `setuptools` provides the necessary functionality previously offered by `distutils` - The build system doesn't actually require distutils features - it's a legacy check ## Result - Python prereqs now pass: `Checking 'python'... ok.` and `Checking 'python3'... ok.` - Configuration generated successfully via `make defconfig` - Build can proceed on Debian Trixie with Python 3.13