]>
Commit | Line | Data |
---|---|---|
e756e9a6 SS |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without lxc # LXC support | |
4 | %bcond_without qemu # Qemu support | |
f5417bcb | 5 | %bcond_without python3 # CPython 3.x module |
e756e9a6 SS |
6 | |
7 | # qemu available only on x86 and ppc | |
a60469c3 | 8 | %ifnarch %{ix86} %{x8664} x32 ppc |
e756e9a6 SS |
9 | %undefine with_qemu |
10 | %endif | |
e756e9a6 SS |
11 | |
12 | %define origname libvirt-python | |
f5417bcb JB |
13 | Summary: Python 2.x bindings to interact with virtualization capabilities |
14 | Summary(pl.UTF-8): Wiązania Pythona 2.x do współpracy z funkcjami wirtualizacji | |
e756e9a6 | 15 | Name: python-libvirt |
ff2f91ff | 16 | Version: 1.2.20 |
61953747 | 17 | Release: 4 |
e756e9a6 SS |
18 | License: LGPL v2.1+ |
19 | Group: Development/Languages/Python | |
20 | Source0: ftp://ftp.libvirt.org/libvirt/python/%{origname}-%{version}.tar.gz | |
ff2f91ff | 21 | # Source0-md5: 2e17b3047c80291874bb96f0a80816db |
e756e9a6 | 22 | URL: http://www.libvirt.org/ |
f8d78362 JB |
23 | BuildRequires: libvirt-devel >= 1.0.2 |
24 | BuildRequires: pkgconfig | |
e721dd1d JB |
25 | BuildRequires: python >= 1:2.4 |
26 | BuildRequires: python-devel >= 1:2.4 | |
f5417bcb | 27 | %if %{with python3} |
e721dd1d JB |
28 | BuildRequires: python3 >= 1:3 |
29 | BuildRequires: python3-devel >= 1:3 | |
f5417bcb | 30 | %endif |
e756e9a6 | 31 | BuildRequires: rpm-pythonprov |
091f9fb4 | 32 | BuildRequires: rpmbuild(macros) >= 1.710 |
a0fc4e44 | 33 | BuildConflicts: python-PyXML < 0.8.4-13 |
f8d78362 | 34 | Requires: libvirt >= 1.0.2 |
e756e9a6 SS |
35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
36 | ||
37 | %description | |
38 | Libvirt is a C toolkit to interact with the virtualization | |
39 | capabilities of recent versions of Linux. | |
40 | ||
f5417bcb | 41 | This package contains the Python 2.x bindings for the libvirt library. |
e756e9a6 SS |
42 | |
43 | %description -l pl.UTF-8 | |
44 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji | |
45 | obecnych wersji Linuksa. | |
46 | ||
f5417bcb JB |
47 | Ten pakiet zawiera wiązania Pythona 2.x do biblioteki libvirt. |
48 | ||
49 | %package -n python3-libvirt | |
50 | Summary: Python 3.x bindings to interact with virtualization capabilities | |
51 | Summary(pl.UTF-8): Wiązania Pythona 3.x do współpracy z funkcjami wirtualizacji | |
52 | Group: Development/Languages/Python | |
53 | Requires: libvirt >= 1.0.2 | |
54 | ||
55 | %description -n python3-libvirt | |
56 | Libvirt is a C toolkit to interact with the virtualization | |
57 | capabilities of recent versions of Linux. | |
58 | ||
59 | This package contains the Python 3.x bindings for the libvirt library. | |
60 | ||
61 | %description -n python3-libvirt -l pl.UTF-8 | |
62 | Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji | |
63 | obecnych wersji Linuksa. | |
64 | ||
65 | Ten pakiet zawiera wiązania Pythona 3.x do biblioteki libvirt. | |
e756e9a6 SS |
66 | |
67 | %prep | |
68 | %setup -q -n %{origname}-%{version} | |
69 | ||
70 | %build | |
a96a37c7 | 71 | %py_build |
f5417bcb JB |
72 | |
73 | %if %{with python3} | |
a96a37c7 | 74 | %py3_build |
f5417bcb | 75 | %endif |
e756e9a6 SS |
76 | |
77 | %install | |
78 | rm -rf $RPM_BUILD_ROOT | |
e756e9a6 | 79 | |
a96a37c7 | 80 | %py_install |
f5417bcb | 81 | |
e756e9a6 | 82 | %py_postclean |
e756e9a6 | 83 | |
f5417bcb | 84 | %if %{with python3} |
a96a37c7 | 85 | %py3_install |
f5417bcb JB |
86 | %endif |
87 | ||
e756e9a6 SS |
88 | %clean |
89 | rm -rf $RPM_BUILD_ROOT | |
90 | ||
91 | %files | |
92 | %defattr(644,root,root,755) | |
93 | %doc AUTHORS ChangeLog README NEWS | |
94 | %attr(755,root,root) %{py_sitedir}/libvirtmod.so | |
95 | %{py_sitedir}/libvirt.py[co] | |
96 | %if %{with lxc} | |
97 | %attr(755,root,root) %{py_sitedir}/libvirtmod_lxc.so | |
98 | %{py_sitedir}/libvirt_lxc.py[co] | |
99 | %endif | |
100 | %if %{with qemu} | |
101 | %attr(755,root,root) %{py_sitedir}/libvirtmod_qemu.so | |
102 | %{py_sitedir}/libvirt_qemu.py[co] | |
103 | %endif | |
f8d78362 | 104 | %{py_sitedir}/libvirt_python-%{version}-py*.egg-info |
f5417bcb JB |
105 | |
106 | %if %{with python3} | |
107 | %files -n python3-libvirt | |
108 | %defattr(644,root,root,755) | |
109 | %doc AUTHORS ChangeLog README NEWS | |
110 | %attr(755,root,root) %{py3_sitedir}/libvirtmod.*.so | |
111 | %{py3_sitedir}/libvirt.py | |
112 | %{py3_sitedir}/__pycache__/libvirt.*.py[co] | |
113 | %if %{with lxc} | |
114 | %attr(755,root,root) %{py3_sitedir}/libvirtmod_lxc.*.so | |
115 | %{py3_sitedir}/libvirt_lxc.py | |
116 | %{py3_sitedir}/__pycache__/libvirt_lxc.*.py[co] | |
117 | %endif | |
118 | %if %{with qemu} | |
119 | %attr(755,root,root) %{py3_sitedir}/libvirtmod_qemu.*.so | |
120 | %{py3_sitedir}/libvirt_qemu.py | |
121 | %{py3_sitedir}/__pycache__/libvirt_qemu.*.py[co] | |
122 | %endif | |
123 | %{py3_sitedir}/libvirt_python-%{version}-py*.egg-info | |
124 | %endif |