]> git.pld-linux.org Git - packages/python-libvirt.git/blob - python-libvirt.spec
- updated to 1.2.1
[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} 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:        1.2.1
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:  e1effd6007b2ebd5d024c6c3838456fb
22 URL:            http://www.libvirt.org/
23 BuildRequires:  libvirt-devel >= 1.0.2
24 BuildRequires:  pkgconfig
25 BuildRequires:  python >= 2.4
26 BuildRequires:  python-devel >= 2.4
27 %if %{with python3}
28 BuildRequires:  python3 >= 3
29 BuildRequires:  python3-devel >= 3
30 %endif
31 BuildRequires:  rpm-pythonprov
32 BuildRequires:  rpmbuild(macros) >= 1.627
33 Requires:       libvirt >= 1.0.2
34 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36 %description
37 Libvirt is a C toolkit to interact with the virtualization
38 capabilities of recent versions of Linux.
39
40 This package contains the Python 2.x bindings for the libvirt library.
41
42 %description -l pl.UTF-8
43 Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji
44 obecnych wersji Linuksa.
45
46 Ten pakiet zawiera wiązania Pythona 2.x do biblioteki libvirt.
47
48 %package -n python3-libvirt
49 Summary:        Python 3.x bindings to interact with virtualization capabilities
50 Summary(pl.UTF-8):      Wiązania Pythona 3.x do współpracy z funkcjami wirtualizacji
51 Group:          Development/Languages/Python
52 Requires:       libvirt >= 1.0.2
53
54 %description -n python3-libvirt
55 Libvirt is a C toolkit to interact with the virtualization
56 capabilities of recent versions of Linux.
57
58 This package contains the Python 3.x bindings for the libvirt library.
59
60 %description -n python3-libvirt -l pl.UTF-8
61 Libvirt to zestaw narzędzi w C do współpracy z funkcjami wirtualizacji
62 obecnych wersji Linuksa.
63
64 Ten pakiet zawiera wiązania Pythona 3.x do biblioteki libvirt.
65
66 %prep
67 %setup -q -n %{origname}-%{version}
68
69 %build
70 CC="%{__cc}" \
71 CFLAGS="%{rpmcflags}" \
72 %{__python} setup.py build \
73         --build-base build-2
74
75 %if %{with python3}
76 CC="%{__cc}" \
77 CFLAGS="%{rpmcflags}" \
78 %{__python3} setup.py build \
79         --build-base build-3
80 %endif
81
82 %install
83 rm -rf $RPM_BUILD_ROOT
84
85 %{__python} setup.py \
86         build \
87                 --build-base build-2 \
88         install \
89                 --optimize=2 \
90                 --skip-build \
91                 --root=$RPM_BUILD_ROOT
92
93 %py_postclean
94
95 %if %{with python3}
96 %{__python3} setup.py \
97         build \
98                 --build-base build-3 \
99         install \
100                 --optimize=2 \
101                 --skip-build \
102                 --root=$RPM_BUILD_ROOT
103 %endif
104
105 %clean
106 rm -rf $RPM_BUILD_ROOT
107
108 %files
109 %defattr(644,root,root,755)
110 %doc AUTHORS ChangeLog README NEWS
111 %attr(755,root,root) %{py_sitedir}/libvirtmod.so
112 %{py_sitedir}/libvirt.py[co]
113 %if %{with lxc}
114 %attr(755,root,root) %{py_sitedir}/libvirtmod_lxc.so
115 %{py_sitedir}/libvirt_lxc.py[co]
116 %endif
117 %if %{with qemu}
118 %attr(755,root,root) %{py_sitedir}/libvirtmod_qemu.so
119 %{py_sitedir}/libvirt_qemu.py[co]
120 %endif
121 %{py_sitedir}/libvirt_python-%{version}-py*.egg-info
122
123 %if %{with python3}
124 %files -n python3-libvirt
125 %defattr(644,root,root,755)
126 %doc AUTHORS ChangeLog README NEWS
127 %attr(755,root,root) %{py3_sitedir}/libvirtmod.*.so
128 %{py3_sitedir}/libvirt.py
129 %{py3_sitedir}/__pycache__/libvirt.*.py[co]
130 %if %{with lxc}
131 %attr(755,root,root) %{py3_sitedir}/libvirtmod_lxc.*.so
132 %{py3_sitedir}/libvirt_lxc.py
133 %{py3_sitedir}/__pycache__/libvirt_lxc.*.py[co]
134 %endif
135 %if %{with qemu}
136 %attr(755,root,root) %{py3_sitedir}/libvirtmod_qemu.*.so
137 %{py3_sitedir}/libvirt_qemu.py
138 %{py3_sitedir}/__pycache__/libvirt_qemu.*.py[co]
139 %endif
140 %{py3_sitedir}/libvirt_python-%{version}-py*.egg-info
141 %endif
This page took 0.163452 seconds and 3 git commands to generate.