2014-06-16 19:40:22 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pymemcache
|
|
|
|
#
|
2022-04-07 14:48:23 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2014-06-16 19:40:22 +00:00
|
|
|
# Copyright (c) 2014 Thomas Bechtold <thomasbechtold@jpberlin.de>
|
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2019-02-27 16:02:01 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2015-02-24 15:07:28 +00:00
|
|
|
#
|
2014-06-16 19:40:22 +00:00
|
|
|
|
|
|
|
|
2020-04-23 09:34:51 +00:00
|
|
|
%bcond_without python2
|
2014-06-16 19:40:22 +00:00
|
|
|
Name: python-pymemcache
|
2022-12-07 13:14:17 +00:00
|
|
|
Version: 4.0.0
|
2014-06-16 19:40:22 +00:00
|
|
|
Release: 0
|
2019-03-19 04:55:06 +00:00
|
|
|
Summary: A pure Python memcached client
|
2015-02-24 15:07:28 +00:00
|
|
|
License: Apache-2.0
|
2014-06-16 19:40:22 +00:00
|
|
|
Group: Development/Languages/Python
|
2019-09-10 12:02:12 +00:00
|
|
|
URL: https://github.com/Pinterest/pymemcache
|
2019-02-27 16:02:01 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pymemcache/pymemcache-%{version}.tar.gz
|
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-09-10 12:02:12 +00:00
|
|
|
BuildRequires: fdupes
|
2021-06-19 07:33:10 +00:00
|
|
|
BuildRequires: memcached
|
2019-09-10 12:02:12 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildArch: noarch
|
2021-06-19 07:33:10 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module gevent}
|
2022-12-07 13:14:17 +00:00
|
|
|
BuildRequires: %{python_module Faker}
|
2021-06-19 07:33:10 +00:00
|
|
|
BuildRequires: %{python_module pylibmc}
|
|
|
|
BuildRequires: %{python_module pytest}
|
|
|
|
BuildRequires: %{python_module python-memcached}
|
2022-12-07 13:14:17 +00:00
|
|
|
BuildRequires: %{python_module zstd}
|
2021-06-19 07:33:10 +00:00
|
|
|
# /SECTION
|
2020-04-23 09:34:51 +00:00
|
|
|
%if %{with python2}
|
|
|
|
BuildRequires: python-future
|
|
|
|
%endif
|
2019-02-27 16:02:01 +00:00
|
|
|
%ifpython2
|
2020-04-23 09:34:51 +00:00
|
|
|
Requires: python-future
|
2019-02-27 16:02:01 +00:00
|
|
|
%endif
|
|
|
|
%python_subpackages
|
2014-06-16 19:40:22 +00:00
|
|
|
|
|
|
|
%description
|
2019-03-19 04:55:06 +00:00
|
|
|
A pure-Python memcached client.
|
2014-06-16 19:40:22 +00:00
|
|
|
|
|
|
|
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
|
2022-04-07 14:48:23 +00:00
|
|
|
%autosetup -p1 -n pymemcache-%{version}
|
2021-06-19 07:33:10 +00:00
|
|
|
# Disable pytest-cov
|
|
|
|
sed -i 's/tool:pytest/tool:ignore-pytest-cov/' setup.cfg
|
2014-06-16 19:40:22 +00:00
|
|
|
|
|
|
|
%build
|
2019-02-27 16:02:01 +00:00
|
|
|
%python_build
|
2014-06-16 19:40:22 +00:00
|
|
|
|
|
|
|
%install
|
2019-02-27 16:02:01 +00:00
|
|
|
%python_install
|
2019-09-10 12:02:12 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2014-06-16 19:40:22 +00:00
|
|
|
|
|
|
|
%check
|
2022-12-07 13:33:44 +00:00
|
|
|
if [ -f %{_sbindir}/memcached ]; then
|
|
|
|
%{_sbindir}/memcached &
|
|
|
|
elif [ -f %{_bindir}/memcached ]; then
|
|
|
|
%{_bindir}/memcached &
|
|
|
|
fi
|
2022-12-07 13:14:17 +00:00
|
|
|
|
|
|
|
cat << EOF > pytest.ini
|
|
|
|
[pytest]
|
|
|
|
markers =
|
|
|
|
unit
|
|
|
|
integration
|
|
|
|
benchmark
|
|
|
|
EOF
|
|
|
|
|
2021-06-19 07:33:10 +00:00
|
|
|
# TLS tests depend on setting up a memcached equivalent to
|
|
|
|
# https://github.com/scoriacorp/docker-tls-memcached
|
2022-12-07 13:14:17 +00:00
|
|
|
%pytest -rs -k 'not tls' -m 'unit or integration'
|
2021-06-19 07:33:10 +00:00
|
|
|
|
2019-02-27 16:02:01 +00:00
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE.txt
|
|
|
|
%doc README.rst
|
2022-12-07 13:14:17 +00:00
|
|
|
%{python_sitelib}/pymemcache
|
|
|
|
%{python_sitelib}/pymemcache-%{version}*-info
|
2014-06-16 19:40:22 +00:00
|
|
|
|
|
|
|
%changelog
|