]> git.pld-linux.org Git - packages/python-libvirt.git/blob - python-libvirt.spec
up to 5.1.0
[packages/python-libvirt.git] / python-libvirt.spec
1 #
2 # Conditional build:
3 %bcond_without  lxc             # LXC support
4 %bcond_without  qemu            # Qemu support
5 %bcond_without  python3         # CPython 3.x module
6
7 # qemu available only on x86 and ppc
8 %ifnarch %{ix86} %{x8664} x32 ppc
9 %undefine       with_qemu
10 %endif
11
12 %define         origname        libvirt-python
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
15 Name:           python-libvirt
16 Version:        5.1.0
17 Release:        1
18 License:        LGPL v2.1+
19 Group:          Development/Languages/Python
20 Source0:        ftp://ftp.libvirt.org/libvirt/python/%{origname}-%{version}.tar.gz
21 # Source0-md5:  0885bce90c98a80571fc5472eb683937
22 URL:            http://www.libvirt.org/
23 BuildRequires:  libvirt-devel >= 4.5.0
24 BuildRequires:  pkgconfig
25 BuildRequires:  python >= 1:2.4
26 BuildRequires:  python-devel >= 1:2.4
27 %if %{with python3}
28 BuildRequires:  python3 >= 1:3
29 BuildRequires:  python3-devel >= 1:3
30 %endif
31 BuildRequires:  rpm-pythonprov
32 BuildRequires:  rpmbuild(macros) >= 1.710
33 BuildConflicts: python-PyXML < 0.8.4-13
34 Requires:       libvirt >= 4.5.0
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
41 This package contains the Python 2.x bindings for the libvirt library.
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
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.
66
67 %prep
68 %setup -q -n %{origname}-%{version}
69
70 %build
71 %py_build
72
73 %if %{with python3}
74 %py3_build
75 %endif
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79
80 %py_install
81
82 %py_postclean
83
84 %if %{with python3}
85 %py3_install
86 %endif
87
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
104 %{py_sitedir}/libvirt_python-%{version}-py*.egg-info
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 %{py3_sitedir}/libvirtaio.py
114 %{py3_sitedir}/__pycache__/libvirtaio.*.py[co]
115 %if %{with lxc}
116 %attr(755,root,root) %{py3_sitedir}/libvirtmod_lxc.*.so
117 %{py3_sitedir}/libvirt_lxc.py
118 %{py3_sitedir}/__pycache__/libvirt_lxc.*.py[co]
119 %endif
120 %if %{with qemu}
121 %attr(755,root,root) %{py3_sitedir}/libvirtmod_qemu.*.so
122 %{py3_sitedir}/libvirt_qemu.py
123 %{py3_sitedir}/__pycache__/libvirt_qemu.*.py[co]
124 %endif
125 %{py3_sitedir}/libvirt_python-%{version}-py*.egg-info
126 %endif
This page took 0.07673 seconds and 3 git commands to generate.