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