%if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with python3 %else %bcond_without python3 %endif %global pypi_name terminaltables Summary: Generate tables in terminals from list of strings Name: python-terminaltables Version: 3.1.0 Release: 3%{?dist} License: MIT URL: https://github.com/Robpol86/terminaltables Source0: https://github.com/Robpol86/%{pypi_name}/archive/v%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %if %{with python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif # Testing: BuildRequires: pylint BuildRequires: python2-colorama BuildRequires: python2-colorclass BuildRequires: python2-flake8 BuildRequires: python-pep8 BuildRequires: python2-pytest-cov BuildRequires: python2-termcolor BuildRequires: python2-tox %if %{with python3} BuildRequires: python3-pylint BuildRequires: python3-colorama BuildRequires: python3-colorclass BuildRequires: python3-flake8 BuildRequires: python3-pep8 BuildRequires: python3-pytest-cov BuildRequires: python3-termcolor BuildRequires: python3-tox %endif %description Easily draw tables in terminal/console applications (written in Python) from a list of lists of strings. Supports multi-line rows. %package -n python2-%{pypi_name} Summary: Generate tables in terminals from list of strings %{?python_provide:%python_provide python2-%{pypi_name}} %{?el6:Provides: python-%{pypi_name}} %description -n python2-%{pypi_name} Easily draw tables in terminal/console applications (written in Python) from a list of lists of strings. Supports multi-line rows. %if %{with python3} %package -n python3-%{pypi_name} Summary: Generate tables in terminals from list of strings %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} Easily draw tables in terminal/console applications (written in Python) from a list of lists of strings. Supports multi-line rows. %endif # with python3 %prep %setup -q -n %{pypi_name}-%{version} rm -rf %{pypi_name}.egg-info %build %py2_build %if %{with python3} %py3_build %endif # with python3 %install %if %{with python3} %py3_install %endif # with python3 %py2_install %check py.test --cov-report term-missing --cov-report xml --cov terminaltables --cov-config tox.ini tests %if %{with python3} py.test-3 --cov-report term-missing --cov-report xml --cov terminaltables --cov-config tox.ini tests %endif %files -n python2-%{pypi_name} %doc README.rst %license LICENSE %{python2_sitelib}/%{pypi_name}/ %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info/ %if %{with python3} %files -n python3-%{pypi_name} %doc README.rst %license LICENSE %{python3_sitelib}/%{pypi_name}/ %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info/ %endif # with python3 %changelog * Tue Jun 20 2017 Terje Rosten - 3.1.0-3 - Add trailing / - Testing enabled * Mon May 15 2017 Terje Rosten - 3.1.0-2 - Minor tweaks * Sun Apr 23 2017 Dick Marinus - 3.1.0-1 - Initial package