0e6133a
%if 0%{?fedora}
Luke Macken 9394419
%global with_python3 1
3713f6a
%endif
3713f6a
Silas Sewell 2d72d2f
%global upstream_name redis
Silas Sewell 2d72d2f
Silas Sewell 2d72d2f
Name:           python-%{upstream_name}
0e6133a
Version:        2.10.3
3713f6a
Release:        1%{?dist}
0e6133a
Summary:        Python 2 interface to the Redis key-value store
Silas Sewell 2d72d2f
License:        MIT
Silas Sewell 2d72d2f
URL:            http://github.com/andymccurdy/redis-py
01bcc33
Source0:        http://pypi.python.org/packages/source/r/redis/redis-%{version}.tar.gz
Silas Sewell 2d72d2f
BuildArch:      noarch
2647cc3
BuildRequires:  python2-devel
2647cc3
BuildRequires:  python-setuptools
Luke Macken cc38e70
BuildRequires:  python-py
Luke Macken 9073cb1
BuildRequires:  pytest
Luke Macken dcabdad
BuildRequires:  redis
Silas Sewell 2d72d2f
2647cc3
%description
2647cc3
This is a Python 2 interface to the Redis key-value store.
2647cc3
Luke Macken 9394419
%if 0%{?with_python3}
0e6133a
%package -n     python3-%{upstream_name}
0e6133a
Summary:        Python 3 interface to the Redis key-value store
Luke Macken 9394419
BuildRequires:  python3-devel
Luke Macken 9394419
BuildRequires:  python3-setuptools
Luke Macken 9394419
BuildRequires:  python3-py
Luke Macken 9073cb1
BuildRequires:  python3-pytest
Luke Macken 9394419
0e6133a
%description -n python3-%{upstream_name}
2647cc3
This is a Python 3 interface to the Redis key-value store.
Luke Macken 9394419
%endif
Luke Macken 9394419
Silas Sewell 2d72d2f
%prep
2647cc3
%setup -qn %{upstream_name}-%{version}
0e6133a
rm -fr %{upstream_name}.egg-info
0e6133a
# tests fails due to pytest >= 2.5.0 unavailable on F20
0e6133a
sed -i 's/pytest>=2.5.0/pytest/' setup.py
Silas Sewell 2d72d2f
Luke Macken 9394419
%if 0%{?with_python3}
Luke Macken 9394419
rm -rf %{py3dir}
Luke Macken 9394419
cp -a . %{py3dir}
Luke Macken 9394419
%endif
Luke Macken 9394419
Silas Sewell 2d72d2f
%build
Luke Macken 9394419
%if 0%{?with_python3}
Luke Macken 9394419
pushd %{py3dir}
Luke Macken 9394419
%{__python3} setup.py build
Luke Macken 9394419
popd
Luke Macken 9394419
%endif
2647cc3
%{__python2} setup.py build
Silas Sewell 2d72d2f
Silas Sewell 2d72d2f
%install
Luke Macken 9394419
%if 0%{?with_python3}
Luke Macken 9394419
pushd %{py3dir}
2647cc3
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
Luke Macken 9394419
popd
Luke Macken 9394419
%endif
2647cc3
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
Silas Sewell 2d72d2f
Luke Macken cc38e70
%check
Luke Macken dcabdad
redis-server &
0e6133a
PID_REDIS=$!
Luke Macken 9394419
%if 0%{?with_python3}
Luke Macken 9394419
pushd %{py3dir}
Luke Macken 9394419
%{__python3} setup.py test
Luke Macken 9394419
popd
Luke Macken 9394419
%endif
2647cc3
%{__python2} setup.py test
0e6133a
kill $PID_REDIS
Luke Macken cc38e70
Silas Sewell 2d72d2f
%files
e1a8f71
%doc CHANGES LICENSE README.rst
2647cc3
%{python2_sitelib}/%{upstream_name}
e1a8f71
%{python2_sitelib}/%{upstream_name}-%{version}-py%{python2_version}.egg-info
Silas Sewell 2d72d2f
Luke Macken 9394419
%if 0%{?with_python3}
0e6133a
%files -n python3-%{upstream_name}
e1a8f71
%doc CHANGES LICENSE README.rst
Luke Macken 9394419
%{python3_sitelib}/%{upstream_name}
e1a8f71
%{python3_sitelib}/%{upstream_name}-%{version}-py%{python3_version}.egg-info
Luke Macken 9394419
%endif
Luke Macken 9394419
Silas Sewell 2d72d2f
%changelog
0e6133a
* Fri Oct 24 2014 Haikel Guémar <hguemar@fedoraproject> - 2.10.3-1
0e6133a
- Update to 2.10.3
0e6133a
- spec cleanups
0e6133a
3713f6a
* Thu Jun 19 2014 Christopher Meng <rpm@cicku.me> - 2.10.1-1
3713f6a
- Update to 2.10.1
3713f6a
f20095c
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.9.1-3
f20095c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f20095c
4416e24
* Wed May 28 2014 Kalev Lember <kalevlember@gmail.com> - 2.9.1-2
4416e24
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
4416e24
2647cc3
* Fri Feb 14 2014 Christopher Meng <rpm@cicku.me> - 2.9.1-1
2647cc3
- Update to 2.9.1
2647cc3
- Use generated egg instead of bundled egg
2647cc3
- Cleanup again
2647cc3
Luke Macken 8b4dc5d
* Sat Jul 27 2013 Luke Macken <lmacken@redhat.com> - 2.7.6-1
Luke Macken 8b4dc5d
- Update to 2.7.6
Luke Macken cc38e70
- Run the test suite
Luke Macken 9394419
- Add a python3 subpackage
Luke Macken 24eb357
- Remove obsolete buildroot tag and cleanup
Luke Macken 8b4dc5d
e3b2aeb
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.2-2
e3b2aeb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
e3b2aeb
01bcc33
* Thu Dec 27 2012 Silas Sewell <silas@sewell.org> - 2.7.2-1
01bcc33
- Update to 2.7.2
01bcc33
1cb6d42
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.9-3
1cb6d42
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
1cb6d42
c354136
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.4.9-2
c354136
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
c354136
Silas Sewell a46c41a
* Sun Jul 24 2011 Silas Sewell <silas@sewell.org> - 2.4.9-1
Silas Sewell a46c41a
- Update to 2.4.9
Silas Sewell a46c41a
Silas Sewell 3dd895c
* Sun Mar 27 2011 Silas Sewell <silas@sewell.ch> - 2.2.4-1
Silas Sewell 3dd895c
- Update to 2.2.4
Silas Sewell 3dd895c
09c26e8
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.0-2
09c26e8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
09c26e8
Silas Sewell 2d72d2f
* Sat Sep 04 2010 Silas Sewell <silas@sewell.ch> - 2.0.0-1
Silas Sewell 2d72d2f
- Initial build