%global with_python3 1 Summary: Curses-like terminal wrapper, with colored strings Name: python-curtsies Version: 0.1.19 Release: 1%{?dist} License: MIT Group: Development/Tools URL: https://github.com/thomasballinger/curtsies Source0: https://pypi.python.org/packages/source/c/curtsies/curtsies-%{version}.tar.gz BuildArch: noarch Requires: python-blessings BuildRequires: python-devel BuildRequires: python-tools BuildRequires: python-setuptools %if 0%{?with_python3} BuildRequires: python3-devel BuildRequires: python3-setuptools %endif %description Curtsies is curses-like terminal wrapper, can be to annotate portions of strings with terminal colors and formatting. Most terminals will display text in color if you use ANSI escape codes - curtsies makes rendering such text to the terminal easy. Curtsies assumes use of an VT-100 compatible terminal: unlike curses, it has no compatibility layer for other types of terminals. %if 0%{?with_python3} %package -n python3-curtsies Summary: Curses-like terminal wrapper, with colored strings Group: Development/Tools Requires: python3-blessings %description -n python3-curtsies Curtsies is curses-like terminal wrapper, can be to annotate portions of strings with terminal colors and formatting. Most terminals will display text in color if you use ANSI escape codes - curtsies makes rendering such text to the terminal easy. Curtsies assumes use of an VT-100 compatible terminal: unlike curses, it has no compatibility layer for other types of terminals. This is the Python 3 version of python-curtsies. %endif %prep %setup -q -n curtsies-%{version} %if 0%{?with_python3} rm -rf %{py3dir} cp -a . %{py3dir} %endif %build %{__python2} setup.py build %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py build popd %endif %install %{__python2} setup.py install -O1 --skip-build --root %{buildroot} %if 0%{?with_python3} pushd %{py3dir} %{__python3} setup.py install -O1 --skip-build --root %{buildroot} popd %endif %files %doc LICENSE readme.md %{python_sitelib}/curtsies %{python_sitelib}/curtsies-*-py*.egg-info %if 0%{?with_python3} %files -n python3-curtsies %doc LICENSE readme.md %{python3_sitelib}/curtsies %{python3_sitelib}/curtsies-*-py*.egg-info %endif %changelog * Thu Mar 26 2015 Terje Rosten - 0.1.19-1 - 0.1.19 - bpython needs < 0.2 * Tue Jan 13 2015 Terje Rosten - 0.2.0-1 - 0.2.0 * Wed May 28 2014 Terje Rosten - 0.0.32-1 - initial package