%global modname amico
Name: python-%{modname}
Version: 1.0.1
Release: 9%{?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: python2-redis
Requires: python2-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
* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-9
- Rebuilt for Python 3.7
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Jan 15 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.0.1-7
- Update Python 2 dependency declarations to new packaging standards
(See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)
* 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