From 6a543bd03f1cdb4271a8be6c874949d138f8e5e2 Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Sun, 9 Jun 2024 12:40:48 -0500 Subject: [PATCH] package/python3: fix config directory pattern Previously, when running `PYTHON3_REMOVE_USELESS_FILES`, the hook to clean up files from the python config directory assumed a pattern of "config-$(VERSION)m-$(PLATFORM_TRIPLET)". However, the "m" ABI suffix was dropped in python 3.8, so the hook would never actually find files to delete. No error was raised due to the use of a subshell to invoke find. Also, if a platform triplet is not detected during the configure stage, the config directory (LIBPL) defaults to `config-$VERSION`, and has no trailing `-$PLATFORM_TRIPLET`. Now, we glob anything after the version to ensure files get deleted. Signed-off-by: Vincent Fazio Signed-off-by: Yann E. MORIN (cherry picked from commit a1efb5427b51bc4b39e3e33be080f1898cfea15e) Signed-off-by: Peter Korsgaard --- package/python3/python3.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/python3/python3.mk b/package/python3/python3.mk index 5d9d77af50..950006698b 100644 --- a/package/python3/python3.mk +++ b/package/python3/python3.mk @@ -204,7 +204,7 @@ define PYTHON3_REMOVE_USELESS_FILES rm -f $(TARGET_DIR)/usr/bin/python3-config rm -f $(TARGET_DIR)/usr/bin/smtpd.py.3 rm -f $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/distutils/command/wininst*.exe - for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)m-*/ \ + for i in `find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)*/ \ -type f -not -name Makefile` ; do \ rm -f $$i ; \ done