14
0
Files
python-pymemcache/python-pymemcache.spec
Daniel Garcia 2575578270 - Remove python-pymemcache-no-mock.patch
- More specific python_sitelib in %files
- Remove python_module macro definition
- Update to 4.0.0:
  * Drop python support for 2.7, 3.4 and 3.5 by @jogo in #321
  * Use default for get ignore_exc by @jogo in #351
  * Return default from hash client by @Pankrat in #352
  * Return default from hash client when using positional argument by @Pankrat
    in #354
  * Support noreply for hash flush_all by @jogo in #361
  * Drop support for Python 3.6 by @jparise in #363
  * Add official support for Python 3.10 by @jparise in #365
  * Handle a blank stat value by @liquidpele in #388
  * Small buffer pass optimization as discussed in #395. by @martinnj in #402
  * Expand Client with a method for sending arbitrary commands. by @martinnj in
    #395
  * add pluggable compression serde by @sontek in #407
  * Start to add type hints by @jogo in #415
  * Add py.typed file by @jogo in #421
  * Fix key_prefix issue with stats and cache_memlimit by @jogo in #433

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pymemcache?expand=0&rev=35
2022-12-07 13:14:17 +00:00

95 lines
2.7 KiB
RPMSpec

#
# spec file for package python-pymemcache
#
# Copyright (c) 2022 SUSE LLC
# 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.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without python2
Name: python-pymemcache
Version: 4.0.0
Release: 0
Summary: A pure Python memcached client
License: Apache-2.0
Group: Development/Languages/Python
URL: https://github.com/Pinterest/pymemcache
Source: https://files.pythonhosted.org/packages/source/p/pymemcache/pymemcache-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: memcached
BuildRequires: python-rpm-macros
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module gevent}
BuildRequires: %{python_module Faker}
BuildRequires: %{python_module pylibmc}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module python-memcached}
BuildRequires: %{python_module zstd}
# /SECTION
%if %{with python2}
BuildRequires: python-future
%endif
%ifpython2
Requires: python-future
%endif
%python_subpackages
%description
A pure-Python memcached client.
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 -p1 -n pymemcache-%{version}
# Disable pytest-cov
sed -i 's/tool:pytest/tool:ignore-pytest-cov/' setup.cfg
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%{_sbindir}/memcached &
cat << EOF > pytest.ini
[pytest]
markers =
unit
integration
benchmark
EOF
# TLS tests depend on setting up a memcached equivalent to
# https://github.com/scoriacorp/docker-tls-memcached
%pytest -rs -k 'not tls' -m 'unit or integration'
%files %{python_files}
%license LICENSE.txt
%doc README.rst
%{python_sitelib}/pymemcache
%{python_sitelib}/pymemcache-%{version}*-info
%changelog