]> git.pld-linux.org Git - packages/python-parted.git/blob - python-parted.spec
14d9f0e63b776aae55a2c0ee8c19255cd2679c8e
[packages/python-parted.git] / python-parted.spec
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
7 Summary:        Python 2.x bindings for libparted library
8 Summary(pl.UTF-8):      Wiązania Pythona 2.x do biblioteki libparted
9 Name:           python-%{module}
10 Version:        3.11.2
11 Release:        6
12 License:        GPL v2+
13 Group:          Libraries/Python
14 #Source0Download: https://github.com/dcantrell/pyparted/releases
15 Source0:        https://github.com/dcantrell/pyparted/releases/download/v%{version}/pyparted-%{version}.tar.gz
16 # Source0-md5:  9477016f5a00bd2d7a280879cdeec3a4
17 Patch0:         gcc10.patch
18 URL:            https://github.com/dcantrell/pyparted
19 BuildRequires:  parted-devel >= 3.1
20 BuildRequires:  pkgconfig
21 BuildRequires:  rpm-pythonprov
22 BuildRequires:  rpmbuild(macros) >= 1.714
23 %if %{with python2}
24 BuildRequires:  python-devel >= 1:2.7
25 BuildRequires:  python-modules >= 1:2.7
26 %endif
27 %if %{with python3}
28 BuildRequires:  python3-devel >= 1:3.2
29 BuildRequires:  python3-modules >= 1:3.2
30 %endif
31 Requires:       parted >= 3.1
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 Python 2.x bindings for the libparted library. It is used for
36 manipulating partition tables.
37
38 %description -l pl.UTF-8
39 Wiązania Pythona 2.x do biblioteki libparted. Służy do modyfikowania
40 tablic partycji.
41
42 %package -n python3-%{module}
43 Summary:        Python 3.x bindings for libparted library
44 Summary(pl.UTF-8):      Wiązania Pythona 3.x do biblioteki libparted
45 Group:          Libraries/Python
46 Requires:       parted >= 3.1
47
48 %description -n python3-%{module}
49 Python 3.x bindings for the libparted library. It is used for
50 manipulating partition tables.
51
52 %description -n python3-%{module} -l pl.UTF-8
53 Wiązania Pythona 3.x do biblioteki libparted. Służy do modyfikowania
54 tablic partycji.
55
56 %prep
57 %setup -q -n pyparted-%{version}
58 %patch0 -p1
59
60 %build
61 %if %{with python2}
62 %py_build
63 %endif
64
65 %if %{with python3}
66 %py3_build
67 %endif
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 %if %{with python2}
72 %py_install
73
74 %py_postclean
75 %endif
76
77 %if %{with python3}
78 %py3_install
79 %endif
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %if %{with python2}
85 %files
86 %defattr(644,root,root,755)
87 %doc AUTHORS NEWS README TODO
88 %attr(755,root,root) %{py_sitedir}/_ped.so
89 %dir %{py_sitedir}/parted
90 %{py_sitedir}/parted/*.py[co]
91 %{py_sitedir}/pyparted-%{version}-py*.egg-info
92 %endif
93
94 %if %{with python3}
95 %files -n python3-%{module}
96 %defattr(644,root,root,755)
97 %doc AUTHORS NEWS README TODO
98 %attr(755,root,root) %{py3_sitedir}/_ped.*.so
99 %dir %{py3_sitedir}/parted
100 %{py3_sitedir}/parted/*.py
101 %{py3_sitedir}/parted/__pycache__
102 %{py3_sitedir}/pyparted-%{version}-py*.egg-info
103 %endif
This page took 0.073916 seconds and 2 git commands to generate.