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