Skip to contentSkip to conversation

package/python-msgpack: fix build without cpp toolchain

PATCH Applied James Hilliard 2 participants 2 messages Nov 26, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/python-msgpack: fix build without cpp toolchain

Prior to being updated to version 1.0.7 in 014a66fcde68bd0b612b62ec722ccc93bdc0d7f9 python-msgpack would automatically fall back to the pure python version if the cpp based optimized extension would fail to build for any reason.

This however is no longer the case after updating to 1.0.7 where it is now required that we explicitely set the MSGPACK_PUREPYTHON=1 if we do not have cpp support enabled in the toolchain.

Fixes:
- http://autobuild.buildroot.net/results/361/36185a19bed4bd57421a4d909bce1976c89d130f
- http://autobuild.buildroot.net/results/477/477f822cb196ebc2246bcbdc1b6eaf940fc018cd

---
 package/python-msgpack/python-msgpack.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/python-msgpack/python-msgpack.mk +4 -0
index 061ff5a761..82110b1776 100644
@@ -11,4 +11,8 @@ PYTHON_MSGPACK_LICENSE = Apache-2.0
 PYTHON_MSGPACK_LICENSE_FILES = COPYING
 PYTHON_MSGPACK_SETUP_TYPE = setuptools
 
+ifeq ($(BR2_INSTALL_LIBSTDCPP),)
+PYTHON_MSGPACK_ENV = MSGPACK_PUREPYTHON=1
+endif
+
 $(eval $(python-package))
Signature · 6 lines
2.34.1

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

James, All,

On 2023-11-26 13:33 -0700, James Hilliard spake thusly:

Quoted 23 lines

Prior to being updated to version 1.0.7 in 014a66fcde68bd0b612b62ec722ccc93bdc0d7f9 python-msgpack would automatically fall back to the pure python version if the cpp based optimized extension would fail to build for any reason.

This however is no longer the case after updating to 1.0.7 where it is now required that we explicitely set the MSGPACK_PUREPYTHON=1 if we do not have cpp support enabled in the toolchain.

Fixes:
- http://autobuild.buildroot.net/results/361/36185a19bed4bd57421a4d909bce1976c89d130f
- http://autobuild.buildroot.net/results/477/477f822cb196ebc2246bcbdc1b6eaf940fc018cd

---
 package/python-msgpack/python-msgpack.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/python-msgpack/python-msgpack.mk +0 -0
index 061ff5a761..82110b1776 100644

package/python-msgpack/python-msgpack.mk PYTHON_MSGPACK_LICENSE = Apache-2.0 · line 16

Quoted 6 lines
package/python-msgpack/python-msgpack.mk +3 -0
@@ -11,4 +11,8 @@ PYTHON_MSGPACK_LICENSE = Apache-2.0
 PYTHON_MSGPACK_LICENSE_FILES = COPYING
 PYTHON_MSGPACK_SETUP_TYPE = setuptools
 
+ifeq ($(BR2_INSTALL_LIBSTDCPP),)
+PYTHON_MSGPACK_ENV = MSGPACK_PUREPYTHON=1
+endif

As you explained on IRC, the value we set it to does not matter:
whatever the value (even empty!), it forces to use pure python code. I.e. there is no way to force it to use C++.

Applied to master with a comment explaining that, thanks.

Regards,
Yann E. MORIN.

Quoted 8 lines
package/python-msgpack/python-msgpack.mk +0 -0
 $(eval $(python-package))
Signature · 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