Blob Blame History Raw
%global srcname click-log
%global pyname click_log
%global with_python3 1
%global sum Logging integration for python-click

Name:           python-%{srcname}
Version:        0.1.3
Release:        4%{?dist}
Summary:        %{sum}

License:        MIT
URL:            https://github.com/click-contrib/%{srcname}
Source0:        https://pypi.python.org/packages/source/c/%{srcname}/%{srcname}-%{version}.tar.gz
BuildArch:      noarch
 
BuildRequires:  python2-devel
BuildRequires:  python2-setuptools
BuildRequires:  python-click
 
%if %{?with_python3}
BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-click
%endif # if with_python3


%description
Logging support to python click (CLI creation kit)
applications.

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

%description -n python2-%{srcname}
Logging support to python click (CLI creation kit)
applications.

%if 0%{?with_python3}
%package -n     python3-%{srcname}
Summary:        %{sum}
%{?python_provide:%python_provide python3-%{srcname}}
Requires:       python3-click


%description -n python3-%{srcname}
Logging support to python 3 click (CLI creation kit)
applications.
%endif # with_python3

%prep
%setup -q -n %{srcname}-%{version}

%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}

%endif # with_python3


%build
%py2_build

%if 0%{?with_python3}
pushd %{py3dir}
%py3_build
popd
%endif # with_python3


%install
%if 0%{?with_python3}
pushd %{py3dir}
%py3_install
popd
%endif # with_python3

%py2_install

%files -n python2-%{srcname}
%doc README.rst
%license LICENSE
%{python2_sitelib}/%{pyname}
%{python2_sitelib}/%{pyname}-%{version}-py?.?.egg-info
%if 0%{?with_python3}
%files -n python3-%{srcname}
%doc README.rst
%license LICENSE
%{python3_sitelib}/%{pyname}
%{python3_sitelib}/%{pyname}-%{version}-py?.?.egg-info
%endif # with_python3

%changelog
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.1.3-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Wed Feb 10 2016 Michele Baldessari <michele@acksyn.org> - 0.1.3-3
- Add license tag

* Wed Feb 03 2016 Michele Baldessari <michele@acksyn.org> - 0.1.3-2
- Some spec fixes

* Sun Jan 31 2016 Michele Baldessari <michele@acksyn.org> - 0.1.3-1
- New upstream

* Sat Nov 28 2015 Michele Baldessari <michele@acksyn.org> - 0.1.1-1
- Initial packaging