New version 0.6.1 and python3 support.
- New upstream version - Employing macros for modname and version to simplify future edits - Added support for python3 - Added %%check section - Removed unnecessary reference to RPM_BUILD_ROOT - Increased specificity of %%files section - Included README, COPYING, and CHANGELOG in docs
This commit is contained in:
parent
7e954815e0
commit
9d94ae88dc
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/prettytable-0.5.tar.gz
|
||||
/prettytable-0.6.tar.gz
|
||||
/prettytable-0.6.1.tar.gz
|
||||
|
@ -1,19 +1,32 @@
|
||||
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
|
||||
|
||||
Name: python-prettytable
|
||||
Version: 0.6
|
||||
%if 0%{?fedora} > 12 || 0%{?rhel} > 6
|
||||
%global with_python3 1
|
||||
%endif
|
||||
|
||||
%global modname prettytable
|
||||
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 0.6.1
|
||||
Release: 1%{?dist}
|
||||
Summary: Python library to display tabular data in tables
|
||||
|
||||
Group: Development/Languages
|
||||
License: BSD
|
||||
Source0: http://pypi.python.org/packages/source/P/PrettyTable/prettytable-0.6.tar.gz
|
||||
Source0: http://pypi.python.org/packages/source/P/PrettyTable/%{modname}-%{version}.tar.gz
|
||||
URL: http://pypi.python.org/pypi/PrettyTable
|
||||
|
||||
BuildArch: noarch
|
||||
BuildRequires: python-devel
|
||||
BuildRequires: python-setuptools
|
||||
|
||||
%if 0%{?with_python3}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
%endif
|
||||
|
||||
|
||||
%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
|
||||
@ -22,25 +35,80 @@ 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.
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%package -n python3-%{modname}
|
||||
Summary: Python library to display tabular data in tables
|
||||
Group: Development/Languages
|
||||
|
||||
%description -n python3-%{modname}
|
||||
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.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n prettytable-%{version}
|
||||
%setup -q -n %{modname}-%{version}
|
||||
|
||||
%if 0%{?with_python3}
|
||||
rm -rf %{py3dir}
|
||||
cp -a . %{py3dir}
|
||||
%endif
|
||||
|
||||
|
||||
%build
|
||||
%{__python} setup.py build
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py build
|
||||
popd
|
||||
%endif
|
||||
|
||||
%check
|
||||
%{__python} %{modname}_test.py
|
||||
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} %{modname}_test.py
|
||||
popd
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%if 0%{?with_python3}
|
||||
pushd %{py3dir}
|
||||
%{__python3} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||
popd
|
||||
%endif
|
||||
|
||||
%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
|
||||
|
||||
|
||||
%files
|
||||
%{python_sitelib}/*
|
||||
%doc README COPYING CHANGELOG
|
||||
%{python_sitelib}/%{modname}.py*
|
||||
%{python_sitelib}/%{modname}-%{version}*
|
||||
|
||||
%if 0%{?with_python3}
|
||||
%files -n python3-%{modname}
|
||||
%doc README COPYING CHANGELOG
|
||||
%{python3_sitelib}/%{modname}.py*
|
||||
%{python3_sitelib}/__pycache__/%{modname}*
|
||||
%{python3_sitelib}/%{modname}-%{version}*
|
||||
%endif
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Aug 7 2012 Pádraig Brady <P@draigBrady.com> - 0.6-1
|
||||
* Tue Aug 07 2012 Ralph Bean <rbean@redhat.com> - 0.6.1-1
|
||||
- New upstream version
|
||||
- Added support for python3
|
||||
- Included README, COPYING, and CHANGELOG in docs
|
||||
|
||||
* Tue Aug 07 2012 Pádraig Brady <P@draigBrady.com> - 0.6-1
|
||||
- Update to 0.6
|
||||
|
||||
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
|
||||
|
Loading…
Reference in New Issue
Block a user