From 0faff8720150863ff38132f87ef65721fcb86dc1 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Tue, 24 Mar 2009 14:01:30 -0700 Subject: distutils-base.bbclass: Move common functionality to distutils-common-base.bbclass Create a new class distutils-common-base.bbclass which holds the common parts that can be used in native and target packages which need to use distutils funtionality. rpm, libxml2, zope are currently using them and needed to use distutils-native-base for native recipes. rpm and libxml need to defer the processing of certain configure parameters which we evaluate using python. So we need to have python-native built before we can process them. Hence we can not use EXTRA_OECONF which is a python variable and gets expanded during parsing recipes and ofcourse we have not yet built python-native. We pass these extra options as a separate shell variable to do_configure which we evaluate when that task is executing. --- classes/distutils-common-base.bbclass | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 classes/distutils-common-base.bbclass (limited to 'classes/distutils-common-base.bbclass') diff --git a/classes/distutils-common-base.bbclass b/classes/distutils-common-base.bbclass new file mode 100644 index 0000000000..068eac4de8 --- /dev/null +++ b/classes/distutils-common-base.bbclass @@ -0,0 +1,27 @@ +EXTRA_OEMAKE = "" + +export STAGING_INCDIR +export STAGING_LIBDIR + +def python_dir(d): + import os, bb + staging_incdir = bb.data.getVar( "STAGING_INCDIR", d, 1 ) + for majmin in "2.6 2.5 2.4 2.3".split(): + if os.path.exists( "%s/python%s" % ( staging_incdir, majmin ) ): return "python%s" % majmin + raise "No Python in STAGING_INCDIR. Forgot to build python-native ?" + +PYTHON_DIR = "${@python_dir(d)}" + +PACKAGES = "${PN}-dev ${PN}-dbg ${PN}-doc ${PN}" + +FILES_${PN} = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" + +FILES_${PN}-dev += "\ + ${libdir}/pkgconfig \ + ${libdir}/${PYTHON_DIR}/site-packages/*.la \ +" +FILES_${PN}-dbg = "\ + ${libdir}/${PYTHON_DIR}/site-packages/.debug \ + ${libdir}/${PYTHON_DIR}/site-packages/*/.debug \ + ${libdir}/${PYTHON_DIR}/site-packages/*/*/.debug \ +" -- cgit 1.2.3-korg