Chris Lalancette 89eb77f
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
Chris Lalancette 89eb77f
7afe4f5
%if 0%{?fedora} > 12 || 0%{?rhel} > 7
9d94ae8
%global with_python3 1
9d94ae8
%endif
9d94ae8
9d94ae8
%global modname prettytable
9d94ae8
9d94ae8
9d94ae8
Name:		python-%{modname}
ca85a8a
Version:	0.7.2
0bd3db3
Release:	16%{?dist}
Chris Lalancette 89eb77f
Summary:	Python library to display tabular data in tables
Chris Lalancette 89eb77f
Chris Lalancette 89eb77f
Group:		Development/Languages
Chris Lalancette 89eb77f
License:	BSD
9d94ae8
Source0:    http://pypi.python.org/packages/source/P/PrettyTable/%{modname}-%{version}.tar.gz
Chris Lalancette 89eb77f
URL:		http://pypi.python.org/pypi/PrettyTable
Chris Lalancette 89eb77f
ca85a8a
Patch0:         disable-encoding-check.patch
ca85a8a
Chris Lalancette 89eb77f
BuildArch:	noarch
e68a41a
BuildRequires:	python2-devel
e68a41a
BuildRequires:  python2-setuptools
Chris Lalancette 89eb77f
9d94ae8
%if 0%{?with_python3}
9d94ae8
BuildRequires:  python3-devel
9d94ae8
BuildRequires:  python3-setuptools
9d94ae8
%endif
9d94ae8
9d94ae8
6500be2
%global _description\
6500be2
PrettyTable is a simple Python library designed to make it quick and easy to\
6500be2
represent tabular data in visually appealing ASCII tables. It was inspired by\
6500be2
the ASCII tables used in the PostgreSQL shell psql. PrettyTable allows for\
6500be2
selection of which columns are to be printed, independent alignment of columns\
6500be2
(left or right justified or centred) and printing of "sub-tables" by specifying\
Chris Lalancette 89eb77f
a row range.
Chris Lalancette 89eb77f
6500be2
%description %_description
6500be2
6500be2
%package -n python2-%{modname}
6500be2
Summary: %summary
6500be2
%{?python_provide:%python_provide python2-%{modname}}
6500be2
6500be2
%description -n python2-%{modname} %_description
6500be2
9d94ae8
%if 0%{?with_python3}
9d94ae8
%package -n python3-%{modname}
9d94ae8
Summary:	Python library to display tabular data in tables
9d94ae8
Group:		Development/Languages
9d94ae8
9d94ae8
%description -n python3-%{modname}
9d94ae8
PrettyTable is a simple Python library designed to make it quick and easy to
9d94ae8
represent tabular data in visually appealing ASCII tables. It was inspired by
9d94ae8
the ASCII tables used in the PostgreSQL shell psql. PrettyTable allows for
9d94ae8
selection of which columns are to be printed, independent alignment of columns
9d94ae8
(left or right justified or centred) and printing of "sub-tables" by specifying
9d94ae8
a row range.
9d94ae8
%endif
9d94ae8
9d94ae8
Chris Lalancette 89eb77f
%prep
9d94ae8
%setup -q -n %{modname}-%{version}
9d94ae8
ca85a8a
%patch0 -p1
ca85a8a
9d94ae8
%if 0%{?with_python3}
9d94ae8
rm -rf %{py3dir}
9d94ae8
cp -a . %{py3dir}
9d94ae8
%endif
Chris Lalancette 89eb77f
Chris Lalancette 89eb77f
Chris Lalancette 89eb77f
%build
1ea9e00
%py2_build
Chris Lalancette 89eb77f
9d94ae8
%if 0%{?with_python3}
9d94ae8
pushd %{py3dir}
9d94ae8
%{__python3} setup.py build
9d94ae8
popd
9d94ae8
%endif
9d94ae8
9d94ae8
%check
9d94ae8
%{__python} %{modname}_test.py
9d94ae8
9d94ae8
%if 0%{?with_python3}
9d94ae8
pushd %{py3dir}
9d94ae8
%{__python3} %{modname}_test.py
9d94ae8
popd
9d94ae8
%endif
9d94ae8
Chris Lalancette 89eb77f
Chris Lalancette 89eb77f
%install
9d94ae8
%if 0%{?with_python3}
9d94ae8
pushd %{py3dir}
9d94ae8
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
9d94ae8
popd
9d94ae8
%endif
9d94ae8
0de1af9
%py2_install
Chris Lalancette 89eb77f
Chris Lalancette 89eb77f
6500be2
%files -n python2-%{modname}
f9b0f76
%{!?_licensedir:%global license %%doc}
f9b0f76
%license COPYING
f9b0f76
%doc README CHANGELOG
41aaf0f
%{python2_sitelib}/%{modname}.py*
41aaf0f
%{python2_sitelib}/%{modname}-%{version}*
9d94ae8
9d94ae8
%if 0%{?with_python3}
9d94ae8
%files -n python3-%{modname}
f9b0f76
%{!?_licensedir:%global license %%doc}
f9b0f76
%license COPYING
f9b0f76
%doc README CHANGELOG
9d94ae8
%{python3_sitelib}/%{modname}.py*
9d94ae8
%{python3_sitelib}/__pycache__/%{modname}*
9d94ae8
%{python3_sitelib}/%{modname}-%{version}*
9d94ae8
%endif
Chris Lalancette 89eb77f
Chris Lalancette 89eb77f
Chris Lalancette 89eb77f
%changelog
0bd3db3
* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-16
0bd3db3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
0bd3db3
5136dbb
* Fri Jun 15 2018 Miro Hrončok <mhroncok@redhat.com> - 0.7.2-15
5136dbb
- Rebuilt for Python 3.7
5136dbb
e68a41a
* Mon Feb 12 2018 Iryna Shcherbina <ishcherb@redhat.com> - 0.7.2-14
e68a41a
- Update Python 2 dependency declarations to new packaging standards
e68a41a
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
e68a41a
3165c76
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-13
3165c76
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
3165c76
6500be2
* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 0.7.2-12
6500be2
- Python 2 binary package renamed to python2-prettytable
6500be2
  See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3
