forked from pool/python-portalocker
* Added fail_when_locked=False support to BoundedSemaphore thanks to @flaviens - 2.6.0: * Added fileno() support. Fixes #80 on posix systems - 2.5.1: * Added clear warning when locking in non-blocking mode without specifying either EXCLUSIVE or SHARED mode. Fixes #77 - 2.5.0: * Fixed shared locks on Windows and simplified locking mechanism - 2.4.0: * Added warning when trying to use a timeout in blocking mode. And removed deprecated testing code and checks - 2.3.2: * Added semver indicator and specified needed Python release thanks to @rayluo v2.3.2 - 2.3.1: * Removed Python 2 classifier thanks to @rayluo v2.3.1 - 2.3.0: * enabled PEP 561 compliance v2.3.0 - 2.2.1: * removed debug statement v2.2.1 - 2.2.0: * updated travis location - 2.1.0: * Added Redis based distributed lock which gracefully handles connection loss and dying applications. Added full type hinting support. Fixed bug where the file handle was not always explicitly closed with errors - v2.0.0: OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-portalocker?expand=0&rev=18
68 lines
2.0 KiB
RPMSpec
68 lines
2.0 KiB
RPMSpec
#
|
|
# spec file for package python-portalocker
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%{?sle15_python_module_pythons}
|
|
Name: python-portalocker
|
|
Version: 2.7.0
|
|
Release: 0
|
|
Summary: Locking library for Python
|
|
License: Python-2.0
|
|
Group: Development/Languages/Python
|
|
URL: https://github.com/WoLpH/portalocker
|
|
Source: https://github.com/WoLpH/portalocker/archive/v%{version}.tar.gz
|
|
BuildRequires: %{python_module pytest >= 3.4.0}
|
|
BuildRequires: %{python_module setuptools >= 38.3.0}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Suggests: python-redis
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Portalocker is a library to provide an API to file locking.
|
|
|
|
On Linux and Unix systems, the locks are advisory by default. By
|
|
specifying the `-o mand` option to the mount command, it is possible
|
|
to enable mandatory file locking on Linux. This is generally not
|
|
recommended however.
|
|
|
|
%prep
|
|
%setup -q -n portalocker-%{version}
|
|
# do not bother with benchmark and cov
|
|
rm pytest.ini
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
# Do not test redis, the optional dependency is not installed by
|
|
# default
|
|
%pytest --ignore portalocker_tests/test_redis.py
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.rst
|
|
%{python_sitelib}/portalocker
|
|
%{python_sitelib}/portalocker-%{version}*-info
|
|
|
|
%changelog
|