summaryrefslogtreecommitdiffstats
path: root/core/modules/libvirt-python
diff options
context:
space:
mode:
authorManuel Bentele2021-10-11 11:02:10 +0200
committerManuel Bentele2021-10-12 13:12:55 +0200
commit450ae1c999f20071764aa906fb50aa18faee4818 (patch)
treec6f2d94fa3291df357c33bb2a37e7aef2f158ee8 /core/modules/libvirt-python
parent[libvirt-glib] Add new module to build glib for libvirt (diff)
downloadmltk-450ae1c999f20071764aa906fb50aa18faee4818.tar.gz
mltk-450ae1c999f20071764aa906fb50aa18faee4818.tar.xz
mltk-450ae1c999f20071764aa906fb50aa18faee4818.zip
[libvirt-python] Add new module to build python wrapper for libvirt
Diffstat (limited to 'core/modules/libvirt-python')
-rw-r--r--core/modules/libvirt-python/module.build20
-rw-r--r--core/modules/libvirt-python/module.conf12
-rw-r--r--core/modules/libvirt-python/module.conf.ubuntu8
3 files changed, 40 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
+"