File python-zc.lockfile.spec of Package python-zc.lockfile

#
# spec file for package python-zc.lockfile
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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 http://bugs.opensuse.org/
#


Name:           python-zc.lockfile
Version:        1.1.0
Release:        0
License:        ZPL-2.1
Summary:        Basic inter-process locks
Url:            http://pypi.python.org/pypi/zc.lockfile
Group:          Development/Libraries/Python
Source:         https://pypi.python.org/packages/source/z/zc.lockfile/zc.lockfile-%{version}.zip
BuildRequires:  python-setuptools
BuildRequires:  unzip
# Testing requirements:
BuildRequires:  python-zope.testing
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Provides:       python-zc-lockfile = %{version}
Obsoletes:      python-zc-lockfile < %{version}

%if 0%{?suse_version} && 0%{?suse_version} <= 1110
BuildRequires:  python
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%else
BuildArch:      noarch
%endif

%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}

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# concatenate both README.txt
cat %{buildroot}%{python_sitelib}/zc/lockfile/README.txt >> README.txt
rm %{buildroot}%{python_sitelib}/zc/lockfile/README.txt

%check
python setup.py test

%files
%defattr(-,root,root)
%doc CHANGES.txt COPYRIGHT.txt LICENSE.txt README.txt
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by