Skip to content
Snippets Groups Projects
Commit c9a080d4 authored by Philipp Hahn's avatar Philipp Hahn Committed by Guido Günther
Browse files

Build python-libvirt for all python versions

Closes: #628828
parent 39ad1f7b
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ Build-Depends: cdbs (>= 0.4.90~),
libreadline-dev,
zlib1g-dev,
libgnutls-dev,
python-dev (>= 2.6.6-3~),
python-all-dev (>= 2.6.6-3~),
libavahi-client-dev,
libsasl2-dev,
libxen-dev [i386 amd64],
......@@ -35,14 +35,13 @@ Build-Depends: cdbs (>= 0.4.90~),
dnsmasq-base,
openssh-client,
netcat-openbsd,
XS-Python-Version: current
Build-Conflicts: dpkg-dev (= 1.15.3)
Vcs-Git: git://git.debian.org/git/pkg-libvirt/libvirt.git
Vcs-Browser: http://git.debian.org/?p=pkg-libvirt/libvirt.git
Homepage: http://libvirt.org
Standards-Version: 3.9.2
DM-Upload-Allowed: yes
X-Python-Version: 2.6
X-Python-Version: current
Package: libvirt-bin
Architecture: any
......
# Build python modules for all known python versions
include /usr/share/python/python.mk
ifeq (,$(py_sitename))
py_libdir_sh = $$(_py_=$(strip $(1)); python$${_py_\#python*} -c 'from distutils import sysconfig; print(sysconfig.get_python_lib())')
endif
PY_DIR := $(DEB_BUILDDIR)/python
PYDEFAULTVER := $(shell pyversions --version --default)
PYVERSIONS := $(shell pyversions --version --installed)
otherpy = \
set -e; for v in $(PYVERSIONS); do \
$(RM) $(PY_DIR); \
ln -sf $(PY_DIR)$$v $(PY_DIR); \
$(MAKE) \
-C $(PY_DIR) \
pyexecdir=$(call py_libdir_sh, $$v) \
PYTHON=python$$v \
PYTHON_VERSION=$$v \
PYTHON_INCLUDES=-I/usr/include/python$$v \
$1; \
$(RM) $(PY_DIR); \
done; \
ln -sf $(PY_DIR)$(PYDEFAULTVER) $(PY_DIR)
configure/python-libvirt::
set -e; for v in $(PYVERSIONS); do \
cp -la $(PY_DIR) $(PY_DIR)$$v; \
done
$(RM) -r $(PY_DIR)
ln -sf $(PY_DIR)$(PYDEFAULTVER) $(PY_DIR)
build/python-libvirt::
$(call otherpy, all)
install/python-libvirt::
$(call otherpy, install DESTDIR=$(CURDIR)/debian/tmp)
......@@ -49,7 +49,7 @@ ifneq (,$(findstring ${DEB_BUILD_ARCH}, m68k))
CFLAGS = -fwrapv -DWRAPV
endif
DEB_BUILDDIR := $(CURDIR)/debian/build
DEB_CONFIGURE_EXTRA_FLAGS := \
--disable-rpath \
$(WITH_QEMU) \
......@@ -83,10 +83,13 @@ DEB_COMPRESS_EXCLUDE = .o event-test hellolibvirt info1 suspend
DEB_PYTHON_SETUP_CMD = /dev/null
DEB_DH_MAKESHLIBS_ARGS_libvirt0 += -V 'libvirt0 (>= 0.5.0)'
DEB_DH_INSTALLINIT_ARGS = --no-restart-on-upgrade -- defaults 28 72
DEB_PYTHON_MODULE_PACKAGE = python-libvirt
LOGROTATE = $(basename $(basename $(notdir $(wildcard daemon/libvirtd*.logrotate.in))))
EXAMPLES_DIR = $(CURDIR)/debian/libvirt-doc/usr/share/doc/libvirt-doc/examples/
include debian/python.mk
binary-install/libvirt-bin::
cp $(CURDIR)/tools/libvirt-guests.init.sh $(CURDIR)/debian/libvirt-bin.libvirt-guests.init
cp $(CURDIR)/tools/libvirt-guests.sysconf $(CURDIR)/debian/libvirt-bin.libvirt-guests.default
......@@ -114,3 +117,4 @@ clean::
rm -f $(CURDIR)/debian/libvirt-bin.libvirt-guests.init
rm -f $(CURDIR)/debian/libvirt-bin.libvirt-guests.default
rm -f $(CURDIR)/debian/libvirt-bin.*.logrotate
rm -rf $(DEB_BUILDDIR)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment