|
|
9b0464 |
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
|
|
9b0464 |
|
|
|
9b0464 |
%if 0%{?fedora} > 12 || 0%{?rhel} > 7
|
|
|
9b0464 |
%global with_python3 1
|
|
|
9b0464 |
%endif
|
|
|
9b0464 |
|
|
|
9b0464 |
%global modname prettytable
|
|
|
9b0464 |
|
|
|
9b0464 |
|
|
|
9b0464 |
Name: python-%{modname}
|
|
|
9b0464 |
Version: 0.7.2
|
|
|
9b0464 |
Release: 3%{?dist}
|
|
|
9b0464 |
Summary: Python library to display tabular data in tables
|
|
|
9b0464 |
|
|
|
9b0464 |
Group: Development/Languages
|
|
|
9b0464 |
License: BSD
|
|
|
9b0464 |
Source0: http://pypi.python.org/packages/source/P/PrettyTable/%{modname}-%{version}.tar.gz
|
|
|
9b0464 |
URL: http://pypi.python.org/pypi/PrettyTable
|
|
|
9b0464 |
|
|
|
9b0464 |
Patch0: disable-encoding-check.patch
|
|
|
9b0464 |
|
|
|
9b0464 |
BuildArch: noarch
|
|
|
9b0464 |
BuildRequires: python-devel
|
|
|
9b0464 |
BuildRequires: python-setuptools
|
|
|
9b0464 |
|
|
|
9b0464 |
%if 0%{?with_python3}
|
|
|
9b0464 |
BuildRequires: python3-devel
|
|
|
9b0464 |
BuildRequires: python3-setuptools
|
|
|
9b0464 |
%endif
|
|
|
9b0464 |
|
|
|
9b0464 |
Provides: python2-prettytable
|
|
|
9b0464 |
|
|
|
9b0464 |
%description
|
|
|
9b0464 |
PrettyTable is a simple Python library designed to make it quick and easy to
|
|
|
9b0464 |
represent tabular data in visually appealing ASCII tables. It was inspired by
|
|
|
9b0464 |
the ASCII tables used in the PostgreSQL shell psql. PrettyTable allows for
|
|
|
9b0464 |
selection of which columns are to be printed, independent alignment of columns
|
|
|
9b0464 |
(left or right justified or centred) and printing of "sub-tables" by specifying
|
|
|
9b0464 |
a row range.
|
|
|
9b0464 |
|
|
|
9b0464 |
%if 0%{?with_python3}
|
|
|
9b0464 |
%package -n python3-%{modname}
|
|
|
9b0464 |
Summary: Python library to display tabular data in tables
|
|
|
9b0464 |
Group: Development/Languages
|
|
|
9b0464 |
|
|
|
9b0464 |
%description -n python3-%{modname}
|
|
|
9b0464 |
PrettyTable is a simple Python library designed to make it quick and easy to
|
|
|
9b0464 |
represent tabular data in visually appealing ASCII tables. It was inspired by
|
|
|
9b0464 |
the ASCII tables used in the PostgreSQL shell psql. PrettyTable allows for
|
|
|
9b0464 |
selection of which columns are to be printed, independent alignment of columns
|
|
|
9b0464 |
(left or right justified or centred) and printing of "sub-tables" by specifying
|
|
|
9b0464 |
a row range.
|
|
|
9b0464 |
%endif
|
|
|
9b0464 |
|
|
|
9b0464 |
|
|
|
9b0464 |
%prep
|
|
|
9b0464 |
%setup -q -n %{modname}-%{version}
|
|
|
9b0464 |
|
|
|
9b0464 |
%patch0 -p1
|
|
|
9b0464 |
|
|
|
9b0464 |
%if 0%{?with_python3}
|
|
|
9b0464 |
rm -rf %{py3dir}
|
|
|
9b0464 |
cp -a . %{py3dir}
|
|
|
9b0464 |
%endif
|
|
|
9b0464 |
|
|
|
9b0464 |
|
|
|
9b0464 |
%build
|
|
|
9b0464 |
%{__python} setup.py build
|
|
|
9b0464 |
|
|
|
9b0464 |
%if 0%{?with_python3}
|
|
|
9b0464 |
pushd %{py3dir}
|
|
|
9b0464 |
%{__python3} setup.py build
|
|
|
9b0464 |
popd
|
|
|
9b0464 |
%endif
|
|
|
9b0464 |
|
|
|
9b0464 |
%check
|
|
|
9b0464 |
%{__python} %{modname}_test.py
|
|
|
9b0464 |
|
|
|
9b0464 |
%if 0%{?with_python3}
|
|
|
9b0464 |
pushd %{py3dir}
|
|
|
9b0464 |
%{__python3} %{modname}_test.py
|
|
|
9b0464 |
popd
|
|
|
9b0464 |
%endif
|
|
|
9b0464 |
|
|
|
9b0464 |
|
|
|
9b0464 |
%install
|
|
|
9b0464 |
%if 0%{?with_python3}
|
|
|
9b0464 |
pushd %{py3dir}
|
|
|
9b0464 |
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
|
|
9b0464 |
popd
|
|
|
9b0464 |
%endif
|
|
|
9b0464 |
|
|
|
9b0464 |
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
|
|
9b0464 |
|
|
|
9b0464 |
|
|
|
9b0464 |
%files
|
|
|
9b0464 |
%doc README COPYING CHANGELOG
|
|
|
9b0464 |
%{python_sitelib}/%{modname}.py*
|
|
|
9b0464 |
%{python_sitelib}/%{modname}-%{version}*
|
|
|
9b0464 |
|
|
|
9b0464 |
%if 0%{?with_python3}
|
|
|
9b0464 |
%files -n python3-%{modname}
|
|
|
9b0464 |
%doc README COPYING CHANGELOG
|
|
|
9b0464 |
%{python3_sitelib}/%{modname}.py*
|
|
|
9b0464 |
%{python3_sitelib}/__pycache__/%{modname}*
|
|
|
9b0464 |
%{python3_sitelib}/%{modname}-%{version}*
|
|
|
9b0464 |
%endif
|
|
|
9b0464 |
|
|
|
9b0464 |
|
|
|
9b0464 |
%changelog
|
|
|
9b0464 |
* Thu Apr 13 2017 Charalampos Stratakis <cstratak@redhat.com> - 0.7.2-3
|
|
|
9b0464 |
- Import to RHEL 7
|
|
|
9b0464 |
- Bump release for rebuild
|
|
|
9b0464 |
Resolves: rhbz#1434891
|
|
|
9b0464 |
|
|
|
9b0464 |
* Tue Jan 07 2014 Pádraig Brady <pbrady@redhat.com> - 0.7.2-1
|
|
|
9b0464 |
- Latest upstream
|
|
|
9b0464 |
|
|
|
9b0464 |
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-3
|
|
|
9b0464 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
9b0464 |
|
|
|
9b0464 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-2
|
|
|
9b0464 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
9b0464 |
|
|
|
9b0464 |
* Tue Aug 07 2012 Ralph Bean <rbean@redhat.com> - 0.6.1-1
|
|
|
9b0464 |
- New upstream version
|
|
|
9b0464 |
- Added support for python3
|
|
|
9b0464 |
- Included README, COPYING, and CHANGELOG in docs
|
|
|
9b0464 |
|
|
|
9b0464 |
* Tue Aug 07 2012 Pádraig Brady <P@draigBrady.com> - 0.6-1
|
|
|
9b0464 |
- Update to 0.6
|
|
|
9b0464 |
|
|
|
9b0464 |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
|
|
|
9b0464 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
9b0464 |
|
|
|
9b0464 |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
|
|
|
9b0464 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
9b0464 |
|
|
|
9b0464 |
* Tue Jul 05 2011 Chris Lalancette <clalance@redhat.com> - 0.5-2
|
|
|
9b0464 |
- BuildRequire python-setuptools
|
|
|
9b0464 |
|
|
|
9b0464 |
* Wed Jun 29 2011 Chris Lalancette <clalance@redhat.com> - 0.5-1
|
|
|
9b0464 |
- Initial package.
|