]>
Commit | Line | Data |
---|---|---|
a91480fe AM |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_with python3 # CPython 3.x module | |
6 | ||
7 | %define module progressbar | |
8 | Summary: Text progressbar library for python | |
9 | Name: python-%{module} | |
10 | Version: 2.3 | |
e0e234a2 | 11 | Release: 2 |
a91480fe AM |
12 | License: LGPL |
13 | Group: Libraries/Python | |
14 | Source0: https://python-progressbar.googlecode.com/files/progressbar-%{version}.tar.gz | |
15 | # Source0-md5: 4f904e94b783b4c6e71aa74fd2432c59 | |
16 | URL: https://code.google.com/p/python-progressbar/ | |
a491051d | 17 | BuildRequires: rpmbuild(macros) >= 1.710 |
a91480fe AM |
18 | BuildRequires: python-distribute |
19 | BuildRequires: rpm-pythonprov | |
20 | BuildRequires: sed >= 4.0 | |
21 | %if %{with python3} | |
22 | BuildRequires: python3-devel | |
a91480fe AM |
23 | BuildRequires: python3-modules |
24 | %endif | |
25 | Requires: python-modules | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | This library provides a text mode progressbar. This is tipically used | |
31 | to display the progress of a long running operation, providing a | |
32 | visual clue that processing is underway. | |
33 | ||
34 | %package -n python3-%{module} | |
35 | Summary: Text progressbar library for python | |
36 | Group: Libraries/Python | |
37 | ||
38 | %description -n python3-%{module} | |
39 | This library provides a text mode progressbar. This is tipically used | |
40 | to display the progress of a long running operation, providing a | |
41 | visual clue that processing is underway. | |
42 | ||
43 | %prep | |
44 | %setup -q -n %{module}-%{version} | |
45 | ||
46 | %build | |
47 | %if %{with python2} | |
2caae4c1 | 48 | %py_build %{?with_tests:test} |
a91480fe AM |
49 | %endif |
50 | ||
51 | %if %{with python3} | |
2caae4c1 | 52 | %py3_build %{?with_tests:test} |
a91480fe AM |
53 | %endif |
54 | ||
55 | %install | |
56 | rm -rf $RPM_BUILD_ROOT | |
57 | ||
58 | %if %{with python2} | |
2caae4c1 | 59 | %py_install |
a91480fe AM |
60 | |
61 | %py_postclean | |
62 | %endif | |
63 | ||
64 | %if %{with python3} | |
2caae4c1 | 65 | %py3_install |
a91480fe AM |
66 | %endif |
67 | ||
68 | %clean | |
69 | rm -rf $RPM_BUILD_ROOT | |
70 | ||
71 | %if %{with python2} | |
72 | %files | |
73 | %defattr(644,root,root,755) | |
74 | %doc README.txt | |
75 | %{py_sitescriptdir}/%{module} | |
76 | %if "%{py_ver}" > "2.4" | |
77 | %{py_sitescriptdir}/%{module}-*.egg-info | |
78 | %endif | |
79 | %endif | |
80 | ||
81 | %if %{with python3} | |
82 | %files -n python3-%{module} | |
83 | %defattr(644,root,root,755) | |
84 | %doc README.txt | |
85 | %{py3_sitescriptdir}/%{module} | |
86 | %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info | |
87 | %endif |