forked from pool/python-colorama
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-colorama?expand=0&rev=1
65 lines
2.4 KiB
RPMSpec
65 lines
2.4 KiB
RPMSpec
#
|
|
# spec file for package python-colorama
|
|
#
|
|
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
|
Name: python-colorama
|
|
Version: 0.2.4
|
|
Release: 0
|
|
License: BSD-3-Clause
|
|
Summary: Cross-platform colored terminal text
|
|
Url: http://code.google.com/p/colorama/
|
|
Group: Development/Languages/Python
|
|
Source: http://pypi.python.org/packages/source/c/colorama/colorama-%{version}.tar.gz
|
|
BuildRequires: python-devel
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
%if 0%{?suse_version} && 0%{?suse_version} <= 1110
|
|
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
%else
|
|
BuildArch: noarch
|
|
%endif
|
|
|
|
%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.
|
|
|
|
This has the upshot of providing a simple cross-platform API for printing
|
|
colored terminal text from Python, and has the happy side-effect that existing
|
|
applications or libraries which use ANSI sequences to produce colored output on
|
|
Linux or Macs can now also work on Windows, simply by calling colorama.init().
|
|
|
|
%prep
|
|
%setup -q -n colorama-%{version}
|
|
sed -i "s/\r//" README.txt LICENSE.txt demos/demo0{6,7}.py demos/demo.bat
|
|
|
|
%build
|
|
python setup.py build
|
|
|
|
%install
|
|
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%doc LICENSE.txt README.txt demos
|
|
%{python_sitelib}/*
|
|
|
|
%changelog
|