Skip to contentSkip to conversation

libiio: Conditionally inherit distutils3-base

PATCH In review Martin Siegumfeldt 2 participants 3 messages Oct 29, 2019 – Oct 30, 2019

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 libiio: Conditionally inherit distutils3-base

* inherit only when libiio-python3 is build.

* also add PACKAGECONFIG variant that allows python bindings to be enabled and disabled. It adheres to the current CMake logic and defaults to an 'out-out' approach.

---
 meta-oe/recipes-support/libiio/libiio_git.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-oe/recipes-support/libiio/libiio_git.bb +5 -2
index e6e0eaef8..ec3a39de1 100644
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https"
 
 S = "${WORKDIR}/git"
 
-inherit cmake python3native systemd distutils3-base
+inherit cmake python3native systemd
 
 DEPENDS = " \
     flex-native bison-native libaio \
@@ -25,10 +25,13 @@ EXTRA_OECMAKE = " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DWITH_SYSTEMD=ON -DSYSTEMD_UNIT_INSTALL_DIR=${systemd_system_unitdir}', '', d)} \
 "
 
-PACKAGECONFIG ??= "USB_BACKEND NETWORK_BACKEND"
+PACKAGECONFIG ??= "USB_BACKEND NETWORK_BACKEND PYTHON_BINDINGS"
 
 PACKAGECONFIG[USB_BACKEND] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1,libxml2"
 PACKAGECONFIG[NETWORK_BACKEND] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
+PACKAGECONFIG[PYTHON_BINDINGS] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'distutils3-base', '', d)}
 
 PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}"
 
Signature · 1 line
2.17.1
#1 lore raw
Quoted 26 lines · Martin Siegumfeldt

* inherit only when libiio-python3 is build.

* also add PACKAGECONFIG variant that allows python bindings to be enabled and disabled. It adheres to the current CMake logic and defaults to an 'out-out' approach.

---
 meta-oe/recipes-support/libiio/libiio_git.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-oe/recipes-support/libiio/libiio_git.bb +1 -1
index e6e0eaef8..ec3a39de1 100644
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https"
 
 S = "${WORKDIR}/git"
 
-inherit cmake python3native systemd distutils3-base
+inherit cmake python3native systemd
 
 DEPENDS = " \
     flex-native bison-native libaio \

meta-oe/recipes-support/libiio/libiio_git.bb EXTRA_OECMAKE = " \ · line 28

Quoted 5 lines
meta-oe/recipes-support/libiio/libiio_git.bb +1 -1
@@ -25,10 +25,13 @@ EXTRA_OECMAKE = " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DWITH_SYSTEMD=ON -DSYSTEMD_UNIT_INSTALL_DIR=${systemd_system_unitdir}', '', d)} \
 "
 
-PACKAGECONFIG ??= "USB_BACKEND NETWORK_BACKEND"
+PACKAGECONFIG ??= "USB_BACKEND NETWORK_BACKEND PYTHON_BINDINGS"

this change is not needed.

meta-oe/recipes-support/libiio/libiio_git.bb EXTRA_OECMAKE = " \ · line 32

Quoted 4 lines
meta-oe/recipes-support/libiio/libiio_git.bb +1 -0
 PACKAGECONFIG[USB_BACKEND] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1,libxml2"
 PACKAGECONFIG[NETWORK_BACKEND] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
+PACKAGECONFIG[PYTHON_BINDINGS] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"

this should be
PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"

Quoted 13 lines
meta-oe/recipes-support/libiio/libiio_git.bb +2 -1
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'distutils3-base', '', d)}
 
 PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}"
 
--

2.17.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw

_____________________________________
From: Khem Raj <[email protected]>
Sent: Tuesday, October 29, 2019 10:27 PM
To: Martin Siegumfeldt
Cc: openembeded-devel
Subject: Re: [oe] [meta-oe][PATCH v2] libiio: Conditionally inherit distutils3-base

Quoted 26 lines · Martin Siegumfeldt

* inherit only when libiio-python3 is build.

* also add PACKAGECONFIG variant that allows python bindings to be enabled and disabled. It adheres to the current CMake logic and defaults to an 'out-out' approach.

---
 meta-oe/recipes-support/libiio/libiio_git.bb | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
meta-oe/recipes-support/libiio/libiio_git.bb +1 -1
index e6e0eaef8..ec3a39de1 100644
@@ -12,7 +12,7 @@ SRC_URI = "git://github.com/analogdevicesinc/libiio.git;protocol=https"
 
 S = "${WORKDIR}/git"
 
-inherit cmake python3native systemd distutils3-base
+inherit cmake python3native systemd
 
 DEPENDS = " \
     flex-native bison-native libaio \

meta-oe/recipes-support/libiio/libiio_git.bb EXTRA_OECMAKE = " \ · line 28

Quoted 5 lines
meta-oe/recipes-support/libiio/libiio_git.bb +1 -1
@@ -25,10 +25,13 @@ EXTRA_OECMAKE = " \
     ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-DWITH_SYSTEMD=ON -DSYSTEMD_UNIT_INSTALL_DIR=${systemd_system_unitdir}', '', d)} \
 "
 
-PACKAGECONFIG ??= "USB_BACKEND NETWORK_BACKEND"
+PACKAGECONFIG ??= "USB_BACKEND NETWORK_BACKEND PYTHON_BINDINGS"

this change is not needed.

meta-oe/recipes-support/libiio/libiio_git.bb EXTRA_OECMAKE = " \ · line 32

Quoted 4 lines
meta-oe/recipes-support/libiio/libiio_git.bb +1 -0
 PACKAGECONFIG[USB_BACKEND] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libusb1,libxml2"
 PACKAGECONFIG[NETWORK_BACKEND] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
+PACKAGECONFIG[PYTHON_BINDINGS] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"

this should be
PACKAGECONFIG[libiio-python3] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"

Ok, patch updated and resent - hopefully we are closing in :)

Quoted 13 lines
meta-oe/recipes-support/libiio/libiio_git.bb +2 -1
+
+inherit ${@bb.utils.contains('PACKAGECONFIG', 'libiio-python3', 'distutils3-base', '', d)}
 
 PACKAGES =+ "${PN}-iiod ${PN}-tests ${PN}-${PYTHON_PN}"
 
--

2.17.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel