diff options
author | Amy Fong <amy.fong@windriver.com> | 2014-02-03 14:36:57 -0500 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@windriver.com> | 2014-02-05 11:29:12 -0500 |
commit | 43fe4b7d0e517a6eceb28382a8d8d89b8379f6c6 (patch) | |
tree | 689c686ebee8b9431afa38c8b39e115e3599ccef /recipes-extended/libvirt/libvirt-python.inc | |
parent | 851547589048e0ac253d682d22b25b8baac3ce02 (diff) | |
download | meta-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.inc | 37 |
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" | |||
14 | FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" | 14 | FILES_${PN}-python-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/" |
15 | FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}" | 15 | FILES_${PN}-python += "${PYTHON_SITEPACKAGES_DIR}" |
16 | 16 | ||
17 | EXTRA_OECONF += "TARGET_PYTHON=${bindir}/python" | 17 | SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" |
18 | SRC_URI += "file://libvirt_api_xml_path.patch;patchdir=../libvirt-python-${PV}" | ||
19 | |||
20 | SRC_URI[libvirt_python.md5sum] = "38158e5740be65f17eef9f99ffa5dadf" | ||
21 | SRC_URI[libvirt_python.sha256sum] = "2fe7e341cb1b35cff130b7a04d0d58f3607094e63cbca689bc16c7b47da0f52b" | ||
22 | |||
23 | export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" | ||
24 | export LIBVIRT_CFLAGS = "-I${S}/include" | ||
25 | export LIBVIRT_LIBS = "-L${S}/src/.libs -lvirt -ldl" | ||
26 | export LDFLAGS="-L${S}/src/.libs" | ||
27 | |||
28 | python __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 | |||
36 | do_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 | } | ||
42 | addtask do_compile_python before do_install after do_compile | ||
43 | |||
44 | do_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 | } | ||
52 | addtask do_install_python before do_populate_sysroot after do_install | ||