3 %bcond_without tests # unit tests
4 %bcond_without python2 # CPython 2.x module
5 %bcond_without python3 # CPython 3.x module
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
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
22 BuildRequires: python-modules >= 1:2.4
23 BuildRequires: python-setuptools
26 BuildRequires: python3-modules >= 1:3.2
27 BuildRequires: python3-setuptools
29 BuildRequires: rpm-pythonprov
30 BuildRequires: rpmbuild(macros) >= 1.714
31 Requires: python-modules >= 1:2.4
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36 A simple Python 2 library for easily displaying tabular data in a
37 visually appealing ASCII table format.
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.
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
49 %description -n python3-prettytable
50 A simple Python 3 library for easily displaying tabular data in a
51 visually appealing ASCII table format.
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.
58 %setup -q -n prettytable-%{version}
66 %py_build %{?with_tests:test}
70 %py3_build %{?with_tests:test}
74 rm -rf $RPM_BUILD_ROOT
87 rm -rf $RPM_BUILD_ROOT
91 %defattr(644,root,root,755)
93 %{py_sitescriptdir}/prettytable.py[co]
94 %if "%{py_ver}" > "2.4"
95 %{py_sitescriptdir}/prettytable-%{version}-py*.egg-info
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