File python-dogpile.cache.spec of Package python-dogpile.cache

# spec file for package python-dogpile.cache
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# 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

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name:           python-dogpile.cache
Version:        0.6.5
Release:        0
Summary:        A caching front-end based on the Dogpile lock
License:        BSD-3-Clause
Group:          Development/Languages/Python
BuildRequires:  %{python_module Mako}
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module pytest-cov}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
# NOTE(toabctl): upstream merged dogpile.core into dogpile.cache
# see
Obsoletes:      %{oldpython}-dogpile.core < 0.4.1
Provides:       %{oldpython}-dogpile.core = %{version}
Provides:       python3-dogpile.core = %{version}
Obsoletes:      python3-dogpile.core < 0.4.1
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

A caching API built around the concept of a "dogpile lock", which allows
continued access to an expiring data value while a single thread generates a
new value.

%setup -q -n dogpile.cache-%{version}


%python_expand %fdupes -s %{buildroot}/%{python_sitelib}

export RUNTESTS="-k 'not test_dbm_backend and not test_memcached_backend and not test_redis_backend'"
%python_exec -m pytest --ignore=tests/

%files %{python_files}