File python-cachelib.spec of Package python-cachelib

# spec file for package python-cachelib
# Copyright (c) 2023 SUSE LLC
# 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

Name:           python-cachelib
Version:        0.10.2
Release:        0
Summary:        A collection of cache libraries in the same API interface
License:        BSD-3-Clause
Group:          Development/Languages/Python
# PATCH-FIX-UPSTREAM skip-failing-tests.patch gh#pallets-eco/cachelib#228
# skip failing tests
Patch0:         skip-failing-tests.patch
BuildRequires:  %{python_module pylibmc}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  redis
Recommends:     python-pylibmc
BuildArch:      noarch
# SECTION test
BuildRequires:  %{python_module pluggy}
BuildRequires:  %{python_module pylibmc}
BuildRequires:  %{python_module pyparsing}
BuildRequires:  %{python_module pytest-xprocess}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module python-dateutil}
BuildRequires:  %{python_module urllib3 < 2}
BuildRequires:  memcached

A collection of cache libraries in the same API interface.

%autosetup -p1 -n cachelib-%{version}


%python_expand %fdupes %{buildroot}%{$python_sitelib}

# set up working directory
export BASETEMP=$(mktemp -d -t cachelib_test.XXXXXX)
trap "rm -rf ${BASETEMP}" EXIT
# Allow finding memcached
export PATH="%{_sbindir}/:$PATH"
PYTEST_ADDOPTS="--capture=tee-sys --tb=short --basetemp=${BASETEMP}"
%pytest -rs -k "not network"

%files %{python_files}
%license LICENSE.rst
%doc README.rst

openSUSE Build Service is sponsored by