diff --git a/.python-pymemcache.metadata b/.python-pymemcache.metadata new file mode 100644 index 0000000..f4551a3 --- /dev/null +++ b/.python-pymemcache.metadata @@ -0,0 +1 @@ +e4f069ab9163cc86de3ddc30bd796846a3884a89 SOURCES/pymemcache-4.0.0.tar.gz diff --git a/SOURCES/0001-Skip-unit-tests-resolving-domain-names.patch b/SOURCES/0001-Skip-unit-tests-resolving-domain-names.patch new file mode 100644 index 0000000..4abb886 --- /dev/null +++ b/SOURCES/0001-Skip-unit-tests-resolving-domain-names.patch @@ -0,0 +1,43 @@ +From d8c3f4252d92de53e1b6d4da491d9d7244451d0b Mon Sep 17 00:00:00 2001 +From: Priscila Gutierres +Date: Thu, 5 Oct 2023 09:48:40 -0300 +Subject: [PATCH] Skip unit tests resolving domain names + +As per [1]. + +[1] https://fedoraproject.org/wiki/Using_Mock_to_test_package_builds#Disable_domain_name_resolution +--- + pymemcache/test/test_client.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/pymemcache/test/test_client.py b/pymemcache/test/test_client.py +index 22f8387..aa5ab5a 100644 +--- a/pymemcache/test/test_client.py ++++ b/pymemcache/test/test_client.py +@@ -1317,6 +1317,7 @@ class TestClientSocketConnect(unittest.TestCase): + socket_keepalive=KeepaliveOpts(), + ) + ++ @pytest.mark.skip(reason="Cannot resolve domain names in Koji") + def test_socket_connect_closes_on_failure(self): + server = ("example.com", 11211) + +@@ -1328,6 +1329,7 @@ class TestClientSocketConnect(unittest.TestCase): + assert socket_module.sockets[0].connections == [] + assert socket_module.sockets[0].closed + ++ @pytest.mark.skip(reason="Cannot resolve domain names in Koji") + def test_socket_close(self): + server = ("example.com", 11211) + +@@ -1338,6 +1340,7 @@ class TestClientSocketConnect(unittest.TestCase): + client.close() + assert client.sock is None + ++ @pytest.mark.skip(reason="Cannot resolve domain names in Koji") + def test_socket_close_exception(self): + server = ("example.com", 11211) + +-- +2.41.0 + diff --git a/SOURCES/0002-Add-manually-the-packages.patch b/SOURCES/0002-Add-manually-the-packages.patch new file mode 100644 index 0000000..8d899a5 --- /dev/null +++ b/SOURCES/0002-Add-manually-the-packages.patch @@ -0,0 +1,34 @@ +From a0f4ba57e753b613d6e11494b63c78aaf2df3a50 Mon Sep 17 00:00:00 2001 +From: Joel Capitao +Date: Tue, 21 Nov 2023 10:47:07 +0100 +Subject: [PATCH] Add manually the packages + +Current setuptools in BaseOS python3-setuptools-53.0.0-12 [1] does +not contain the patch [2] which discovers automatically the packages, +added since 61.0.0. +We have to add them manually with this patch. + +[1] https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/Packages/python3-setuptools-53.0.0-12.el9.noarch.rpm +[2] https://github.com/pypa/setuptools/pull/2894 +--- + setup.cfg | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/setup.cfg b/setup.cfg +index 931608f..a7485ba 100644 +--- a/setup.cfg ++++ b/setup.cfg +@@ -22,6 +22,10 @@ classifiers = + + [options] + python_requires = >= 3.7 ++packages = ++ pymemcache ++ pymemcache.client ++ pymemcache.test + + [bdist_wheel] + universal = true +-- +2.41.0 + diff --git a/SPECS/python-pymemcache.spec b/SPECS/python-pymemcache.spec new file mode 100644 index 0000000..b3e62f1 --- /dev/null +++ b/SPECS/python-pymemcache.spec @@ -0,0 +1,190 @@ +# Created by pyp2rpm-1.0.1 +%global pypi_name pymemcache + +Name: python-%{pypi_name} +Version: 4.0.0 +Release: 1%{?dist} +Summary: A comprehensive, fast, pure Python memcached client + +License: ASL 2.0 +URL: https://github.com/Pinterest/pymemcache +Source0: https://pypi.python.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Patch0001: 0001-Skip-unit-tests-resolving-domain-names.patch +Patch0002: 0002-Add-manually-the-packages.patch +BuildArch: noarch + +%global _description\ +pymemcache supports the following features:\ +\ +* Complete implementation of the memcached text protocol.\ +* Configurable timeouts for socket connect and send/recv calls.\ +* Access to the "noreply" flag, which can significantly increase the speed of\ + writes.\ +* Flexible, simple approach to serialization and deserialization.\ +* The (optional) ability to treat network and memcached errors as cache misses. + +%description %_description + + +%package -n python3-%{pypi_name} +Summary: A comprehensive, fast, pure Python memcached client +BuildRequires: git-core +BuildRequires: python3-devel +BuildRequires: python3-faker +BuildRequires: python3-pytest +BuildRequires: python3-pytest-cov +BuildRequires: python3-setuptools +BuildRequires: python3-zstd + +%description -n python3-%{pypi_name} +pymemcache supports the following features: + +* Complete implementation of the memcached text protocol. +* Configurable timeouts for socket connect and send/recv calls. +* Access to the "noreply" flag, which can significantly increase the speed of + writes. +* Flexible, simple approach to serialization and deserialization. +* The (optional) ability to treat network and memcached errors as cache misses. + +%prep +%autosetup -n %{pypi_name}-%{version} -S git +# Remove bundled egg-info +rm -rf %{pypi_name}.egg-info + +sed -i '/^pylibmc.*/d' test-requirements.txt + +%build +%py3_build + +%install +%py3_install + +%check +py.test-3 ./pymemcache/test/ + +%files -n python3-%{pypi_name} +%doc README.rst LICENSE.txt +%{python3_sitelib}/%{pypi_name} +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info + +%changelog + +* Wed Oct 04 2023 Priscila Gutierres - 4.0.0-1 +- Update for 4.0.0 + +* Fri Jul 21 2023 Fedora Release Engineering - 3.5.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 3.5.0-7 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 3.5.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Fri Jul 22 2022 Fedora Release Engineering - 3.5.0-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 3.5.0-4 +- Rebuilt for Python 3.11 + +* Mon May 23 2022 Miro Hrončok - 3.5.0-3 +- Replace mock dependency with unittest.mock from the standard library + +* Fri Jan 21 2022 Fedora Release Engineering - 3.5.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Thu Jul 29 2021 Alfredo Moralejo - 3.5.0-1 +- Update to 3.5.0 (#1163328) + +* Fri Jul 23 2021 Fedora Release Engineering - 3.4.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 3.4.0-2 +- Rebuilt for Python 3.10 + +* Mon Feb 01 2021 Joel Capitao - 3.4.0-1 +- Update to 3.4.0 (#1163328) + +* Wed Jan 27 2021 Fedora Release Engineering - 3.3.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Tue Sep 15 2020 Joel Capitao - 3.3.0-1 +- Update to 3.3.0 +- Remove Python 2 subpackage + +* Wed Jul 29 2020 Fedora Release Engineering - 2.1.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 2.1.1-7 +- Rebuilt for Python 3.9 + +* Thu Jan 30 2020 Fedora Release Engineering - 2.1.1-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 2.1.1-5 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Mon Aug 19 2019 Miro Hrončok - 2.1.1-4 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 2.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Tue Mar 05 2019 Alfredo Moralejo - 2.1.1-2 +- Add python2-future as BR for unit tests in python2. + +* Mon Feb 11 2019 Javier Peña - 2.1.1-1 +- Updated to upstream 2.1.1 +- Re-introduced python2 subpackage for EL7 + +* Sat Feb 02 2019 Fedora Release Engineering - 1.2.5-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Oct 11 2018 Zbigniew Jędrzejewski-Szmek - 1.2.5-15 +- Python2 binary package has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Sat Jul 14 2018 Fedora Release Engineering - 1.2.5-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Tue Jun 19 2018 Miro Hrončok - 1.2.5-13 +- Rebuilt for Python 3.7 + +* Mon Feb 12 2018 Iryna Shcherbina - 1.2.5-12 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Feb 09 2018 Fedora Release Engineering - 1.2.5-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 1.2.5-10 +- Python 2 binary package renamed to python2-pymemcache + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Thu Jul 27 2017 Fedora Release Engineering - 1.2.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 1.2.5-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 1.2.5-7 +- Rebuild for Python 3.6 + +* Tue Jul 19 2016 Fedora Release Engineering - 1.2.5-6 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Thu Feb 04 2016 Fedora Release Engineering - 1.2.5-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Nov 12 2015 Kalev Lember - 1.2.5-4 +- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.2.5-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Thu Sep 11 2014 Nejc Saje - 1.2.5-2 +- Added six to build dependencies, needed during tests + +* Tue Sep 09 2014 Nejc Saje - 1.2.5-1 +- Initial package. +