]>
Commit | Line | Data |
---|---|---|
65aa80ce ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without python2 # CPython 2.x module | |
4 | %bcond_without python3 # CPython 3.x module | |
5 | ||
6 | %define module parted | |
eb5307b8 JB |
7 | Summary: Python 2.x bindings for libparted library |
8 | Summary(pl.UTF-8): Wiązania Pythona 2.x do biblioteki libparted | |
65aa80ce | 9 | Name: python-%{module} |
cce5f450 | 10 | Version: 3.10 |
312e5c92 | 11 | Release: 8 |
6a5082dc | 12 | License: GPL v2+ |
f1f36bea | 13 | Group: Libraries/Python |
ba4d6950 | 14 | Source0: https://fedorahosted.org/releases/p/y/pyparted/pyparted-%{version}.tar.gz |
cce5f450 | 15 | # Source0-md5: d494440b34bc9ea0afea45c4a4ac3274 |
6a5082dc | 16 | URL: https://fedorahosted.org/pyparted/ |
e60c57f7 | 17 | BuildRequires: parted-devel >= 3.1 |
761dee25 | 18 | BuildRequires: pkgconfig |
94e8c355 | 19 | BuildRequires: rpm-pythonprov |
b4b55a38 | 20 | BuildRequires: rpmbuild(macros) >= 1.219 |
65aa80ce ER |
21 | %if %{with python2} |
22 | BuildRequires: python-devel >= 1:2.7 | |
23 | %endif | |
24 | %if %{with python3} | |
25 | BuildRequires: python3-devel | |
26 | BuildRequires: python3-distribute | |
27 | BuildRequires: python3-modules | |
28 | %endif | |
e60c57f7 | 29 | Requires: parted >= 3.1 |
0dccf8bd PZ |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
31 | ||
32 | %description | |
eb5307b8 JB |
33 | Python 2.x bindings for the libparted library. It is used for |
34 | manipulating partition tables. | |
0dccf8bd | 35 | |
d59db43c | 36 | %description -l pl.UTF-8 |
eb5307b8 JB |
37 | Wiązania Pythona 2.x do biblioteki libparted. Służy do modyfikowania |
38 | tablic partycji. | |
1d44540f | 39 | |
65aa80ce | 40 | %package -n python3-%{module} |
eb5307b8 JB |
41 | Summary: Python 3.x bindings for libparted library |
42 | Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki libparted | |
65aa80ce ER |
43 | Group: Libraries/Python |
44 | ||
45 | %description -n python3-%{module} | |
eb5307b8 JB |
46 | Python 3.x bindings for the libparted library. It is used for |
47 | manipulating partition tables. | |
65aa80ce ER |
48 | |
49 | %description -n python3-%{module} -l pl.UTF-8 | |
eb5307b8 JB |
50 | Wiązania Pythona 3.x do biblioteki libparted. Służy do modyfikowania |
51 | tablic partycji. | |
65aa80ce | 52 | |
0dccf8bd PZ |
53 | %prep |
54 | %setup -q -n pyparted-%{version} | |
55 | ||
56 | %build | |
65aa80ce | 57 | %if %{with python2} |
f037ab2f | 58 | %py_build |
65aa80ce ER |
59 | %endif |
60 | ||
61 | %if %{with python3} | |
f037ab2f | 62 | %py3_build |
65aa80ce | 63 | %endif |
0dccf8bd PZ |
64 | |
65 | %install | |
66 | rm -rf $RPM_BUILD_ROOT | |
65aa80ce | 67 | %if %{with python2} |
f037ab2f | 68 | %py_install |
1d44540f | 69 | |
5a6eb7e0 | 70 | %py_postclean |
65aa80ce ER |
71 | %endif |
72 | ||
73 | %if %{with python3} | |
f037ab2f | 74 | %py3_install |
65aa80ce | 75 | %endif |
5a6eb7e0 | 76 | |
0dccf8bd PZ |
77 | %clean |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
65aa80ce | 80 | %if %{with python2} |
0dccf8bd PZ |
81 | %files |
82 | %defattr(644,root,root,755) | |
3034d7e1 | 83 | %doc AUTHORS BUGS ChangeLog NEWS README TODO |
cce5f450 | 84 | %attr(755,root,root) %{py_sitedir}/_ped.so |
ba4d6950 PZ |
85 | %dir %{py_sitedir}/parted |
86 | %{py_sitedir}/parted/*.py[co] | |
89ffcaae | 87 | %{py_sitedir}/pyparted-%{version}-py*.egg-info |
65aa80ce ER |
88 | %endif |
89 | ||
90 | %if %{with python3} | |
91 | %files -n python3-%{module} | |
92 | %defattr(644,root,root,755) | |
93 | %doc AUTHORS BUGS ChangeLog NEWS README TODO | |
94 | %attr(755,root,root) %{py3_sitedir}/_ped.*.so | |
04e6a5f1 | 95 | %dir %{py3_sitedir}/parted |
65aa80ce ER |
96 | %{py3_sitedir}/parted/*.py |
97 | %{py3_sitedir}/parted/__pycache__ | |
98 | %{py3_sitedir}/pyparted-%{version}-py*.egg-info | |
99 | %endif |