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 https://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define oldpython python
Name: python-dogpile.cache
Version: 0.6.6
Release: 0
Summary: A caching front-end based on the Dogpile lock
License: BSD-3-Clause
Group: Development/Languages/Python
Url: http://bitbucket.org/zzzeek/dogpile.cache
Source: https://pypi.io/packages/source/d/dogpile.cache/dogpile.cache-%{version}.tar.gz
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 https://gerrit.sqlalchemy.org/#/c/89/
%ifpython2
Obsoletes: %{oldpython}-dogpile.core < 0.4.1
Provides: %{oldpython}-dogpile.core = %{version}
%endif
%ifpython3
Provides: python3-dogpile.core = %{version}
Obsoletes: python3-dogpile.core < 0.4.1
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%python_subpackages
%description
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.
%prep
%setup -q -n dogpile.cache-%{version}
%build
%python_build
%install
%python_install
%python_expand %fdupes -s %{buildroot}/%{python_sitelib}
%check
export RUNTESTS="-k 'not test_dbm_backend and not test_memcached_backend and not test_redis_backend'"
%python_exec -m pytest --ignore=tests/test_lock.py
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/dogpile
%{python_sitelib}/dogpile.cache-%{version}-py%{python_version}.egg-info
%changelog