1.2.11
[libvirt-python.git] / libvirt-python.spec
1 # -*- rpm-spec -*-
2
3 %define mainstream_version 1.2.11
4 %define module_version_varname mainstream_version
5 %define taglevel 1
6
7 # Disable python 3 bindings
8 %define with_python3 0
9 %if 0%{?fedora} > 18
10 %define with_python3 1
11 %endif
12
13 Summary: The libvirt virtualization API python2 binding
14 Name: libvirt-python
15 Version: %{mainstream_version}
16 Release: %{taglevel}
17 Source0: http://libvirt.org/sources/python/%{name}-%{version}.tar.gz
18 Url: http://libvirt.org
19 License: LGPLv2+
20 Group: Development/Libraries
21 BuildRequires: libvirt-devel = %{version}-%{release}
22 BuildRequires: python-devel
23 BuildRequires: python-nose
24 BuildRequires: python-lxml
25 %if %{with_python3}
26 BuildRequires: python3-devel
27 BuildRequires: python3-nose
28 BuildRequires: python3-lxml
29 %endif
30
31 # Don't want provides for python shared objects
32 %{?filter_provides_in: %filter_provides_in %{python_sitearch}/.*\.so}
33 %{?filter_setup}
34
35 %description
36 The libvirt-python package contains a module that permits applications
37 written in the Python programming language to use the interface
38 supplied by the libvirt library to use the virtualization capabilities
39 of recent versions of Linux (and other OSes).
40
41 %if %{with_python3}
42 %package -n libvirt-python3
43 Summary: The libvirt virtualization API python3 binding
44 Url: http://libvirt.org
45 License: LGPLv2+
46 Group: Development/Libraries
47
48 %description -n libvirt-python3
49 The libvirt-python package contains a module that permits applications
50 written in the Python programming language to use the interface
51 supplied by the libvirt library to use the virtualization capabilities
52 of recent versions of Linux (and other OSes).
53 %endif
54
55 %prep
56 %setup -q
57
58 %build
59 CFLAGS="$RPM_OPT_FLAGS" %{__python} setup.py build
60 %if %{with_python3}
61 CFLAGS="$RPM_OPT_FLAGS" %{__python3} setup.py build
62 %endif
63
64 %install
65 %{__python} setup.py install --skip-build --root=%{buildroot}
66 %if %{with_python3}
67 %{__python3} setup.py install --skip-build --root=%{buildroot}
68 %endif
69 rm -f %{buildroot}%{_libdir}/python*/site-packages/*egg-info
70
71 %files
72 %defattr(-,root,root)
73 %doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/
74 %{_libdir}/python2*/site-packages/libvirt.py*
75 %{_libdir}/python2*/site-packages/libvirt_qemu.py*
76 %{_libdir}/python2*/site-packages/libvirt_lxc.py*
77 %{_libdir}/python2*/site-packages/libvirtmod*
78
79 %if %{with_python3}
80 %files -n libvirt-python3
81 %defattr(-,root,root)
82 %doc ChangeLog AUTHORS NEWS README COPYING COPYING.LESSER examples/
83 %{_libdir}/python3*/site-packages/libvirt.py*
84 %{_libdir}/python3*/site-packages/libvirt_qemu.py*
85 %{_libdir}/python3*/site-packages/libvirt_lxc.py*
86 %{_libdir}/python3*/site-packages/__pycache__/libvirt.cpython-*.py*
87 %{_libdir}/python3*/site-packages/__pycache__/libvirt_qemu.cpython-*.py*
88 %{_libdir}/python3*/site-packages/__pycache__/libvirt_lxc.cpython-*.py*
89 %{_libdir}/python3*/site-packages/libvirtmod*
90 %endif
91
92 %changelog
93 * Thu Jul 17 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - libvirt-python-1.2.5-1
94 - mainstream as-is
95
96 * Mon Apr 28 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - libvirt-python-1.2.3-2
97 - 1.2.3
98
99 * Fri Mar 21 2014 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - libvirt-python-1.2.1-1
100 - builds fine on f{18,20}
101
102