--- zc.lockfile-1.0.0.orig/doc.txt +++ zc.lockfile-1.0.0/doc.txt @@ -0,0 +1,79 @@ +************************* +Basic inter-process locks +************************* + +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. + +.. contents:: + +Detailed Documentation +********************** + +Lock file support +================= + +The ZODB lock_file module provides support for creating file system +locks. These are locks that are implemented with lock files and +OS-provided locking facilities. To create a lock, instantiate a +LockFile object with a file name: + + >>> import zc.lockfile + >>> lock = zc.lockfile.LockFile('lock') + +If we try to lock the same name, we'll get a lock error: + + >>> import zope.testing.loggingsupport + >>> handler = zope.testing.loggingsupport.InstalledHandler('zc.lockfile') + >>> try: + ... zc.lockfile.LockFile('lock') + ... except zc.lockfile.LockError: + ... print "Can't lock file" + Can't lock file + + >>> for record in handler.records: + ... print record.levelname, record.getMessage() + ERROR Error locking file lock; pid=UNKNOWN + +To release the lock, use it's close method: + + >>> lock.close() + +The lock file is not removed. It is left behind: + + >>> import os + >>> os.path.exists('lock') + True + +Of course, now that we've released the lock, we can created it again: + + >>> lock = zc.lockfile.LockFile('lock') + >>> lock.close() + +.. Cleanup + + >>> import os + >>> os.remove('lock') + + +Change History +*************** + +1.0.0 (2008-10-18) +==================== + +- Fixed a small bug in error logging. + +1.0.0b1 (2007-07-18) +==================== + +Initial release + +Download +********************** --- zc.lockfile-1.0.0.orig/debian/rules +++ zc.lockfile-1.0.0/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +%: + dh --with pydeb --with python-central $@ + +overRIde_dh_install: + # zc.lockfile provides the zc namespace __init__.py + for py in $(shell pyversions -vr debian/control); do \ + cp src/zope/__init__.py debian/python-zc.lockfile/usr/lib/python$$py/*-packages/zc/; \ + done --- zc.lockfile-1.0.0.orig/debian/control +++ zc.lockfile-1.0.0/debian/control @@ -0,0 +1,26 @@ +Source: zc.lockfile +Section: zope +Priority: optional +Maintainer: Debian/Ubuntu Zope Team +Uploaders: Brian Sutherland , Fabio Tranchitella +Build-Depends: debhelper (>= 7), python-all-dev (>= 2.3.5-11), python-central (>= 0.5.6), python-setuptools (>= 0.6b3), python-van.pydeb (>= 1.3.0-4) +Standards-Version: 3.8.3 +XS-Python-Version: all +XS-Vcs-Svn: svn://svn.debian.org/pkg-zope/zc.lockfile/trunk + +Package: python-zc.lockfile +Architecture: all +Depends: ${pydeb:Depends}, ${python:Depends}, ${misc:Depends} +Recommends: ${pydeb:Recommends} +Provides: ${pydeb:Provides}, ${python:Provides}, python-zc +Suggests: ${pydeb:Suggests} +Replaces: python-zc +XB-Python-Version: ${python:Versions} +Description: Basic inter-process locks + 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. --- zc.lockfile-1.0.0.orig/debian/copyright +++ zc.lockfile-1.0.0/debian/copyright @@ -0,0 +1,74 @@ +This package was debianized by Brian Sutherland + +It was downloaded from http://pypi.python.org/pypi/zc.lockfile + +Copyright: + +Upstream Author: Zope Corporation and Contributers + +Files contain this header: + +# Copyright (c) 2004 Zope Corporation and Contributors. +# All Rights Reserved. +# +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. + +Zope Public License (ZPL) Version 2.1 +------------------------------------- + +A copyright notice accompanies this license document that +identifies the copyright holders. + +This license has been certified as open source. It has also +been designated as GPL compatible by the Free Software +Foundation (FSF). + +Redistribution and use in source and binary forms, with or +without modification, are permitted provided that the +following conditions are met: + +1. Redistributions in source code must retain the + accompanying copyright notice, this list of conditions, + and the following disclaimer. + +2. Redistributions in binary form must reproduce the accompanying + copyright notice, this list of conditions, and the + following disclaimer in the documentation and/or other + materials provided with the distribution. + +3. Names of the copyright holders must not be used to + endorse or promote products derived from this software + without prior written permission from the copyright + holders. + +4. The right to distribute this software or to use it for + any purpose does not give you the right to use + Servicemarks (sm) or Trademarks (tm) of the copyright + holders. Use of them is covered by separate agreement + with the copyright holders. + +5. If any files are modified, you must cause the modified + files to carry prominent notices stating that you changed + the files and the date of any change. + +Disclaimer + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' + AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT + NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN + NO EVENT SHALL THE COPYRIGHT HOLDERS BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH + DAMAGE. --- zc.lockfile-1.0.0.orig/debian/compat +++ zc.lockfile-1.0.0/debian/compat @@ -0,0 +1 @@ +7 --- zc.lockfile-1.0.0.orig/debian/changelog +++ zc.lockfile-1.0.0/debian/changelog @@ -0,0 +1,30 @@ +zc.lockfile (1.0.0-4) unstable; urgency=low + + * Convert to debhelper 7 and the pydeb dh7 extension. + + -- Fabio Tranchitella Tue, 05 Jan 2010 21:51:04 +0100 + +zc.lockfile (1.0.0-3) unstable; urgency=low + + [ Brian Sutherland ] + * Set priority to optional as we are depended on by python-zodb which is + priority optional. + + [ Fabio Tranchitella ] + * debian/control: build-depend on pyton-vab.pydeb >= 1.3.0-2. + (Closes: #552974) + + -- Fabio Tranchitella Sun, 08 Nov 2009 11:19:11 +0100 + +zc.lockfile (1.0.0-2) unstable; urgency=low + + * Set section to zope. + * Rebuild against van.pydeb 1.3. + + -- Matthias Klose Sat, 12 Sep 2009 22:41:11 +0200 + +zc.lockfile (1.0.0-1) unstable; urgency=low + + * Inital Release + + -- Brian Sutherland Mon, 08 Jun 2009 10:12:08 +0200 --- zc.lockfile-1.0.0.orig/debian/watch +++ zc.lockfile-1.0.0/debian/watch @@ -0,0 +1,2 @@ +version=3 +http://pypi.python.org/packages/source/z/zc.lockfile/zc.lockfile-([0-9.]*)\.tar\.gz --- zc.lockfile-1.0.0.orig/debian/tests/control +++ zc.lockfile-1.0.0/debian/tests/control @@ -0,0 +1,3 @@ +Tests: all +Features: no-build-needed +Depends: @, python-zope.testing --- zc.lockfile-1.0.0.orig/debian/tests/all +++ zc.lockfile-1.0.0/debian/tests/all @@ -0,0 +1,2 @@ +#!/bin/bash +. /usr/share/python-zope.testing/test_helper