3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
7 Summary: Python 2.x bindings for libparted library
8 Summary(pl.UTF-8): Wiązania Pythona 2.x do biblioteki libparted
13 Group: Libraries/Python
14 Source0: https://fedorahosted.org/releases/p/y/pyparted/pyparted-%{version}.tar.gz
15 # Source0-md5: d494440b34bc9ea0afea45c4a4ac3274
16 URL: https://fedorahosted.org/pyparted/
17 BuildRequires: parted-devel >= 3.1
18 BuildRequires: pkgconfig
19 BuildRequires: rpm-pythonprov
20 BuildRequires: rpmbuild(macros) >= 1.219
22 BuildRequires: python-devel >= 1:2.7
25 BuildRequires: python3-devel
26 BuildRequires: python3-distribute
27 BuildRequires: python3-modules
29 Requires: parted >= 3.1
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33 Python 2.x bindings for the libparted library. It is used for
34 manipulating partition tables.
36 %description -l pl.UTF-8
37 Wiązania Pythona 2.x do biblioteki libparted. Służy do modyfikowania
40 %package -n python3-%{module}
41 Summary: Python 3.x bindings for libparted library
42 Summary(pl.UTF-8): Wiązania Pythona 3.x do biblioteki libparted
43 Group: Libraries/Python
45 %description -n python3-%{module}
46 Python 3.x bindings for the libparted library. It is used for
47 manipulating partition tables.
49 %description -n python3-%{module} -l pl.UTF-8
50 Wiązania Pythona 3.x do biblioteki libparted. Służy do modyfikowania
54 %setup -q -n pyparted-%{version}
59 CFLAGS="%{rpmcflags}" \
60 %{__python} setup.py build --build-base build-2
65 CFLAGS="%{rpmcflags}" \
66 %{__python3} setup.py build --build-base build-3
70 rm -rf $RPM_BUILD_ROOT
72 %{__python} setup.py \
73 build --build-base build-2 \
74 install --skip-build \
76 --root=$RPM_BUILD_ROOT
82 %{__python3} setup.py \
83 build --build-base build-3 \
84 install --skip-build \
86 --root=$RPM_BUILD_ROOT
90 rm -rf $RPM_BUILD_ROOT
94 %defattr(644,root,root,755)
95 %doc AUTHORS BUGS ChangeLog NEWS README TODO
96 %attr(755,root,root) %{py_sitedir}/_ped.so
97 %dir %{py_sitedir}/parted
98 %{py_sitedir}/parted/*.py[co]
99 %{py_sitedir}/pyparted-%{version}-py*.egg-info
103 %files -n python3-%{module}
104 %defattr(644,root,root,755)
105 %doc AUTHORS BUGS ChangeLog NEWS README TODO
106 %attr(755,root,root) %{py3_sitedir}/_ped.*.so
107 %dir %{py3_sitedir}/parted
108 %{py3_sitedir}/parted/*.py
109 %{py3_sitedir}/parted/__pycache__
110 %{py3_sitedir}/pyparted-%{version}-py*.egg-info