From 29c9e496aba7a708be002ab023b846933ab023f54d5c329845b700be6b3a54ec Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 13 Dec 2022 00:37:12 +0000 Subject: [PATCH 1/3] - Fix incorrect version number in `__version__` (gh#linsomniac/python-memcached#185). - Fix build: we don't have /usr/sbin any more. - Clean up SPEC file. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-memcached?expand=0&rev=36 --- python-python-memcached.changes | 8 ++++++++ python-python-memcached.spec | 17 +++++++++-------- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/python-python-memcached.changes b/python-python-memcached.changes index 54944b5..4998e91 100644 --- a/python-python-memcached.changes +++ b/python-python-memcached.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Dec 13 00:36:09 UTC 2022 - Matej Cepl + +- Fix incorrect version number in `__version__` + (gh#linsomniac/python-memcached#185). +- Fix build: we don't have /usr/sbin any more. +- Clean up SPEC file. + ------------------------------------------------------------------- Mon Apr 11 13:02:07 UTC 2022 - Markéta Machová diff --git a/python-python-memcached.spec b/python-python-memcached.spec index 7eb5e2d..d018ea3 100644 --- a/python-python-memcached.spec +++ b/python-python-memcached.spec @@ -16,7 +16,6 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define oldpython python Name: python-python-memcached Version: 1.59 @@ -29,6 +28,7 @@ Source: https://github.com/linsomniac/python-memcached/archive/%{version BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module six} +BuildRequires: fdupes BuildRequires: memcached BuildRequires: python-rpm-macros BuildRequires: util-linux @@ -53,28 +53,29 @@ for more information. %prep %setup -q -n python-memcached-%{version} sed -i \ - -e 's:#!/usr/bin/env python::' \ + -e 's:#!%{_bindir}/env python::' \ memcache.py sed -i 's/import mock/import unittest.mock as mock/' tests/test_memcache.py +# gh#linsomniac/python-memcached#185 +sed -i -e '/__version__/s/1\.58/1.59/' memcache.py %build %python_build %install %python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%if 0%{?fedora} || 0%{?rhel} -/usr/bin/memcached -dv -P $PWD/memcached.pid -%else -/usr/sbin/memcached -dv -P $PWD/memcached.pid -%endif +%{_bindir}/memcached -dv -P $PWD/memcached.pid %pytest kill -9 $(cat $PWD/memcached.pid) %files %{python_files} %license PSF.LICENSE %doc README.md -%{python_sitelib}/* +%{python_sitelib}/memcache.py +%pycache_only %{python_sitelib}/__pycache__/memcache.*.pyc +%{python_sitelib}/python_memcached-%{version}*-info %changelog From d3178e3712b8194a665bae2b9c09aabc2710b98507ac3016e4ad3a09d9358dbf Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 13 Dec 2022 06:39:58 +0000 Subject: [PATCH 2/3] Fix RE OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-memcached?expand=0&rev=37 --- python-python-memcached.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-python-memcached.spec b/python-python-memcached.spec index d018ea3..2c0abbb 100644 --- a/python-python-memcached.spec +++ b/python-python-memcached.spec @@ -57,7 +57,7 @@ sed -i \ memcache.py sed -i 's/import mock/import unittest.mock as mock/' tests/test_memcache.py # gh#linsomniac/python-memcached#185 -sed -i -e '/__version__/s/1\.58/1.59/' memcache.py +sed -i -e '/__version__/s/[0-9.]\+/%{version}/' memcache.py %build %python_build From 6860f0eb56a3c39a7270596212a3fa39be3e2f9569eecb36c90796bdcc389e1c Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 13 Dec 2022 08:56:31 +0000 Subject: [PATCH 3/3] Fix changelog OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-memcached?expand=0&rev=38 --- python-python-memcached.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-python-memcached.changes b/python-python-memcached.changes index 4998e91..356c636 100644 --- a/python-python-memcached.changes +++ b/python-python-memcached.changes @@ -3,7 +3,7 @@ Tue Dec 13 00:36:09 UTC 2022 - Matej Cepl - Fix incorrect version number in `__version__` (gh#linsomniac/python-memcached#185). -- Fix build: we don't have /usr/sbin any more. +- Fix build: memcached moved their binaries to /usr/bin. - Clean up SPEC file. -------------------------------------------------------------------