diff options
-rw-r--r-- | core/modules/libvirt-python/module.build | 20 | ||||
-rw-r--r-- | core/modules/libvirt-python/module.conf | 12 | ||||
-rw-r--r-- | core/modules/libvirt-python/module.conf.ubuntu | 8 | ||||
l--------- | core/targets/qemu/libvirt-python | 1 |
4 files changed, 41 insertions, 0 deletions
diff --git a/core/modules/libvirt-python/module.build b/core/modules/libvirt-python/module.build new file mode 100644 index 00000000..ae1fdc1e --- /dev/null +++ b/core/modules/libvirt-python/module.build @@ -0,0 +1,20 @@ +#!/bin/bash +fetch_source() { + autoclone +} + +build() { + local SRCDIR="${MODULE_WORK_DIR}/src/libvirt-python" + local DSTDIR="${MODULE_BUILD_DIR}" + cde "${SRCDIR}" + + local LIBVIRT_SRCDIR="${MODULE_WORK_DIR}/../libvirt-src/src/libvirt" + PKG_CONFIG_PATH="${LIBVIRT_SRCDIR}/build/src" python3 setup.py build || perror "'setup.py build' failed." + PKG_CONFIG_PATH="${LIBVIRT_SRCDIR}/build/src" python3 setup.py install --root "${DSTDIR}" --prefix "/usr" || perror "'setup.py install' failed." + + rm -rf "${DSTDIR}/usr/lib/python3.8/site-packages/__pycache__" +} + +post_copy() { + : +} diff --git a/core/modules/libvirt-python/module.conf b/core/modules/libvirt-python/module.conf new file mode 100644 index 00000000..43142a31 --- /dev/null +++ b/core/modules/libvirt-python/module.conf @@ -0,0 +1,12 @@ +#!/bin/bash + +REQUIRED_MODULES=" + libvirt-src +" + +REQUIRED_GIT=" + https://gitlab.com/libvirt/libvirt-python.git||v7.7.0 +" + +# copy everything since there is a clean installation done by 'setup.py install' +REQUIRED_DIRECTORIES="/" diff --git a/core/modules/libvirt-python/module.conf.ubuntu b/core/modules/libvirt-python/module.conf.ubuntu new file mode 100644 index 00000000..c550b658 --- /dev/null +++ b/core/modules/libvirt-python/module.conf.ubuntu @@ -0,0 +1,8 @@ +#!/bin/bash +REQUIRED_INSTALLED_PACKAGES=" + python3 + debhelper + dh-python + pkg-config + python3-all-dev +" diff --git a/core/targets/qemu/libvirt-python b/core/targets/qemu/libvirt-python new file mode 120000 index 00000000..eb1bebda --- /dev/null +++ b/core/targets/qemu/libvirt-python @@ -0,0 +1 @@ +../../modules/libvirt-python
\ No newline at end of file |