File ansicolors.spec of Package ansicolors
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%define src_name ansicolors
%define name python-ansicolors
%define version 1.0.2
%define release 1
Summary: ANSI colors for Python
Name: %{name}
Version: %{version}
Release: %{release}
Source0: http://pypi.python.org/packages/source/a/%{src_name}/%{src_name}-%{version}.tar.gz
License: ISC
Group: Development/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Prefix: %{_prefix}
BuildArch: noarch
Url: http://github.com/verigak/colors/
Requires: python >= 2.6
Requires: python-setuptools
BuildRequires: python-setuptools
%description
A simple module to add ANSI colors and decorations to your strings.
%prep
%setup -n %{src_name}-%{version} -n %{src_name}-%{version}
%build
python setup.py build
%install
python setup.py install --single-version-externally-managed -O1 --root=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc README.rst LICENSE
%{python_sitelib}/*