diff --git a/0001-Support-old-EPEL-7-Redis.-1227.patch b/0001-Support-old-EPEL-7-Redis.-1227.patch new file mode 100644 index 0000000000000000000000000000000000000000..5704353aa4443c522d320174707986529a073778 --- /dev/null +++ b/0001-Support-old-EPEL-7-Redis.-1227.patch @@ -0,0 +1,63 @@ +From 90532bd2c4d6d74110ab37d800653d7abafe2e0b Mon Sep 17 00:00:00 2001 +From: tuxmaster5000 <837503+tuxmaster5000@users.noreply.github.com> +Date: Fri, 18 Oct 2019 09:47:27 +0200 +Subject: [PATCH] Support old EPEL-7 Redis. (#1227) + +Fix test suite with Redis versions pre-5.0.0 +--- + tests/test_monitor.py | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/tests/test_monitor.py b/tests/test_monitor.py +index 09ec21b..fe9e68a 100644 +--- a/tests/test_monitor.py ++++ b/tests/test_monitor.py +@@ -1,5 +1,7 @@ + from __future__ import unicode_literals + from redis._compat import unicode ++from .conftest import (skip_if_server_version_lt, skip_if_server_version_gte, ++ skip_unless_arch_bits) + + + def wait_for_command(client, monitor, command): +@@ -17,12 +19,14 @@ def wait_for_command(client, monitor, command): + + + class TestPipeline(object): ++ @skip_if_server_version_lt('5.0.0') + def test_wait_command_not_found(self, r): + "Make sure the wait_for_command func works when command is not found" + with r.monitor() as m: + response = wait_for_command(r, m, 'nothing') + assert response is None + ++ @skip_if_server_version_lt('5.0.0') + def test_response_values(self, r): + with r.monitor() as m: + r.ping() +@@ -34,12 +38,14 @@ class TestPipeline(object): + assert isinstance(response['client_port'], unicode) + assert response['command'] == 'PING' + ++ @skip_if_server_version_lt('5.0.0') + def test_command_with_quoted_key(self, r): + with r.monitor() as m: + r.get('foo"bar') + response = wait_for_command(r, m, 'GET foo"bar') + assert response['command'] == 'GET foo"bar' + ++ @skip_if_server_version_lt('5.0.0') + def test_command_with_binary_data(self, r): + with r.monitor() as m: + byte_string = b'foo\x92' +@@ -47,6 +53,7 @@ class TestPipeline(object): + response = wait_for_command(r, m, 'GET foo\\x92') + assert response['command'] == 'GET foo\\x92' + ++ @skip_if_server_version_lt('5.0.0') + def test_lua_script(self, r): + with r.monitor() as m: + script = 'return redis.call("GET", "foo")' +-- +2.23.0 + diff --git a/2.10.6.tar.gz b/2.10.6.tar.gz deleted file mode 100644 index 9fd70b5d9602be54c238c2a77f6c4dc5672a3d84..0000000000000000000000000000000000000000 Binary files a/2.10.6.tar.gz and /dev/null differ diff --git a/python-redis.spec b/python-redis.spec index aa96f761b23de94b5280541cd59ab77a96124a5d..f6b315c0dcb50679c4b6edd5523895d490dfaf1d 100644 --- a/python-redis.spec +++ b/python-redis.spec @@ -1,68 +1,90 @@ +%global _empty_manifest_terminate_build 0 Name: python-redis -Version: 2.10.6 -Release: 6 -Summary: The Python interface to the Redis key-value store +Version: 3.3.8 +Release: 1 +Summary: Python client for Redis key-value store License: MIT URL: https://github.com/andymccurdy/redis-py -Source0: https://github.com/andymccurdy/redis-py/archive/2.10.6.tar.gz - +Source0: https://files.pythonhosted.org/packages/d7/e9/549305f1c2480f8c24abadfaa71c20967cc3269769073b59960e9a566072/redis-3.3.8.tar.gz BuildArch: noarch -BuildRequires: python2-devel python2-setuptools python2-py python2-pytest redis python2-mock jemalloc + +Patch6000: 0001-Support-old-EPEL-7-Redis.-1227.patch %description The Python interface to the Redis key-value store. -%package -n python2-redis -Summary: The Python2 interface to the Redis key-value store -%{?python_provide:%python_provide python2-redis} - -%description -n python2-redis -The Python2 interface to the Redis key-value store. - %package -n python3-redis -Summary: The Python3 interface to the Redis key-value store -BuildRequires: python3-devel python3-setuptools python3-py python3-pytest python3-mock - +Summary: Python client for Redis key-value store +Provides: python-redis +# Base build requires +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pbr +BuildRequires: python3-pip +BuildRequires: python3-wheel +# General requires +BuildRequires: redis +BuildRequires: jemalloc +BuildRequires: python3-pytest +BuildRequires: python3-mock %description -n python3-redis -The Python3 interface to the Redis key-value store. +The Python interface to the Redis key-value store. + +%package help +Summary: Python client for Redis key-value store +Provides: python3-redis-doc +%description help +The Python interface to the Redis key-value store. %prep -%autosetup -n redis-py-2.10.6 -p1 -rm tests/test_commands.py* -rm -rf %{py3dir} -cp -a . %{py3dir} +%autosetup -n redis-%{version} -p1 %build -cd %{py3dir} -%{__python3} setup.py build -cd - -%{__python2} setup.py build +%py3_build %install -cd %{py3dir} -%{__python3} setup.py install -O1 --skip-build --root=%{buildroot} -cd - -%{__python2} setup.py install -O1 --skip-build --root %{buildroot} +%py3_install + +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . %check redis-server & -cd %{py3dir} %{__python3} setup.py test -cd - -%{__python2} setup.py test -kill %1 +kill -9 %1 +%files -n python3-redis -f filelist.lst +%dir %{python3_sitelib}/* -%files -n python2-redis -%doc CHANGES LICENSE README.rst -%{python2_sitelib}/redis -%{python2_sitelib}/redis-2.10.6-py%{python2_version}.egg-info - -%files -n python3-redis -%doc CHANGES LICENSE README.rst -%{python3_sitelib}/redis -%{python3_sitelib}/redis-2.10.6-py%{python3_version}.egg-info +%files help -f doclist.lst +%{_docdir}/* %changelog +* Thur Jan 27 2022 lijiawei - 3.3.8-1 +- Remove python2 support and upgrade the version to 3.3.8 + * Mon Jan 6 2020 qinjian - 2.10.6-6 - Package init diff --git a/redis-3.3.8.tar.gz b/redis-3.3.8.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..c5d03cd2c8f95ba7432b64efaa0e4167bd6c9067 Binary files /dev/null and b/redis-3.3.8.tar.gz differ