remove python2

Merge pull request !6 from 桐小哥/master
This commit is contained in:
openeuler-ci-bot 2020-09-09 11:14:07 +08:00 committed by wangjie
commit bedbea3c9f

View File

@ -1,17 +1,13 @@
Name: python-prettytable Name: python-prettytable
Version: 0.7.2 Version: 0.7.2
Release: 18 Release: 20
Summary: Display tabular data in a visually appealing ASCII table format. Summary: Display tabular data in a visually appealing ASCII table format.
License: BSD License: BSD
URL: http://pypi.python.org/pypi/PrettyTable URL: http://pypi.python.org/pypi/PrettyTable
Source0: http://pypi.python.org/packages/source/P/PrettyTable/prettytable-%{version}.tar.gz Source0: https://files.pythonhosted.org/packages/e0/a1/36203205f77ccf98f3c6cf17cf068c972e6458d7e58509ca66da949ca347/prettytable-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
%if 0%{?with_python2}
BuildRequires: python2-devel python2-setuptools
%endif
BuildRequires: python3-devel python3-setuptools BuildRequires: python3-devel python3-setuptools
BuildRequires: python-unversioned-command
%description %description
PrettyTable is a simple Python library designed to make it quick and easy to PrettyTable is a simple Python library designed to make it quick and easy to
@ -23,21 +19,6 @@ a row range.
%package_help %package_help
%if 0%{?with_python2}
%package -n python2-prettytable
Summary: Display tabular data in a visually appealing ASCII table format
%{?python_provide:%python_provide python2-prettytable}
%description -n python2-prettytable
PrettyTable is a simple Python library designed to make it quick and easy to
represent tabular data in visually appealing ASCII tables. It was inspired by
the ASCII tables used in the PostgreSQL shell psql. PrettyTable allows for
selection of which columns are to be printed, independent alignment of columns
(left or right justified or centred) and printing of "sub-tables" by specifying
a row range.
This package is for python2.
%endif
%package -n python3-prettytable %package -n python3-prettytable
Summary: Display tabular data in a visually appealing ASCII table format. Summary: Display tabular data in a visually appealing ASCII table format.
%{?python_provide:%python_provide python3-prettytable} %{?python_provide:%python_provide python3-prettytable}
@ -53,49 +34,21 @@ This package is for python3.
%prep %prep
%autosetup -n prettytable-%{version} %autosetup -n prettytable-%{version}
rm -rf %{py3dir}
cp -a . %{py3dir}
%build %build
%if 0%{?with_python2}
%{__python} setup.py build
%endif
pushd %{py3dir}
%{__python3} setup.py build %{__python3} setup.py build
popd
%check %check
%if 0%{?with_python2}
%{__python} prettytable_test.py
%endif
pushd %{py3dir}
%{__python3} prettytable_test.py %{__python3} prettytable_test.py
popd
%install %install
%if 0%{?with_python2}
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%endif
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT %{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
popd
%files help %files help
%defattr(-,root,root) %defattr(-,root,root)
%doc README CHANGELOG %doc README CHANGELOG
%if 0%{?with_python2}
%files -n python2-prettytable
%defattr(-,root,root)
%license COPYING
%{python_sitelib}/prettytable.py*
%{python_sitelib}/prettytable-%{version}*
%endif
%files -n python3-prettytable %files -n python3-prettytable
%defattr(-,root,root) %defattr(-,root,root)
%license COPYING %license COPYING
@ -104,6 +57,18 @@ popd
%{python3_sitelib}/prettytable-%{version}* %{python3_sitelib}/prettytable-%{version}*
%changelog %changelog
* Wed Nov 4 2020 wangjie<wangjie294@huawei.com> -0.7.2-20
- Type:NA
- ID:NA
- SUG:NA
- DESC:remove python2
* Sat Sep 5 2020 shixuantong <shixuantong@huawei.com> - 0.7.2-19
- Type: bugfix
- ID: NA
- SUG: NA
- DESC: update Source0
* Wed Feb 19 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.7.2-18 * Wed Feb 19 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.7.2-18
- Type:enhancement - Type:enhancement
- ID:NA - ID:NA