Skip to contentSkip to conversation

package/libiio: set PYTHON_EXECUTABLE

PATCH Applied Fabrice Fontaine 4 participants 4 messages Jan 2, 2022 – Jan 26, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libiio: set PYTHON_EXECUTABLE

Set PYTHON_EXECUTABLE to avoid the following build failure when BR2_PACKAGE_PYTHON is enabled but libiio finds python3 without setuptools on host:

-- Found Python: /usr/bin/python3.5 (found version "3.5.3") found components: Interpreter -- new
-- Python_EXECUTABLE /usr/bin/python3.5

[...]

Traceback (most recent call last):
File "/home/buildroot/autobuild/instance-0/output-1/build/libiio-0.23/bindings/python/setup.py", line 15, in <module>
from setuptools import setup
ImportError: No module named 'setuptools'

Fixes:
- http://autobuild.buildroot.org/results/d80e56e4ad84c8e7f244cf6d1cb96c116e8eb734

---
 package/libiio/libiio.mk | 2 ++
 1 file changed, 2 insertions(+)
package/libiio/libiio.mk +2 -0
index f706298c22..38b2f83e6e 100644
@@ -76,8 +76,10 @@ endif
 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y)
 ifeq ($(BR2_PACKAGE_PYTHON),y)
 LIBIIO_DEPENDENCIES += host-python-setuptools python
+LIBIIO_CONF_OPTS += -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python
 else ifeq ($(BR2_PACKAGE_PYTHON3),y)
 LIBIIO_DEPENDENCIES += host-python3-setuptools python3
+LIBIIO_CONF_OPTS += -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3
 endif
 LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON
 else
Signature · 6 lines
2.33.0

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

Hi Fabrice,

Quoted 17 lines · Fabrice Fontaine

Set PYTHON_EXECUTABLE to avoid the following build failure when BR2_PACKAGE_PYTHON is enabled but libiio finds python3 without setuptools on host:

-- Found Python: /usr/bin/python3.5 (found version "3.5.3") found
components: Interpreter
-- new
-- Python_EXECUTABLE /usr/bin/python3.5

[...]

Traceback (most recent call last):
File
"/home/buildroot/autobuild/instance-0/output-1/build/libiio-0.23/bindings/python/setup.py", line 15, in <module>
from setuptools import setup
ImportError: No module named 'setuptools'

Quoted 5 lines

Fixes:
-
http://autobuild.buildroot.org/results/d80e56e4ad84c8e7f244cf6d1cb96c116e8eb734

Cheers,
-Paul

Quoted 20 lines
---
 package/libiio/libiio.mk | 2 ++
 1 file changed, 2 insertions(+)
package/libiio/libiio.mk +2 -1
index f706298c22..38b2f83e6e 100644
@@ -76,8 +76,10 @@ endif
 ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y)
 ifeq ($(BR2_PACKAGE_PYTHON),y)
 LIBIIO_DEPENDENCIES += host-python-setuptools python
+LIBIIO_CONF_OPTS += -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python
 else ifeq ($(BR2_PACKAGE_PYTHON3),y)
 LIBIIO_DEPENDENCIES += host-python3-setuptools python3
+LIBIIO_CONF_OPTS += -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3
 endif
 LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON
 else
--
Quoted 2 lines

2.33.0

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

#2 lore raw
In reply to Fabrice Fontaine
Quoted 15 lines · Fabrice Fontaine

Set PYTHON_EXECUTABLE to avoid the following build failure when BR2_PACKAGE_PYTHON is enabled but libiio finds python3 without setuptools on host:

-- Found Python: /usr/bin/python3.5 (found version "3.5.3") found components: Interpreter -- new
-- Python_EXECUTABLE /usr/bin/python3.5

[...]

Traceback (most recent call last):
File "/home/buildroot/autobuild/instance-0/output-1/build/libiio-0.23/bindings/python/setup.py", line 15, in <module>
from setuptools import setup
ImportError: No module named 'setuptools'

Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/d80e56e4ad84c8e7f244cf6d1cb96c116e8eb734

Applied to master, thanks.

Regards,
Arnout

Quoted 10 lines
---
  package/libiio/libiio.mk | 2 ++
  1 file changed, 2 insertions(+)
package/libiio/libiio.mk +0 -0
index f706298c22..38b2f83e6e 100644

package/libiio/libiio.mk endif · line 85

Quoted 10 lines
package/libiio/libiio.mk +2 -0
@@ -76,8 +76,10 @@ endif
  ifeq ($(BR2_PACKAGE_LIBIIO_BINDINGS_PYTHON),y)
  ifeq ($(BR2_PACKAGE_PYTHON),y)
  LIBIIO_DEPENDENCIES += host-python-setuptools python
+LIBIIO_CONF_OPTS += -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python
  else ifeq ($(BR2_PACKAGE_PYTHON3),y)
  LIBIIO_DEPENDENCIES += host-python3-setuptools python3
+LIBIIO_CONF_OPTS += -DPYTHON_EXECUTABLE=$(HOST_DIR)/bin/python3
  endif
  LIBIIO_CONF_OPTS += -DPYTHON_BINDINGS=ON
  else

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

#3 lore raw
In reply to Fabrice Fontaine
Quoted 17 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Fabrice" == Fabrice Fontaine <[email protected]> writes:

Set PYTHON_EXECUTABLE to avoid the following build failure when BR2_PACKAGE_PYTHON is enabled but libiio finds python3 without setuptools on host:

-- Found Python: /usr/bin/python3.5 (found version "3.5.3") found components: Interpreter -- new
-- Python_EXECUTABLE /usr/bin/python3.5

[...]

Traceback (most recent call last):
File "/home/buildroot/autobuild/instance-0/output-1/build/libiio-0.23/bindings/python/setup.py", line 15, in <module>
from setuptools import setup
ImportError: No module named 'setuptools'

Quoted 4 lines

Fixes:
- http://autobuild.buildroot.org/results/d80e56e4ad84c8e7f244cf6d1cb96c116e8eb734

Committed to 2021.11.x, thanks.

Signature · 5 lines
Bye, Peter Korsgaard
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot