summaryrefslogblamecommitdiffstats
path: root/core/modules/libvirt-python/module.build
blob: eadebbf2bb053dc9448e1d68aef022cd382a3410 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                                                                                 




                                                                                                     
 
                                                                    




             
#!/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" \
		--install-layout "deb" \
		--install-lib "/usr/lib/python3/dist-packages" || perror "'setup.py install' failed."

	rm -rf "${DSTDIR}/usr/lib/python3/dist-packages/__pycache__"
}

post_copy() {
	:
}