%global modname amico
Name: python-%{modname}
Version: 1.0.1
Release: 6%{?dist}
Summary: Relationships (e.g. friendships) backed by Redis
License: MIT
URL: https://pypi.python.org/pypi/amico
Source0: https://pypi.python.org/packages/source/a/amico/%{modname}-%{version}.tar.gz
BuildArch: noarch
%description
%{summary}.
%package -n python2-%{modname}
Summary: %{summary}
%{?python_provide:%python_provide python2-%{modname}}
BuildRequires: python2-devel python2-setuptools
BuildRequires: python-redis
Requires: python-redis
%description -n python2-%{modname}
%{summary}.
Python 2 version.
%package -n python3-%{modname}
Summary: %{summary}
%{?python_provide:%python_provide python3-%{modname}}
BuildRequires: /usr/bin/2to3
BuildRequires: python3-devel python3-setuptools
BuildRequires: python3-redis
Requires: python3-redis
%description -n python3-%{modname}
%{summary}.
Python 3 version.
%prep
%autosetup -c
mv %{modname}-%{version} python2
rm -rf python2/*.egg-info
cp -a python2 python3
2to3 --write --nobackups python3
%build
pushd python2
%py2_build
popd
pushd python3
%py3_build
popd
%install
pushd python2
%py2_install
popd
pushd python3
%py3_install
popd
%files -n python2-%{modname}
%license python2/LICENSE.txt
%doc python2/README.md
%{python2_sitelib}/%{modname}*
%files -n python3-%{modname}
%license python3/LICENSE.txt
%doc python3/README.md
%{python3_sitelib}/%{modname}*
%changelog
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 1.0.1-4
- Rebuild for Python 3.6
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.1-3
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Sat Dec 05 2015 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.0.1-1
- Initial package