]> git.pld-linux.org Git - packages/python-parted.git/blob - python-parted.spec
ff488ec17d82681f6f62af4a84d065205de2c4bb
[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.10
11 Release:        3
12 License:        GPL v2+
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
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
29 Requires:       parted >= 3.1
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 Python 2.x bindings for the libparted library. It is used for
34 manipulating partition tables.
35
36 %description -l pl.UTF-8
37 Wiązania Pythona 2.x do biblioteki libparted. Służy do modyfikowania
38 tablic partycji.
39
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
44
45 %description -n python3-%{module}
46 Python 3.x bindings for the libparted library. It is used for
47 manipulating partition tables.
48
49 %description -n python3-%{module} -l pl.UTF-8
50 Wiązania Pythona 3.x do biblioteki libparted. Służy do modyfikowania
51 tablic partycji.
52
53 %prep
54 %setup -q -n pyparted-%{version}
55
56 %build
57 %if %{with python2}
58 CC="%{__cc}" \
59 CFLAGS="%{rpmcflags}" \
60 %{__python} setup.py build --build-base build-2
61 %endif
62
63 %if %{with python3}
64 CC="%{__cc}" \
65 CFLAGS="%{rpmcflags}" \
66 %{__python3} setup.py build --build-base build-3
67 %endif
68
69 %install
70 rm -rf $RPM_BUILD_ROOT
71 %if %{with python2}
72 %{__python} setup.py \
73         build --build-base build-2 \
74         install --skip-build \
75         --optimize=2 \
76         --root=$RPM_BUILD_ROOT
77
78 %py_postclean
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
88
89 %clean
90 rm -rf $RPM_BUILD_ROOT
91
92 %if %{with python2}
93 %files
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
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
107 %dir %{py3_sitedir}/parted
108 %{py3_sitedir}/parted/*.py
109 %{py3_sitedir}/parted/__pycache__
110 %{py3_sitedir}/pyparted-%{version}-py*.egg-info
111 %endif
This page took 0.070209 seconds and 2 git commands to generate.