python-colorama/python-colorama.spec

123 lines
3.2 KiB
RPMSpec
Raw Normal View History

2012-09-14 08:33:28 +00:00
%global pypi_name colorama
2018-10-30 09:09:36 +00:00
%if 0%{?rhel}
%if 0%{?rhel}> 7
%bcond_with python2
%bcond_without python3
%else
%bcond_without python2
%bcond_with python3
%endif
2018-10-30 09:09:36 +00:00
%else
%if 0%{?fedora} > 29
%bcond_without python3
%else
%bcond_without python2
%bcond_without python3
%endif
%endif
2012-09-14 08:33:28 +00:00
Name: python-%{pypi_name}
2020-11-19 13:34:01 +00:00
Version: 0.4.4
2022-01-08 10:02:17 +00:00
Release: %autorelease
2012-09-14 08:33:28 +00:00
Summary: Cross-platform colored terminal text
License: BSD
2016-10-14 14:07:39 +00:00
URL: http://pypi.python.org/pypi/colorama
2019-02-05 16:44:28 +00:00
Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
2012-09-14 08:33:28 +00:00
BuildArch: noarch
2020-11-19 13:34:01 +00:00
2012-09-14 08:33:28 +00:00
%description
Makes ANSI escape character sequences, for producing colored
terminal text and cursor positioning, work under MS Windows.
ANSI escape character sequences have long been used to produce colored terminal
text and cursor positioning on Unix and Macs. Colorama makes this work on
Windows, too.
It also provides some shortcuts to help generate ANSI sequences, and works fine
in conjunction with any other ANSI sequence generation library, such as
Termcolor.
%if %{with python2}
%package -n python2-%{pypi_name}
Summary: Cross-platform colored terminal text
BuildRequires: python2-devel
2016-10-14 14:07:39 +00:00
%{?el6:BuildRequires: python-setuptools}
%{!?el6:BuildRequires: python2-setuptools}
%{?el6:Provides: python-%{pypi_name}}
%{?python_provide:%python_provide python2-%{pypi_name}}
2012-09-14 08:33:28 +00:00
%description -n python2-%{pypi_name}
Makes ANSI escape character sequences, for producing colored
terminal text and cursor positioning, work under MS Windows.
ANSI escape character sequences have long been used to produce colored terminal
text and cursor positioning on Unix and Macs. Colorama makes this work on
Windows, too.
It also provides some shortcuts to help generate ANSI sequences, and works fine
in conjunction with any other ANSI sequence generation library, such as
Termcolor.
Python 2 version.
2018-10-19 11:21:29 +00:00
%endif
%if %{with python3}
%package -n python3-%{pypi_name}
Summary: Cross-platform colored terminal text
%{?python_provide:%python_provide python3-%{pypi_name}}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
%description -n python3-%{pypi_name}
Makes ANSI escape character sequences, for producing colored
terminal text and cursor positioning, work under MS Windows.
ANSI escape character sequences have long been used to produce colored terminal
text and cursor positioning on Unix and Macs. Colorama makes this work on
Windows, too.
It also provides some shortcuts to help generate ANSI sequences, and works fine
in conjunction with any other ANSI sequence generation library, such as
Termcolor.
Python 3 version.
%endif
2012-09-14 08:33:28 +00:00
%prep
%autosetup -n %{pypi_name}-%{version}
rm -rf *.egg-info
2012-09-14 08:33:28 +00:00
%build
%if %{with python2}
%py2_build
2018-10-19 11:21:29 +00:00
%endif
%if %{with python3}
%py3_build
%endif
2012-09-14 08:33:28 +00:00
%install
%if %{with python2}
%py2_install
2018-10-19 11:21:29 +00:00
%endif
%if %{with python3}
%py3_install
%endif
2012-09-14 08:33:28 +00:00
%if %{with python2}
%files -n python2-%{pypi_name}
2014-09-05 07:20:01 +00:00
%doc README.rst
%license LICENSE.txt
%{python2_sitelib}/%{pypi_name}/
%{python2_sitelib}/%{pypi_name}-%{version}-*.egg-info/
2018-10-19 11:21:29 +00:00
%endif
2012-09-14 08:33:28 +00:00
%if %{with python3}
%files -n python3-%{pypi_name}
2014-09-05 07:20:01 +00:00
%doc README.rst
%license LICENSE.txt
%{python3_sitelib}/%{pypi_name}/
%{python3_sitelib}/%{pypi_name}-%{version}-*.egg-info/
%endif
2012-09-14 08:33:28 +00:00
%changelog
2022-01-08 10:02:17 +00:00
%autochangelog