diff mbox series

python-pygobject: skip the package if gobject-introspection is disabled

Message ID 20180116200550.16731-1-ross.burton@intel.com
State New
Headers show
Series python-pygobject: skip the package if gobject-introspection is disabled | expand

Commit Message

Ross Burton Jan. 16, 2018, 8:05 p.m. UTC
This package simply produced obscure errors if gobject-introspection is
disabled, so refuse to build in that situation.

Signed-off-by: Ross Burton <ross.burton@intel.com>

---
 meta/recipes-devtools/python/python3-pygobject_3.26.1.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

-- 
2.11.0

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-devtools/python/python3-pygobject_3.26.1.bb b/meta/recipes-devtools/python/python3-pygobject_3.26.1.bb
index 0405b44f177..b12d5174446 100644
--- a/meta/recipes-devtools/python/python3-pygobject_3.26.1.bb
+++ b/meta/recipes-devtools/python/python3-pygobject_3.26.1.bb
@@ -17,7 +17,6 @@  SRC_URI[sha256sum] = "f5577b9b9c70cabb9a60d81b855d488b767c66f867432e7fb64aa7269b
 
 S = "${WORKDIR}/${SRCNAME}-${PV}"
 
-
 PACKAGECONFIG ??= "${@bb.utils.contains_any('DISTRO_FEATURES', [ 'directfb', 'wayland', 'x11' ], 'cairo', '', d)}"
 
 # python3-pycairo is checked on configuration -> DEPENDS
@@ -28,3 +27,8 @@  RDEPENDS_${PN} += "python3-setuptools python3-importlib"
 
 BBCLASSEXTEND = "native"
 PACKAGECONFIG_class-native = ""
+
+python () {
+    if d.getVar("GI_DATA_ENABLED") != "True":
+        raise bb.parse.SkipPackage("gobject-introspection won't work, disabling recipe")
+}