[packages/python-libvirt] - updated to 1.2.1 - build python3 module too
qboosh
qboosh at pld-linux.org
Sun Jan 26 20:01:38 CET 2014
commit f5417bcbcb63e6114787c44203943a0044c239eb
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jan 26 20:03:00 2014 +0100
- updated to 1.2.1
- build python3 module too
python-libvirt.spec | 91 +++++++++++++++++++++++++++++++++++++++++++++--------
1 file changed, 78 insertions(+), 13 deletions(-)
---
diff --git a/python-libvirt.spec b/python-libvirt.spec
index 6b554bb..96bb787 100644
--- a/python-libvirt.spec
+++ b/python-libvirt.spec
@@ -2,6 +2,7 @@
# Conditional build:
%bcond_without lxc # LXC support
%bcond_without qemu # Qemu support
+%bcond_without python3 # CPython 3.x module
# qemu available only on x86 and ppc
%ifnarch %{ix86} %{x8664} ppc
@@ -9,20 +10,24 @@
%endif
%define origname libvirt-python
-Summary: Python bindings to interact with virtualization capabilities
-Summary(pl.UTF-8): Wiązania Pythona do współpracy z funkcjami wirtualizacji
+Summary: Python 2.x bindings to interact with virtualization capabilities
+Summary(pl.UTF-8): Wiązania Pythona 2.x do współpracy z funkcjami wirtualizacji
Name: python-libvirt
-Version: 1.2.0
+Version: 1.2.1
Release: 1
License: LGPL v2.1+
Group: Development/Languages/Python
Source0: ftp://ftp.libvirt.org/libvirt/python/%{origname}-%{version}.tar.gz
-# Source0-md5: 38158e5740be65f17eef9f99ffa5dadf
+# Source0-md5: e1effd6007b2ebd5d024c6c3838456fb
URL: http://www.libvirt.org/
BuildRequires: libvirt-devel >= 1.0.2
BuildRequires: pkgconfig
-BuildRequires: python >= 2
-BuildRequires: python-devel >= 2
+BuildRequires: python >= 2.4
+BuildRequires: python-devel >= 2.4
+%if %{with python3}
+BuildRequires: python3 >= 3
+BuildRequires: python3-devel >= 3
+%endif
BuildRequires: rpm-pythonprov
BuildRequires: rpmbuild(macros) >= 1.627
Requires: libvirt >= 1.0.2
@@ -32,13 +37,31 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Libvirt is a C toolkit to interact with the virtualization
capabilities of recent versions of Linux.
-This package contains the Python bindings for the libvirt library.
+This package contains the Python 2.x bindings for the libvirt library.
%description -l pl.UTF-8
Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji
obecnych wersji Linuksa.
-Ten pakiet zawiera wiązania Pythona do biblioteki libvirt.
+Ten pakiet zawiera wiązania Pythona 2.x do biblioteki libvirt.
+
+%package -n python3-libvirt
+Summary: Python 3.x bindings to interact with virtualization capabilities
+Summary(pl.UTF-8): Wiązania Pythona 3.x do współpracy z funkcjami wirtualizacji
+Group: Development/Languages/Python
+Requires: libvirt >= 1.0.2
+
+%description -n python3-libvirt
+Libvirt is a C toolkit to interact with the virtualization
+capabilities of recent versions of Linux.
+
+This package contains the Python 3.x bindings for the libvirt library.
+
+%description -n python3-libvirt -l pl.UTF-8
+Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji
+obecnych wersji Linuksa.
+
+Ten pakiet zawiera wiązania Pythona 3.x do biblioteki libvirt.
%prep
%setup -q -n %{origname}-%{version}
@@ -46,17 +69,39 @@ Ten pakiet zawiera wiązania Pythona do biblioteki libvirt.
%build
CC="%{__cc}" \
CFLAGS="%{rpmcflags}" \
-%{__python} setup.py build
+%{__python} setup.py build \
+ --build-base build-2
+
+%if %{with python3}
+CC="%{__cc}" \
+CFLAGS="%{rpmcflags}" \
+%{__python3} setup.py build \
+ --build-base build-3
+%endif
%install
rm -rf $RPM_BUILD_ROOT
-%{__python} setup.py install \
- --root=$RPM_BUILD_ROOT
-%py_comp $RPM_BUILD_ROOT%{py_sitedir}
-%py_ocomp $RPM_BUILD_ROOT%{py_sitedir}
+%{__python} setup.py \
+ build \
+ --build-base build-2 \
+ install \
+ --optimize=2 \
+ --skip-build \
+ --root=$RPM_BUILD_ROOT
+
%py_postclean
+%if %{with python3}
+%{__python3} setup.py \
+ build \
+ --build-base build-3 \
+ install \
+ --optimize=2 \
+ --skip-build \
+ --root=$RPM_BUILD_ROOT
+%endif
+
%clean
rm -rf $RPM_BUILD_ROOT
@@ -74,3 +119,23 @@ rm -rf $RPM_BUILD_ROOT
%{py_sitedir}/libvirt_qemu.py[co]
%endif
%{py_sitedir}/libvirt_python-%{version}-py*.egg-info
+
+%if %{with python3}
+%files -n python3-libvirt
+%defattr(644,root,root,755)
+%doc AUTHORS ChangeLog README NEWS
+%attr(755,root,root) %{py3_sitedir}/libvirtmod.*.so
+%{py3_sitedir}/libvirt.py
+%{py3_sitedir}/__pycache__/libvirt.*.py[co]
+%if %{with lxc}
+%attr(755,root,root) %{py3_sitedir}/libvirtmod_lxc.*.so
+%{py3_sitedir}/libvirt_lxc.py
+%{py3_sitedir}/__pycache__/libvirt_lxc.*.py[co]
+%endif
+%if %{with qemu}
+%attr(755,root,root) %{py3_sitedir}/libvirtmod_qemu.*.so
+%{py3_sitedir}/libvirt_qemu.py
+%{py3_sitedir}/__pycache__/libvirt_qemu.*.py[co]
+%endif
+%{py3_sitedir}/libvirt_python-%{version}-py*.egg-info
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-libvirt.git/commitdiff/f5417bcbcb63e6114787c44203943a0044c239eb
More information about the pld-cvs-commit
mailing list