Blob Blame History Raw
%global pkgname ansicolors
%global desc Add ANSI colors and decorations to your strings.

Name:           python-%{pkgname}
Version:        1.1.8
Release:        4%{?dist}
Summary:        ANSI colors for Python

License:        ISC
URL:            https://pypi.python.org/pypi/ansicolors
Source0:        https://files.pythonhosted.org/packages/source/a/%{pkgname}/%{pkgname}-%{version}.zip

BuildArch:      noarch

# https://github.com/jonathaneunice/colors/pull/1
Patch0: add-bright-colors.patch

%description
%{desc}

%package -n python2-%{pkgname}
BuildRequires:  python2-devel
BuildRequires:  python2-pytest
Summary:        %{summary}
%{?python_provide:%python_provide python2-%{pkgname}}

%description -n python2-%{pkgname}
%{desc}


%package -n python3-%{pkgname}
BuildRequires:  python3-devel
BuildRequires:  python3-pytest
Summary:        %{summary}
%{?python_provide:%python_provide python3-%{pkgname}}

%description -n python3-%{pkgname}
%{desc}

%prep
%autosetup -n %{pkgname}-%{version} -p1

# Remove upstream egg-info
rm -rf %{pkgname}.egg-info

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%check
PYTHONPATH=$(pwd) py.test-2 -v test
PYTHONPATH=$(pwd) py.test-3 -v test

%files -n python2-%{pkgname}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{pkgname}-%{version}-py%{python2_version}.egg-info
%{python2_sitelib}/colors


%files -n python3-%{pkgname}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pkgname}-%{version}-py%{python3_version}.egg-info
%{python3_sitelib}/colors

%changelog
* Fri Mar 23 2018 Sebastian Kisela <skisela@redhat.com> - 1.1.8-4
- Add option to use bright colors

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Mon Oct 09 2017 skisela@redhat.com - 1.1.8-2
- Fix description macro. Reported at https://bugzilla.redhat.com/1498065.

* Fri Jul 14 2017 Sebastian Kisela <skisela@redhat.com> - 1.1.8-1
- Initial 1.1.8 package version