@@ -12,13 +12,15 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
1212
1313S = "${WORKDIR} /git"
1414
15- inherit cmake python3native systemd
15+ DISTUTILS_SETUP_PATH ?= " ${B} /bindings/python/"
1616
1717DEPENDS = " \
1818 flex-native bison-native libaio \
1919 ${@ bb . utils . contains ('DISTRO_FEATURES' , 'zeroconf' , 'avahi' , '' , d )} \
2020"
2121
22+ inherit cmake python3native systemd setuptools3
23+
2224EXTRA_OECMAKE = " \
2325 -DCMAKE_BUILD_TYPE=RelWithDebInfo \
2426 -DUDEV_RULES_INSTALL_DIR=${nonarch_base_libdir} /udev/rules.d \
@@ -31,8 +33,6 @@ PACKAGECONFIG[usb_backend] = "-DWITH_USB_BACKEND=ON,-DWITH_USB_BACKEND=OFF,libus
3133PACKAGECONFIG [network_backend ] = "-DWITH_NETWORK_BACKEND=ON,-DWITH_NETWORK_BACKEND=OFF,libxml2"
3234PACKAGECONFIG [libiio -python3 ] = "-DPYTHON_BINDINGS=ON,-DPYTHON_BINDINGS=OFF"
3335
34- inherit ${@ bb . utils . contains ('PACKAGECONFIG' , 'libiio-python3' , 'distutils3-base' , '' , d )}
35-
3636PACKAGES = + "${PN} -iiod ${PN} -tests ${PN} -${PYTHON_PN} "
3737
3838RDEPENDS_${PN} -${PYTHON_PN} = "${PN} ${PYTHON_PN} -ctypes ${PYTHON_PN} -stringold"
@@ -46,3 +46,23 @@ FILES_${PN}-${PYTHON_PN} = "${PYTHON_SITEPACKAGES_DIR}"
4646
4747SYSTEMD_PACKAGES = "${PN} -iiod"
4848SYSTEMD_SERVICE_${PN} -iiod = "iiod.service"
49+
50+ # Explicitly define do_configure, do_compile and do_install because both cmake and setuptools3 have
51+ # EXPORT_FUNCTIONS do_configure do_compile do_install
52+ do_configure () {
53+ cmake_do_configure
54+ }
55+
56+ do_compile () {
57+ if ${@ bb . utils . contains ('PACKAGECONFIG' , 'libiio-python3' , 'true' , 'false' , d )}; then
58+ distutils3_do_compile
59+ fi
60+ cmake_do_compile
61+ }
62+
63+ do_install () {
64+ if ${@ bb . utils . contains ('PACKAGECONFIG' , 'libiio-python3' , 'true' , 'false' , d )}; then
65+ distutils3_do_install
66+ fi
67+ cmake_do_install
68+ }
0 commit comments