|
|
|
@ -1,23 +1,14 @@
|
|
|
|
|
%if 0%{?fedora} >= 13 || 0%{?el} >= 8
|
|
|
|
|
%global with_python3 1
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%global upstream_name redis
|
|
|
|
|
|
|
|
|
|
Name: python-%{upstream_name}
|
|
|
|
|
Version: 3.2.1
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Release: 4%{?dist}
|
|
|
|
|
Summary: Python 2 interface to the Redis key-value store
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/andymccurdy/redis-py
|
|
|
|
|
Source0: https://github.com/andymccurdy/redis-py/archive/%{version}.tar.gz
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
BuildRequires: python2-py
|
|
|
|
|
BuildRequires: python2-pytest
|
|
|
|
|
BuildRequires: redis
|
|
|
|
|
BuildRequires: python2-mock
|
|
|
|
|
|
|
|
|
|
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=1591808
|
|
|
|
|
BuildRequires: jemalloc
|
|
|
|
@ -27,15 +18,9 @@ This is a Python 2 interface to the Redis key-value store.
|
|
|
|
|
|
|
|
|
|
%description %_description
|
|
|
|
|
|
|
|
|
|
%package -n python2-redis
|
|
|
|
|
Summary: %summary
|
|
|
|
|
%{?python_provide:%python_provide python2-redis}
|
|
|
|
|
|
|
|
|
|
%description -n python2-redis %_description
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%package -n python3-redis
|
|
|
|
|
Summary: Python 3 interface to the Redis key-value store
|
|
|
|
|
%{?python_provide:%python_provide python3-redis}
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-py
|
|
|
|
@ -44,7 +29,6 @@ BuildRequires: python3-mock
|
|
|
|
|
|
|
|
|
|
%description -n python3-redis
|
|
|
|
|
This is a Python 3 interface to the Redis key-value store.
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -qn redis-py-%{version}
|
|
|
|
@ -53,50 +37,28 @@ rm -frv %{upstream_name}.egg-info
|
|
|
|
|
# This test passes locally but fails in koji...
|
|
|
|
|
rm tests/test_commands.py*
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
rm -rf %{py3dir}
|
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{__python3} setup.py build
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
%{__python2} setup.py build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{__python3} setup.py install -O1 --skip-build --root=%{buildroot}
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
redis-server &
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{__python3} setup.py test
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
%{__python2} setup.py test
|
|
|
|
|
kill %1
|
|
|
|
|
|
|
|
|
|
%files -n python2-redis
|
|
|
|
|
%doc CHANGES LICENSE README.rst
|
|
|
|
|
%{python2_sitelib}/%{upstream_name}
|
|
|
|
|
%{python2_sitelib}/%{upstream_name}-%{version}-py%{python2_version}.egg-info
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%files -n python3-redis
|
|
|
|
|
%doc CHANGES LICENSE README.rst
|
|
|
|
|
%{python3_sitelib}/%{upstream_name}
|
|
|
|
|
%{python3_sitelib}/%{upstream_name}-%{version}-py%{python3_version}.egg-info
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Sun Sep 08 2019 Miro Hrončok <mhroncok@redhat.com> - 3.2.1-4
|
|
|
|
|
- Subpackage python2-redis has been removed
|
|
|
|
|
See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal
|
|
|
|
|
|
|
|
|
|
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 3.2.1-3
|
|
|
|
|
- Rebuilt for Python 3.8
|
|
|
|
|
|
|
|
|
|