Package init
This commit is contained in:
commit
325b64b10f
12
disable-encoding-check.patch
Normal file
12
disable-encoding-check.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff -Naur -Naru prettytable-0.7.2.orig/prettytable_test.py prettytable-0.7.2/prettytable_test.py
|
||||
--- prettytable-0.7.2.orig/prettytable_test.py 2013-04-06 23:43:12.000000000 +0000
|
||||
+++ prettytable-0.7.2/prettytable_test.py 2014-01-07 18:49:26.017977139 +0000
|
||||
@@ -582,7 +582,7 @@
|
||||
|
||||
def testPrint(self):
|
||||
print()
|
||||
- print(self.x)
|
||||
+ #print(self.x)
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
BIN
prettytable-0.7.2.tar.gz
Normal file
BIN
prettytable-0.7.2.tar.gz
Normal file
Binary file not shown.
108
python-prettytable.spec
Normal file
108
python-prettytable.spec
Normal file
@ -0,0 +1,108 @@
|
||||
Name: python-prettytable
|
||||
Version: 0.7.2
|
||||
Release: 16
|
||||
Summary: Display tabular data in a visually appealing ASCII table format.
|
||||
License: BSD
|
||||
URL: http://pypi.python.org/pypi/PrettyTable
|
||||
Source0: http://pypi.python.org/packages/source/P/PrettyTable/prettytable-%{version}.tar.gz
|
||||
Patch0: disable-encoding-check.patch
|
||||
|
||||
BuildArch: noarch
|
||||
%if 0%{?with_python2}
|
||||
BuildRequires: python2-devel python2-setuptools
|
||||
%endif
|
||||
BuildRequires: python3-devel python3-setuptools
|
||||
BuildRequires: python-unversioned-command
|
||||
|
||||
%description
|
||||
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.
|
||||
|
||||
%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
|
||||
Summary: Display tabular data in a visually appealing ASCII table format.
|
||||
|
||||
%description -n python3-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 python3.
|
||||
|
||||
%prep
|
||||
%autosetup -n prettytable-%{version} -p1
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
|
||||
%build
|
||||
%if 0%{?with_python2}
|
||||
%{__python} setup.py build
|
||||
%endif
|
||||
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
|
||||
%check
|
||||
%if 0%{?with_python2}
|
||||
%{__python} prettytable_test.py
|
||||
%endif
|
||||
|
||||
pushd %{py3dir}
|
||||
%{__python3} prettytable_test.py
|
||||
popd
|
||||
|
||||
|
||||
%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
|
||||
popd
|
||||
|
||||
%files help
|
||||
%defattr(-,root,root)
|
||||
%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
|
||||
%defattr(-,root,root)
|
||||
%license COPYING
|
||||
%{python3_sitelib}/prettytable.py*
|
||||
%{python3_sitelib}/__pycache__/prettytable*
|
||||
%{python3_sitelib}/prettytable-%{version}*
|
||||
|
||||
%changelog
|
||||
* Mon Sep 16 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.7.2-16
|
||||
- Package init
|
||||
Loading…
x
Reference in New Issue
Block a user