forked from pool/python-python-memcached
Accepting request 1042575 from devel:languages:python
- Fix incorrect version number in `__version__` (gh#linsomniac/python-memcached#185). - Fix build: memcached moved their binaries to /usr/bin. - Clean up SPEC file. OBS-URL: https://build.opensuse.org/request/show/1042575 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-python-memcached?expand=0&rev=20
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Tue Dec 13 00:36:09 UTC 2022 - Matej Cepl <mcepl@suse.com>
|
||||||
|
|
||||||
|
- Fix incorrect version number in `__version__`
|
||||||
|
(gh#linsomniac/python-memcached#185).
|
||||||
|
- Fix build: memcached moved their binaries to /usr/bin.
|
||||||
|
- Clean up SPEC file.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Mon Apr 11 13:02:07 UTC 2022 - Markéta Machová <mmachova@suse.com>
|
Mon Apr 11 13:02:07 UTC 2022 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
||||||
%define oldpython python
|
%define oldpython python
|
||||||
Name: python-python-memcached
|
Name: python-python-memcached
|
||||||
Version: 1.59
|
Version: 1.59
|
||||||
@@ -29,6 +28,7 @@ Source: https://github.com/linsomniac/python-memcached/archive/%{version
|
|||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module six}
|
BuildRequires: %{python_module six}
|
||||||
|
BuildRequires: fdupes
|
||||||
BuildRequires: memcached
|
BuildRequires: memcached
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
BuildRequires: util-linux
|
BuildRequires: util-linux
|
||||||
@@ -53,28 +53,29 @@ for more information.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n python-memcached-%{version}
|
%setup -q -n python-memcached-%{version}
|
||||||
sed -i \
|
sed -i \
|
||||||
-e 's:#!/usr/bin/env python::' \
|
-e 's:#!%{_bindir}/env python::' \
|
||||||
memcache.py
|
memcache.py
|
||||||
sed -i 's/import mock/import unittest.mock as mock/' tests/test_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/[0-9.]\+/%{version}/' memcache.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%python_build
|
%python_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%python_install
|
%python_install
|
||||||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%if 0%{?fedora} || 0%{?rhel}
|
%{_bindir}/memcached -dv -P $PWD/memcached.pid
|
||||||
/usr/bin/memcached -dv -P $PWD/memcached.pid
|
|
||||||
%else
|
|
||||||
/usr/sbin/memcached -dv -P $PWD/memcached.pid
|
|
||||||
%endif
|
|
||||||
%pytest
|
%pytest
|
||||||
kill -9 $(cat $PWD/memcached.pid)
|
kill -9 $(cat $PWD/memcached.pid)
|
||||||
|
|
||||||
%files %{python_files}
|
%files %{python_files}
|
||||||
%license PSF.LICENSE
|
%license PSF.LICENSE
|
||||||
%doc README.md
|
%doc README.md
|
||||||
%{python_sitelib}/*
|
%{python_sitelib}/memcache.py
|
||||||
|
%pycache_only %{python_sitelib}/__pycache__/memcache.*.pyc
|
||||||
|
%{python_sitelib}/python_memcached-%{version}*-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
Reference in New Issue
Block a user