package/python3: fix config directory pattern

If a platform triplet is not detected during the configure stage, the
config directory (LIBPL) defaults to `config-$VERSION`.

In this scenario, the `PYTHON3_REMOVE_USELESS_FILES` hook would fail due
to `find` incorrectly expecting a second dash and then the triplet.

Now, we glob anything after the version which will match in both cases.

Fixes: 54d48c8cad ("package/python3: miscellaneous fixups")

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
This commit is contained in:
Vincent Fazio
2024-06-09 17:45:48 +02:00
committed by Yann E. MORIN
parent 089943812e
commit 035651209f
+1 -1
View File
@@ -197,7 +197,7 @@ PYTHON3_CONF_OPTS += \
define PYTHON3_REMOVE_USELESS_FILES
rm -f $(TARGET_DIR)/usr/bin/python$(PYTHON3_VERSION_MAJOR)-config
rm -f $(TARGET_DIR)/usr/bin/python3-config
find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)-*/ \
find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/config-$(PYTHON3_VERSION_MAJOR)*/ \
-type f -not -name Makefile -exec rm -rf {} \;
find $(TARGET_DIR)/usr/lib/python$(PYTHON3_VERSION_MAJOR)/ -type d \
-name __pycache__ -exec rm -rf {} \;