Blob Blame History Raw
%global srcname colorlog
%global sum A colored formatter for the python logging module

Name:           python-%{srcname}
Version:        2.7.0
Release:        2%{?dist}
Summary:        %{sum}

License:        MIT
URL:            https://github.com/borntyping/python-colorlog
Source0:        https://github.com/borntyping/python-colorlog/archive/v%{version}.tar.gz#/%{srcname}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  python2-devel
BuildRequires:  python3-devel

%description
colorlog.ColoredFormatter is a formatter for use with Python's logging
module that outputs records using terminal colors.

%package -n python2-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python2-%{srcname}}

%description -n python2-%{srcname}
colorlog.ColoredFormatter is a formatter for use with Python's logging
module that outputs records using terminal colors.

%package -n python3-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python3-%{srcname}}

%description -n python3-%{srcname}
colorlog.ColoredFormatter is a formatter for use with Python's logging
module that outputs records using terminal colors.

%prep
%autosetup -n %{name}-%{version}

%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%files -n python2-%{srcname}
%doc README.md
%{python2_sitelib}/%{srcname}/
%{python2_sitelib}/%{srcname}*.egg-info/
%exclude %{python2_sitelib}/%{srcname}/tests/

%files -n python3-%{srcname}
%doc README.md
%{python3_sitelib}/%{srcname}/
%{python3_sitelib}/%{srcname}*.egg-info/
%exclude %{python3_sitelib}/%{srcname}/tests/

%changelog
* Tue Nov 15 2016 Fabian Affolter <mail@fabian-affolter.ch> - 2.7.0-2
- Fix ownership

* Mon Nov 14 2016 Fabian Affolter <mail@fabian-affolter.ch> - 2.7.0-1
- Initial version