6500be2
9a6a617
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-11
9a6a617
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
9a6a617
a2ad22f
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-10
a2ad22f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
a2ad22f
dd238ff
* Fri Dec 09 2016 Charalampos Stratakis <cstratak@redhat.com> - 0.7.2-9
dd238ff
- Rebuild for Python 3.6
dd238ff
cb7576c
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-8
cb7576c
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
cb7576c
dc580a3
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.2-7
dc580a3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
dc580a3
920383e
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-6
920383e
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
920383e
2de5e88
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-5
2de5e88
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2de5e88
f9b0f76
* Thu Jul 31 2014 Tom Callaway <spot@fedoraproject.org> - 0.7.2-4
f9b0f76
- fix license handling
f9b0f76
b6dd79c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-3
b6dd79c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
b6dd79c
37921e6
* Wed May 14 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 0.7.2-2
37921e6
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
37921e6
ca85a8a
* Tue Jan 07 2014 Pádraig Brady <pbrady@redhat.com> - 0.7.2-1
ca85a8a
- Latest upstream
ca85a8a
0b5f34b
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-3
0b5f34b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
0b5f34b
22bad32
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.1-2
22bad32
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
22bad32
9d94ae8
* Tue Aug 07 2012 Ralph Bean <rbean@redhat.com> - 0.6.1-1
9d94ae8
- New upstream version
9d94ae8
- Added support for python3
9d94ae8
- Included README, COPYING, and CHANGELOG in docs
9d94ae8
9d94ae8
* Tue Aug 07 2012 Pádraig Brady <P@draigBrady.com> - 0.6-1
7e95481
- Update to 0.6
7e95481
126c8b4
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
126c8b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
126c8b4
c82355e
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-3
c82355e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c82355e
Chris Lalancette 49506fa
* Tue Jul 05 2011 Chris Lalancette <clalance@redhat.com> - 0.5-2
Chris Lalancette 49506fa
- BuildRequire python-setuptools
Chris Lalancette 49506fa
Chris Lalancette 89eb77f
* Wed Jun 29 2011 Chris Lalancette <clalance@redhat.com> - 0.5-1
Chris Lalancette 89eb77f
- Initial package.