]> git.pld-linux.org Git - packages/python-tabulate.git/blob - python-tabulate.spec
8179a0c1112c83cdea401698fe01f66d626309f0
[packages/python-tabulate.git] / python-tabulate.spec
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
7 Summary:        Pretty-print tabular data
8 Name:           python-%{module}
9 Version:        0.8.9
10 Release:        2
11 License:        MIT
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
17 %if %{with python2}
18 BuildRequires:  python-modules >= 1:2.7
19 BuildRequires:  python-setuptools
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-modules >= 1:3.5
23 BuildRequires:  python3-setuptools
24 %endif
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.714
27 Requires:       python-modules >= 1:2.7
28 BuildArch:      noarch
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 Pretty-print tabular data in Python.
33
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
41   decimal point
42
43 %package -n python3-%{module}
44 Summary:        Pretty-print tabular data
45 Requires:       python3-modules >= 1:3.5
46
47 %description -n python3-%{module}
48 Pretty-print tabular data in Python.
49
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
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
72 rm -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
84 rm -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.092589 seconds and 2 git commands to generate.