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