2010-09-19 23:37:43 +00:00
|
|
|
#
|
2011-04-16 00:18:45 +00:00
|
|
|
# spec file for package python-lockfile
|
2010-09-19 23:37:43 +00:00
|
|
|
#
|
2017-10-10 14:12:28 +00:00
|
|
|
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
2010-09-19 23:37:43 +00:00
|
|
|
#
|
|
|
|
|
# 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.
|
2011-05-30 14:52:25 +00:00
|
|
|
|
2010-09-19 23:37:43 +00:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
|
#
|
|
|
|
|
|
2011-05-30 14:52:25 +00:00
|
|
|
|
2017-10-10 14:12:28 +00:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2012-06-27 08:56:26 +00:00
|
|
|
Name: python-lockfile
|
2015-05-07 12:05:56 +00:00
|
|
|
Version: 0.10.2
|
2012-06-11 12:30:00 +00:00
|
|
|
Release: 0
|
2010-09-19 23:37:43 +00:00
|
|
|
Summary: Platform-independent file locking module
|
2012-06-11 12:30:00 +00:00
|
|
|
License: MIT
|
2011-04-16 00:18:45 +00:00
|
|
|
Group: Development/Languages/Python
|
2017-10-10 14:12:28 +00:00
|
|
|
Url: https://github.com/openstack/pylockfile
|
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/l/lockfile/lockfile-%{version}.tar.gz
|
2012-06-11 12:30:00 +00:00
|
|
|
Patch0: %{name}-empty_ident.patch
|
2017-10-10 14:12:28 +00:00
|
|
|
BuildRequires: %{python_module devel}
|
|
|
|
|
BuildRequires: %{python_module nose}
|
|
|
|
|
BuildRequires: %{python_module pbr}
|
|
|
|
|
BuildRequires: %{python_module setuptools}
|
|
|
|
|
BuildRequires: python-rpm-macros
|
2009-09-24 14:28:42 +00:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2010-09-19 23:37:43 +00:00
|
|
|
BuildArch: noarch
|
2017-10-10 14:12:28 +00:00
|
|
|
%python_subpackages
|
2009-09-24 14:28:42 +00:00
|
|
|
|
|
|
|
|
%description
|
2011-04-16 00:18:45 +00:00
|
|
|
The lockfile package exports a LockFile class which provides a simple API for
|
|
|
|
|
locking files. Unlike the Windows msvcrt.locking function, the fcntl.lockf
|
|
|
|
|
and flock functions, and the deprecated posixfile module, the API is
|
|
|
|
|
identical across both Unix (including Linux and Mac) and Windows platforms.
|
|
|
|
|
The lock mechanism relies on the atomic nature of the link (on Unix) and
|
|
|
|
|
mkdir (on Windows) system calls. An implementation based on SQLite is also
|
|
|
|
|
provided, more as a demonstration of the possibilities it provides than as
|
|
|
|
|
production-quality code.
|
2009-09-24 14:28:42 +00:00
|
|
|
|
|
|
|
|
%prep
|
2012-06-27 08:56:26 +00:00
|
|
|
%setup -q -n lockfile-%{version}
|
2012-06-11 12:30:00 +00:00
|
|
|
# current thread has ident = None, which causes a TypeError
|
|
|
|
|
# http://code.google.com/p/pylockfile/issues/detail?id=8
|
|
|
|
|
%patch0 -p1 -b .empty_ident
|
|
|
|
|
|
2009-09-24 14:28:42 +00:00
|
|
|
%build
|
2017-10-10 14:12:28 +00:00
|
|
|
%python_build
|
2009-09-24 14:28:42 +00:00
|
|
|
|
|
|
|
|
%install
|
2017-10-10 14:12:28 +00:00
|
|
|
%python_install
|
2011-04-16 00:18:45 +00:00
|
|
|
|
2015-05-07 12:05:56 +00:00
|
|
|
%check
|
2017-10-10 14:12:28 +00:00
|
|
|
%python_exec -m nose
|
2015-05-07 12:05:56 +00:00
|
|
|
|
2017-10-10 14:12:28 +00:00
|
|
|
%files %{python_files}
|
2011-04-16 00:18:45 +00:00
|
|
|
%defattr(-,root,root,-)
|
2014-07-22 07:28:02 +00:00
|
|
|
%doc README RELEASE-NOTES LICENSE
|
2017-10-10 14:12:28 +00:00
|
|
|
%{python_sitelib}/lockfile*
|
2009-09-24 14:28:42 +00:00
|
|
|
|
2011-04-16 00:18:45 +00:00
|
|
|
%changelog
|