%global pypi_name plaintable Name: python-%{pypi_name} Version: 0.1.1 Release: 2%{?dist} Summary: Python2 simple library to build plain text tables License: LGPLv2+ URL: https://github.com/rumpelsepp/plaintable Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description Plaintable is a very simple library to build plain text tables. It has been created to provide a very lightweight and clear interface for generating plain text tables. Some data can be customized e.g. alignment, padding and floatprecision. Every data item is to be converted to string automatically. %package -n python2-%{pypi_name} Summary: Python2 simple library to build plain text tables Group: Development/Libraries BuildRequires: python2-devel BuildRequires: python-setuptools %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} Plaintable is a very simple Python 3 library to build plain text tables. It has been created to provide a very lightweight and clear interface for generating plain text tables. Some data can be customized e.g. alignment, padding and floatprecision. Every data item is to be converted to string automatically. %package -n python3-%{pypi_name} Summary: Python3 simple library to build plain text tables Group: Development/Libraries BuildRequires: python3-setuptools BuildRequires: python3-devel %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} Plaintable is a very simple Python 3 library to build plain text tables. It has been created to provide a very lightweight and clear interface for generating plain text tables. Some data can be customized e.g. alignment, padding and floatprecision. Every data item is to be converted to string automatically. %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %py2_build %py3_build %install %py3_install %py2_install %files -n python2-%{pypi_name} %doc README.rst %license LICENSE %{python2_sitelib}/* %files -n python3-%{pypi_name} %doc README.rst %license LICENSE %{python3_sitelib}/* %changelog * Mon Dec 28 2015 William Moreno - 0.1.1-2 - Update Python macros - Provides both python2 and python3 subpackages - Fix source url * Tue Jun 09 2015 William Moreno Reyes - 0.1.1-1 - Initial packaging