summaryrefslogtreecommitdiffstats
path: root/recipes-extended/libvirt/libvirt-python.inc
diff options
context:
space:
mode:
authorAmy Fong <amy.fong@windriver.com>2014-02-03 14:36:57 -0500
committerBruce Ashfield <bruce.ashfield@windriver.com>2014-02-05 11:29:12 -0500
commit43fe4b7d0e517a6eceb28382a8d8d89b8379f6c6 (patch)
tree689c686ebee8b9431afa38c8b39e115e3599ccef /recipes-extended/libvirt/libvirt-python.inc
parent851547589048e0ac253d682d22b25b8baac3ce02 (diff)
downloadmeta-virtualization-43fe4b7d0e517a6eceb28382a8d8d89b8379f6c6.tar.gz
package libvirt-python
In 1.2.0, libvirt separated the python components into a separate package. Signed-off-by: Amy Fong <amy.fong@windriver.com> Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Diffstat (limited to 'recipes-extended/libvirt/libvirt-python.inc')
-rw-r--r--recipes-extended/libvirt/libvirt-python.inc37
1 files changed, 36 insertions, 1 deletions
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc
index 0d3278d2..8f553988 100644
--- a/recipes-extended/libvirt/libvirt-python.inc
+++ b/recipes-extended/libvirt/libvirt-python.inc
@@ -14,4 +14,39 @@ FILES_${PN}-python-dev += "${PYTHON_SITEPACKAGES_DIR}/*.la"
14FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" 14FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
15FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}" 15FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}"
16 16
17EXTRA_OECONF += "TARGET_PYTHON=${bindir}/python" 17SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python"
18SRC_URI += "file://libvirt_api_xml_path.patch;patchdir=../libvirt-python-${PV}"
19
20SRC_URI[libvirt_python.md5sum] = "38158e5740be65f17eef9f99ffa5dadf"
21SRC_URI[libvirt_python.sha256sum] = "2fe7e341cb1b35cff130b7a04d0d58f3607094e63cbca689bc16c7b47da0f52b"
22
23export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml"
24export LIBVIRT_CFLAGS = "-I${S}/include"
25export LIBVIRT_LIBS = "-L${S}/src/.libs -lvirt -ldl"
26export LDFLAGS="-L${S}/src/.libs"
27
28python __anonymous () {
29 pkgconfig = d.getVar('PACKAGECONFIG', True)
30 if ('python') in pkgconfig.split():
31 d.setVar('LIBVIRT_PYTHON_ENABLE', '1')
32 else:
33 d.setVar('LIBVIRT_PYTHON_ENABLE', '0')
34}
35
36do_compile_python() {
37 if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then
38 cd ${WORKDIR}/libvirt-python-${PV} && \
39 ${STAGING_BINDIR_NATIVE}/python-native/python setup.py build
40 fi
41}
42addtask do_compile_python before do_install after do_compile
43
44do_install_python() {
45 if [ "${LIBVIRT_PYTHON_ENABLE}" = "1" ]; then
46 cd ${WORKDIR}/libvirt-python-${PV} && \
47 ${STAGING_BINDIR_NATIVE}/python-native/python setup.py install \
48 --install-lib=${PYTHON_SITEPACKAGES_DIR} \
49 --root=${WORKDIR}/image
50 fi
51}
52addtask do_install_python before do_populate_sysroot after do_install