forked from pool/python-dogpile.cache
Ensured that the "pyproject.toml" file is not included in builds, as the presence of this file indicates to pip that a pep-517 installation process should be used. As this mode of operation appears to be not well supported by current tools / distros, these problems are avoided within the scope of dogpile.cache installation by omitting the file. Added option to the Redis backend :paramref:`.RedisBackend.thread_local_lock`, which when set to False will disable the use of a threading local by the ``redis`` module in its distributed lock service, which is known to interfere with the lock's behavior when used in an "async" use case, within dogpile this would be when using the :paramref:`.CacheRegion.async_creation_runner` feature. The default is conservatively being left at True, but it's likely this should be set to False in all cases, so a warning is emitted if this flag is not set to False in conjunction with the distributed lock. Added an optional argument to :class:`.RedisBackend` that specifies whether or not a thread-local Redis lock should be used. This is the default, but it breaks asynchronous runner compatibility. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-dogpile.cache?expand=0&rev=54
73 lines
2.3 KiB
RPMSpec
73 lines
2.3 KiB
RPMSpec
#
|
|
# spec file for package python-dogpile.cache
|
|
#
|
|
# Copyright (c) 2020 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%define oldpython python
|
|
Name: python-dogpile.cache
|
|
Version: 0.9.2
|
|
Release: 0
|
|
Summary: A caching front-end based on the Dogpile lock
|
|
License: BSD-3-Clause
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/sqlalchemy/dogpile.cache
|
|
Source: https://files.pythonhosted.org/packages/source/d/dogpile.cache/dogpile.cache-%{version}.tar.gz
|
|
BuildRequires: %{python_module Mako}
|
|
BuildRequires: %{python_module decorator >= 4.0.0}
|
|
BuildRequires: %{python_module mock}
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
Requires: python-decorator >= 4.0.0
|
|
BuildRequires: %{python_module six}
|
|
Requires: python-six
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Provides: python-dogpile.core = %{version}
|
|
Obsoletes: python-dogpile.core < 0.4.1
|
|
BuildArch: noarch
|
|
%ifpython2
|
|
Obsoletes: %{oldpython}-dogpile.core < 0.4.1
|
|
Provides: %{oldpython}-dogpile.core = %{version}
|
|
%endif
|
|
%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 %{buildroot}/%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.rst
|
|
%{python_sitelib}/dogpile
|
|
%{python_sitelib}/dogpile.cache-%{version}-py%{python_version}.egg-info
|
|
|
|
%changelog
|