# # spec file for package python-zc.lockfile # # Copyright (c) 2021 SUSE LLC # Copyright (c) 2013 LISA GmbH, Bingen, 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-%{**}} %global skip_python2 1 %define skip_python36 1 %define skip_python39 1 Name: python-zc.lockfile Version: 2.0 Release: 2.3 Summary: Basic inter-process locks License: ZPL-2.1 Group: Development/Libraries/Python URL: https://pypi.python.org/pypi/zc.lockfile Source: https://files.pythonhosted.org/packages/source/z/zc.lockfile/zc.lockfile-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: %{python_module zope.testing} BuildRequires: fdupes BuildRequires: python-rpm-macros %if 0%{?suse_version} <= 1500 BuildRequires: python2-mock %endif Provides: python-zc-lockfile = %{version} Obsoletes: python-zc-lockfile < %{version} BuildArch: noarch %python_subpackages %description The zc.lockfile package provides a basic portable implementation of interprocess locks using lock files. The purpose if not specifically to lock files, but to simply provide locks with an implementation based on file-locking primitives. Of course, these locks could be used to mediate access to other files. For example, the ZODB file storage implementation uses file locks to mediate access to file-storage database files. The database files and lock file files are separate files. %prep %setup -q -n zc.lockfile-%{version} rm -rf src/zc.lockfile.egg-info find -name *~ -delete %build %python_build %install %python_install # concatenate both README.txt cat %{buildroot}%{python_sitelib}/zc/lockfile/README.txt >> README.txt rm %{buildroot}%{python_sitelib}/zc/lockfile/README.txt %python_expand %fdupes %{buildroot}%{$python_sitelib} %check cd build/lib %{python_expand export PYTHONPATH='.' $python -m unittest -v zc.lockfile.tests $python -m doctest -v zc/lockfile/README.txt } %files %{python_files} %license LICENSE.txt %doc CHANGES.rst COPYRIGHT.txt README.txt %{python_sitelib}/* %changelog * Thu Sep 23 2021 pgajdos@suse.com - %%check: do not use python setup.py test * Mon Aug 12 2019 Marketa Calabkova - update to version 2.0 * Extracted new SimpleLockFile that removes implicit behavior writing to the lock file, and instead allows a subclass to define that behavior. * SimpleLockFile and thus LockFile are now new-style classes. Any clients relying on LockFile being an old-style class will need to be adapted. * Drop support for Python 3.4. * Add support for Python 3.8b3. * Tue Apr 9 2019 Marketa Calabkova - update to version 1.4 * Claim support for Python 3.4, 3.5, 3.6 and 3.7. * Drop Python 2.6, 3.2 and 3.3. * Stop logging failure to acquire locks. Clients can do that if they wish. * Sat Jun 24 2017 aloisio@gmx.com - Update to 1.2.1 * Fixed: unlocking and locking didn’t work when a multiprocessing process was running (and presumably other conditions). 1.2.0: * Added the ability to include the hostname in the lock file content. * Code and ReST markup cosmetics. [alecghica] - Converted to single-spec * Sat Aug 3 2013 hpj@urpla.net - Update to 1.1.0 version: * Added Trove classifiers and made setup.py zest.releaser friendly. * Added Python 3.2, 3.3 and PyPy 1.9 support. * Removed Python 2.4 and Python 2.5 support. - renamed to python-zc.lockfile - enable testing - improve doc and packaging * Mon Jan 14 2013 p.drouand@gmail.com - Update to 1.0.2 version: * Fixed: the fix included in 1.0.1 caused multiple pids to be written to the lock file - Clean the specfile by removing redundant and useless tags * Wed Nov 10 2010 coolo@novell.com - fix file list * Wed Jun 2 2010 hvogel@novell.com - Initial Package, Version 1.0.0