%global pypi_name termcolor Name: python-%{pypi_name} Version: 1.1.0 Release: 15.1%{?dist} Summary: ANSII Color formatting for output in terminal License: MIT URL: http://pypi.python.org/pypi/termcolor Source0: https://files.pythonhosted.org/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %if 0%{?fedora} BuildRequires: python2-devel BuildRequires: python2dist(setuptools) BuildRequires: python3-devel BuildRequires: python3dist(setuptools) %else BuildRequires: python2-devel BuildRequires: python2-setuptools %{!?python2_sitearch: %global python2_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %endif %description ANSI Color formatting for output in terminal. %package -n python2-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} %description -n python2-%{pypi_name} ANSI Color formatting for output in terminal. %if 0%{?fedora} %package -n python3-%{pypi_name} Summary: %{summary} %{?python_provide:%python_provide python3-%{pypi_name}} %description -n python3-%{pypi_name} ANSI Color formatting for output in terminal. %endif %prep %autosetup -n %{pypi_name}-%{version} %build %py2_build %if 0%{?fedora} %py3_build %endif %install # Must do the default python version install last because # the scripts in /usr/bin are overwritten with every setup.py install. %py2_install %if 0%{?fedora} %py3_install %endif %files -n python2-%{pypi_name} %license COPYING.txt %doc README.rst %{python2_sitelib}/%{pypi_name}.py* %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %if 0%{?fedora} %files -n python3-%{pypi_name} %license COPYING.txt %doc README.rst %{python3_sitelib}/__pycache__/* %{python3_sitelib}/%{pypi_name}.py %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif %changelog * Sat Mar 02 2019 Ruslan Pisarev - 1.1.0-15.1 - Ported to EL7 * Sat Jul 14 2018 Fedora Release Engineering - 1.1.0-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Tue Jun 19 2018 Miro Hrončok - 1.1.0-14 - Rebuilt for Python 3.7 * Fri Feb 09 2018 Fedora Release Engineering - 1.1.0-13 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 1.1.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 1.1.0-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 1.1.0-10 - Rebuild for Python 3.6 * Tue Jul 19 2016 Fedora Release Engineering - 1.1.0-9 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Fri Jun 24 2016 Matthias Runge - 1.1.0-8 - fix typo in summary (rhbz#1263051) - source location updated * Fri May 06 2016 Dominika Krejci - 1.1.0-7 - added support for Python 3 * Thu Feb 04 2016 Fedora Release Engineering - 1.1.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 1.1.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 1.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Aug 04 2013 Fedora Release Engineering - 1.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Thu Feb 14 2013 Fedora Release Engineering - 1.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild * Tue Sep 11 2012 Matthias Runge - 1.1.0-1 - Initial package.