%global srcname click-threading
%global pyname click_threading
%global with_python3 1
%global sum Multithreaded support for python click apps
Name: python-%{srcname}
Version: 0.4.0
Release: 1%{?dist}
Summary: %{sum}
License: MIT
URL: https://github.com/click-contrib/%{srcname}
Source0: https://pypi.python.org/packages/72/a5/0d72a73e085d8943c82dee5a0713ae1237f8cd59a0586fa87ecebb5320fe/%{srcname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python2-setuptools
BuildRequires: python-click >= 0.5
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-click >= 0.5
%endif # if with_python3
%description
Multithreaded support for python click (CLI creation kit) applications.
%package -n python2-%{srcname}
Summary: %{sum}
%{?python_provide:%python_provide python2-%{srcname}}
Requires: python-click >= 0.5
%description -n python2-%{srcname}
Multithreaded support for 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 >= 0.5
%description -n python3-%{srcname}
Multithreaded support for 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}
%license LICENSE
%doc README.rst
%{python2_sitelib}/%{pyname}
%{python2_sitelib}/%{pyname}-%{version}-py?.?.egg-info
%if 0%{?with_python3}
%files -n python3-%{srcname}
%license LICENSE
%doc README.rst
%{python3_sitelib}/%{pyname}
%{python3_sitelib}/%{pyname}-%{version}-py?.?.egg-info
%endif # with_python3
%changelog
* Sun Jun 19 2016 Michele Baldessari <michele@acksyn.org> - 0.4.0-1
- New upstream
* Wed Feb 03 2016 Michele Baldessari <michele@acksyn.org> - 0.1.2-2
- Some spec fixes
* Sat Nov 28 2015 Michele Baldessari <michele@acksyn.org> - 0.1.2-1
- Initial packaging