package/python3: fix config directory pattern
PATCH 1/1 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.
--- package/python3/python3.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/python3/python3.mk +1 -1
@@ -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
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedVincent, All,
On 2024-06-09 12:40 -0500, Vincent Fazio spake thusly:
Quoted 8 lines
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.
Quoted 7 lines
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 <[email protected]>
Applied to master, thank you!
Regards,
Yann E. MORIN.
Quoted 24 lines
--- package/python3/python3.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/python3/python3.mk +1
-1@@ -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 ; \ doneSignature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Vincent" == Vincent Fazio <[email protected]> writes:
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.
Quoted 7 lines
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 <[email protected]>
Committed to 2024.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot