]>
Commit | Line | Data |
---|---|---|
295f1001 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # unit tests | |
4 | %bcond_without python2 # CPython 2.x module | |
5 | %bcond_without python3 # CPython 3.x module | |
6 | ||
7 | Summary: Python 2 library for displaying tabular data in nice ASCII table format | |
8 | Summary(pl.UTF-8): Biblioteka Pythona 2 do wyświetlania danych tabelarycznych w ładnej tabelce ASCII | |
9 | Name: python-prettytable | |
10 | Version: 0.7.2 | |
5e53aa0f | 11 | Release: 6 |
295f1001 JB |
12 | License: BSD |
13 | Group: Libraries/Python | |
14 | #Source0Download: https://pypi.python.org/simple/prettytable/ | |
15 | Source0: https://pypi.python.org/packages/source/P/PrettyTable/prettytable-%{version}.tar.bz2 | |
16 | # Source0-md5: 760dc900590ac3c46736167e09fa463a | |
17 | URL: https://pypi.python.org/pypi/PrettyTable | |
18 | %if %{with tests} && %(locale -a | grep -q '^C\.UTF-8$'; echo $?) | |
19 | BuildRequires: glibc-localedb-all | |
20 | %endif | |
21 | %if %{with python2} | |
22 | BuildRequires: python-modules >= 1:2.4 | |
23 | BuildRequires: python-setuptools | |
24 | %endif | |
25 | %if %{with python3} | |
26 | BuildRequires: python3-modules >= 1:3.2 | |
27 | BuildRequires: python3-setuptools | |
28 | %endif | |
29 | BuildRequires: rpm-pythonprov | |
30 | BuildRequires: rpmbuild(macros) >= 1.714 | |
31 | Requires: python-modules >= 1:2.4 | |
32 | BuildArch: noarch | |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
34 | ||
35 | %description | |
36 | A simple Python 2 library for easily displaying tabular data in a | |
37 | visually appealing ASCII table format. | |
38 | ||
39 | %description -l pl.UTF-8 | |
40 | Prosta biblioteka Pythona 2 do łatwego wyświetlania danych | |
41 | tabelarycznych w ładnie wyglądającej tabelce ASCII. | |
42 | ||
43 | %package -n python3-prettytable | |
44 | Summary: Python 3 library for displaying tabular data in nice ASCII table format | |
45 | Summary(pl.UTF-8): Biblioteka Pythona 3 do wyświetlania danych tabelarycznych w ładnej tabelce ASCII | |
46 | Group: Libraries/Python | |
47 | Requires: python3-modules >= 1:3.2 | |
48 | ||
49 | %description -n python3-prettytable | |
50 | A simple Python 3 library for easily displaying tabular data in a | |
51 | visually appealing ASCII table format. | |
52 | ||
53 | %description -n python3-prettytable -l pl.UTF-8 | |
54 | Prosta biblioteka Pythona 3 do łatwego wyświetlania danych | |
55 | tabelarycznych w ładnie wyglądającej tabelce ASCII. | |
56 | ||
57 | %prep | |
58 | %setup -q -n prettytable-%{version} | |
59 | ||
60 | %build | |
61 | %if %{with tests} | |
62 | export LC_ALL=C.UTF-8 | |
63 | %endif | |
64 | ||
65 | %if %{with python2} | |
66 | %py_build %{?with_tests:test} | |
67 | %endif | |
68 | ||
69 | %if %{with python3} | |
70 | %py3_build %{?with_tests:test} | |
71 | %endif | |
72 | ||
73 | %install | |
74 | rm -rf $RPM_BUILD_ROOT | |
75 | ||
76 | %if %{with python2} | |
77 | %py_install | |
78 | ||
79 | %py_postclean | |
80 | %endif | |
81 | ||
82 | %if %{with python3} | |
83 | %py3_install | |
84 | %endif | |
85 | ||
86 | %clean | |
87 | rm -rf $RPM_BUILD_ROOT | |
88 | ||
89 | %if %{with python2} | |
90 | %files | |
91 | %defattr(644,root,root,755) | |
92 | %doc CHANGELOG README | |
93 | %{py_sitescriptdir}/prettytable.py[co] | |
94 | %if "%{py_ver}" > "2.4" | |
95 | %{py_sitescriptdir}/prettytable-%{version}-py*.egg-info | |
96 | %endif | |
97 | %endif | |
98 | ||
99 | %if %{with python3} | |
100 | %files -n python3-prettytable | |
101 | %defattr(644,root,root,755) | |
102 | %doc CHANGELOG README | |
103 | %{py3_sitescriptdir}/prettytable.py | |
104 | %{py3_sitescriptdir}/__pycache__/prettytable.cpython-*.py[co] | |
105 | %{py3_sitescriptdir}/prettytable-%{version}-py*.egg-info | |
106 | %endif |