3 %bcond_without python2 # CPython 2.x module
4 %bcond_without python3 # CPython 3.x module
6 %define module tabulate
7 Summary: Pretty-print tabular data
12 Group: Libraries/Python
13 #Source0Download: https://pypi.org/simple/tabulate/
14 Source0: https://files.pythonhosted.org/packages/source/t/tabulate/%{module}-%{version}.tar.gz
15 # Source0-md5: 71e6f214512ceda2892be47767156754
16 URL: https://github.com/astanin/python-tabulate
18 BuildRequires: python-modules >= 1:2.7
19 BuildRequires: python-setuptools
22 BuildRequires: python3-modules >= 1:3.5
23 BuildRequires: python3-setuptools
25 BuildRequires: rpm-pythonprov
26 BuildRequires: rpmbuild(macros) >= 1.714
27 Requires: python-modules >= 1:2.7
29 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 Pretty-print tabular data in Python.
34 The main use cases of the library are:
35 - printing small tables without hassle: just one function call,
36 formatting is guided by the data itself
37 - authoring tabular data for lightweight plain-text markup: multiple
38 output formats suitable for further editing or transformation
39 - readable presentation of mixed textual and numeric data: smart
40 column alignment, configurable number formatting, alignment by a
43 %package -n python3-%{module}
44 Summary: Pretty-print tabular data
45 Requires: python3-modules >= 1:3.5
47 %description -n python3-%{module}
48 Pretty-print tabular data in Python.
50 The main use cases of the library are:
51 - printing small tables without hassle: just one function call,
52 formatting is guided by the data itself
53 - authoring tabular data for lightweight plain-text markup: multiple
54 output formats suitable for further editing or transformation
55 - readable presentation of mixed textual and numeric data: smart
56 column alignment, configurable number formatting, alignment by a
60 %setup -q -n %{module}-%{version}
72 rm -rf $RPM_BUILD_ROOT
84 rm -rf $RPM_BUILD_ROOT
88 %defattr(644,root,root,755)
89 %doc CHANGELOG README.md
90 %if %{without python3}
91 %attr(755,root,root) %{_bindir}/tabulate
93 %{py_sitescriptdir}/%{module}.py[co]
94 %{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
98 %files -n python3-%{module}
99 %defattr(644,root,root,755)
100 %doc CHANGELOG README.md
101 %attr(755,root,root) %{_bindir}/tabulate
102 %{py3_sitescriptdir}/__pycache__/%{module}.cpython-*.py[co]
103 %{py3_sitescriptdir}/%{module}.py
104 %{py3_sitescriptdir}/%{module}-%{version}-py*.egg-info