]> git.pld-linux.org Git - packages/python-tabulate.git/blame - python-tabulate.spec
rebuild with python 3.10
[packages/python-tabulate.git] / python-tabulate.spec
CommitLineData
d01ea9cf
JP
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
5
6%define module tabulate
7Summary: Pretty-print tabular data
8Name: python-%{module}
9Version: 0.8.9
8d2ee123 10Release: 3
d01ea9cf
JP
11License: MIT
12Group: Libraries/Python
13#Source0Download: https://pypi.org/simple/tabulate/
14Source0: https://files.pythonhosted.org/packages/source/t/tabulate/%{module}-%{version}.tar.gz
15# Source0-md5: 71e6f214512ceda2892be47767156754
16URL: https://github.com/astanin/python-tabulate
17%if %{with python2}
18BuildRequires: python-modules >= 1:2.7
19BuildRequires: python-setuptools
20%endif
21%if %{with python3}
22BuildRequires: python3-modules >= 1:3.5
23BuildRequires: python3-setuptools
24%endif
25BuildRequires: rpm-pythonprov
26BuildRequires: rpmbuild(macros) >= 1.714
27Requires: python-modules >= 1:2.7
28BuildArch: noarch
29BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31%description
32Pretty-print tabular data in Python.
33
34The 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
41 decimal point
42
43%package -n python3-%{module}
44Summary: Pretty-print tabular data
45Requires: python3-modules >= 1:3.5
46
47%description -n python3-%{module}
48Pretty-print tabular data in Python.
49
50The 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
57 decimal point
58
59%prep
60%setup -q -n %{module}-%{version}
61
62%build
63%if %{with python2}
64%py_build
65%endif
66
67%if %{with python3}
68%py3_build
69%endif
70
71%install
72rm -rf $RPM_BUILD_ROOT
73
74%if %{with python2}
75%py_install
76%py_postclean
77%endif
78
79%if %{with python3}
80%py3_install
81%endif
82
83%clean
84rm -rf $RPM_BUILD_ROOT
85
86%if %{with python2}
87%files
88%defattr(644,root,root,755)
89%doc CHANGELOG README.md
90%if %{without python3}
91%attr(755,root,root) %{_bindir}/tabulate
92%endif
93%{py_sitescriptdir}/%{module}.py[co]
94%{py_sitescriptdir}/%{module}-%{version}-py*.egg-info
95%endif
96
97%if %{with python3}
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
105%endif
This page took 0.050087 seconds and 4 git commands to generate.