From 450ae1c999f20071764aa906fb50aa18faee4818 Mon Sep 17 00:00:00 2001 From: Manuel Bentele Date: Mon, 11 Oct 2021 11:02:10 +0200 Subject: [libvirt-python] Add new module to build python wrapper for libvirt --- core/modules/libvirt-python/module.build | 20 ++++++++++++++++++++ core/modules/libvirt-python/module.conf | 12 ++++++++++++ core/modules/libvirt-python/module.conf.ubuntu | 8 ++++++++ 3 files changed, 40 insertions(+) create mode 100644 core/modules/libvirt-python/module.build create mode 100644 core/modules/libvirt-python/module.conf create mode 100644 core/modules/libvirt-python/module.conf.ubuntu (limited to 'core/modules/libvirt-python') 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 +" -- cgit v1.2.3-55-g7522