r1506 - in zc.lockfile/trunk (11 files)
Brian Sutherland
jinty-guest at alioth.debian.org
Wed Jun 10 08:27:39 UTC 2009
Date: Wednesday, June 10, 2009 @ 08:27:38
Author: jinty-guest
Revision: 1506
[svn-inject] Applying Debian modifications to trunk
Added:
zc.lockfile/trunk/debian/
zc.lockfile/trunk/debian/changelog
zc.lockfile/trunk/debian/compat
zc.lockfile/trunk/debian/control
zc.lockfile/trunk/debian/copyright
zc.lockfile/trunk/debian/rules
zc.lockfile/trunk/debian/tests/
zc.lockfile/trunk/debian/tests/all
zc.lockfile/trunk/debian/tests/control
zc.lockfile/trunk/debian/watch
zc.lockfile/trunk/doc.txt
Property changes on: zc.lockfile/trunk/debian
___________________________________________________________________
Added: mergeWithUpstream
+ 1
Added: zc.lockfile/trunk/debian/changelog
===================================================================
--- zc.lockfile/trunk/debian/changelog (rev 0)
+++ zc.lockfile/trunk/debian/changelog 2009-06-10 08:27:38 UTC (rev 1506)
@@ -0,0 +1,5 @@
+zc.lockfile (1.0.0-1) unstable; urgency=low
+
+ * Inital Release
+
+ -- Brian Sutherland <brian at vanguardistas.net> Mon, 08 Jun 2009 10:12:08 +0200
Added: zc.lockfile/trunk/debian/compat
===================================================================
--- zc.lockfile/trunk/debian/compat (rev 0)
+++ zc.lockfile/trunk/debian/compat 2009-06-10 08:27:38 UTC (rev 1506)
@@ -0,0 +1 @@
+7
Added: zc.lockfile/trunk/debian/control
===================================================================
--- zc.lockfile/trunk/debian/control (rev 0)
+++ zc.lockfile/trunk/debian/control 2009-06-10 08:27:38 UTC (rev 1506)
@@ -0,0 +1,26 @@
+Source: zc.lockfile
+Section: python
+Priority: extra
+Maintainer: Debian/Ubuntu Zope Team <pkg-zope-developers at lists.alioth.debian.org>
+Uploaders: Brian Sutherland <brian at vanguardistas.net>
+Build-Depends: debhelper, python-all-dev, python-central, python-setuptools, python-van.pydeb
+Standards-Version: 3.8.1
+XS-Python-Version: all
+
+Package: python-zc.lockfile
+Architecture: all
+Depends: ${setuptools:Depends}, ${python:Depends}, ${shlibs:Depends}
+Provides: python-zc, ${setuptools:Provides}, ${python:Provides}
+Conflicts: python-zc
+Replaces: python-zc
+Suggests: ${setuptools:Suggests}
+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.
Added: zc.lockfile/trunk/debian/copyright
===================================================================
--- zc.lockfile/trunk/debian/copyright (rev 0)
+++ zc.lockfile/trunk/debian/copyright 2009-06-10 08:27:38 UTC (rev 1506)
@@ -0,0 +1,19 @@
+This package was debianized by Brian Sutherland <brian at vanguardistas.net>
+
+It was downloaded from http://pypi.python.org/pypi/zc.lockfile
+
+Copyright:
+
+Upstream Author: Zope Corporation and Contributers <zope3-dev at zope.org>
+
+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.
Added: zc.lockfile/trunk/debian/rules
===================================================================
--- zc.lockfile/trunk/debian/rules (rev 0)
+++ zc.lockfile/trunk/debian/rules 2009-06-10 08:27:38 UTC (rev 1506)
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+include /usr/share/python-van.pydeb/rules_templates/rules.1.mk
+
+post-install-python%:
+ install -D -m 644 src/zc/__init__.py \
+ debian/$(package)$(call py_libdir,$*)/zc/__init__.py
Property changes on: zc.lockfile/trunk/debian/rules
___________________________________________________________________
Added: svn:executable
+ *
Added: zc.lockfile/trunk/debian/tests/all
===================================================================
--- zc.lockfile/trunk/debian/tests/all (rev 0)
+++ zc.lockfile/trunk/debian/tests/all 2009-06-10 08:27:38 UTC (rev 1506)
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+set -e
+
+PYVERS=$(pyversions -vr debian/control)
+TMPFILE=$(mktemp)
+
+cat > $TMPFILE << EOF
+import sys
+from zope.testing import testrunner
+
+subs = (sys.version_info[0], sys.version_info[1])
+test_path = '/usr/lib/python%s.%s/site-packages/' % subs
+
+
+
+exitcode = testrunner.run([
+ '--tests-pattern', '^f?tests$',
+ '-s', 'zc.lockfile',
+ '--test-path', test_path
+ ])
+sys.exit(exitcode)
+EOF
+
+for version in ${PYVERS}; do
+ python${version} ${TMPFILE}
+done
+
+rm $TMPFILE
Added: zc.lockfile/trunk/debian/tests/control
===================================================================
--- zc.lockfile/trunk/debian/tests/control (rev 0)
+++ zc.lockfile/trunk/debian/tests/control 2009-06-10 08:27:38 UTC (rev 1506)
@@ -0,0 +1,3 @@
+Tests: all
+Features: no-build-needed
+Depends: @, python-zope.testing
Added: zc.lockfile/trunk/debian/watch
===================================================================
--- zc.lockfile/trunk/debian/watch (rev 0)
+++ zc.lockfile/trunk/debian/watch 2009-06-10 08:27:38 UTC (rev 1506)
@@ -0,0 +1,2 @@
+version=3
+http://pypi.python.org/packages/source/z/zc.lockfile/zc.lockfile-(.*)\.tar\.gz
Added: zc.lockfile/trunk/doc.txt
===================================================================
--- zc.lockfile/trunk/doc.txt (rev 0)
+++ zc.lockfile/trunk/doc.txt 2009-06-10 08:27:38 UTC (rev 1506)
@@ -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
+**********************
More information about the pkg-zope-commits
mailing list