[Python-modules-commits] r7116 - in packages/python-pytc/trunk (13 files)

vt-guest at users.alioth.debian.org vt-guest at users.alioth.debian.org
Thu Dec 18 06:24:46 UTC 2008


    Date: Thursday, December 18, 2008 @ 06:24:45
  Author: vt-guest
Revision: 7116

[svn-inject] Applying Debian modifications to trunk

Added:
  packages/python-pytc/trunk/debian/
  packages/python-pytc/trunk/debian/changelog
  packages/python-pytc/trunk/debian/compat
  packages/python-pytc/trunk/debian/control
  packages/python-pytc/trunk/debian/copyright
  packages/python-pytc/trunk/debian/patches/
  packages/python-pytc/trunk/debian/patches/python2.4-compatibility
  packages/python-pytc/trunk/debian/patches/series
  packages/python-pytc/trunk/debian/patches/signed-byte
  packages/python-pytc/trunk/debian/patches/unnecessary-dependencies
  packages/python-pytc/trunk/debian/pycompat
  packages/python-pytc/trunk/debian/rules
  packages/python-pytc/trunk/debian/watch


Property changes on: packages/python-pytc/trunk/debian
___________________________________________________________________
Name: mergeWithUpstream
   + 1

Added: packages/python-pytc/trunk/debian/changelog
===================================================================
--- packages/python-pytc/trunk/debian/changelog	                        (rev 0)
+++ packages/python-pytc/trunk/debian/changelog	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1,5 @@
+python-pytc (0.6-2) experimental; urgency=low
+
+  * Initial release (Closes: #508822)
+
+ -- Vernon Tang <vt at foilhead.net>  Tue, 16 Dec 2008 03:44:19 +0800

Added: packages/python-pytc/trunk/debian/compat
===================================================================
--- packages/python-pytc/trunk/debian/compat	                        (rev 0)
+++ packages/python-pytc/trunk/debian/compat	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1 @@
+7

Added: packages/python-pytc/trunk/debian/control
===================================================================
--- packages/python-pytc/trunk/debian/control	                        (rev 0)
+++ packages/python-pytc/trunk/debian/control	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1,19 @@
+Source: python-pytc
+Section: python
+Priority: extra
+Maintainer: Vernon Tang <vt at foilhead.net>
+Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
+Build-Depends: debhelper (>= 7), cdbs (>= 0.4.41), quilt, python-central,
+ python-all-dev (>= 2.3), libtokyocabinet-dev (>= 1.3.6)
+XS-Python-Version: >= 2.3
+Standards-Version: 3.8.0
+Homepage: http://pypi.python.org/pypi/pytc/
+
+Package: python-pytc
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
+Description: Python bindings for the Tokyo Cabinet database
+ This package contains the pytc module, which gives Python programs the
+ ability to work with Tokyo Cabinet database files.

Added: packages/python-pytc/trunk/debian/copyright
===================================================================
--- packages/python-pytc/trunk/debian/copyright	                        (rev 0)
+++ packages/python-pytc/trunk/debian/copyright	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1,36 @@
+This package was debianized by Vernon Tang <vt at foilhead.net> on
+Tue, 16 Dec 2008 03:44:19 +0800.
+
+It was downloaded from http://pypi.python.org/pypi/pytc/
+
+Upstream Author:
+
+    Tasuku SUENAGA <gunyarakun at sourceforge.jp>
+
+Copyright:
+
+    Copyright (C) 2008 Tasuku SUENAGA
+
+License:
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted under the terms of the BSD License.
+
+    THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+    ANY EXPRESS 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 REGENTS OR CONTRIBUTORS 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.
+
+On Debian systems, the complete text of the BSD License can be
+found in `/usr/share/common-licenses/BSD'.
+
+
+The Debian packaging is copyright 2008, Vernon Tang <vt at foilhead.net> and
+is licensed under the BSD License, see `/usr/share/common-licenses/BSD'.

Added: packages/python-pytc/trunk/debian/patches/python2.4-compatibility
===================================================================
--- packages/python-pytc/trunk/debian/patches/python2.4-compatibility	                        (rev 0)
+++ packages/python-pytc/trunk/debian/patches/python2.4-compatibility	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1,17 @@
+Fix build on python < 2.5.
+
+Index: pytc-0.6/pytc.c
+===================================================================
+--- pytc-0.6.orig/pytc.c
++++ pytc-0.6/pytc.c
+@@ -18,6 +18,10 @@
+ #include <tcutil.h>
+ #include <limits.h>
+ 
++#if PY_VERSION_HEX < 0x02050000
++typedef inquiry lenfunc;
++#endif
++
+ /* FIXME: handle error */
+ /* FIXME: refactoring */
+ /* FIXME: setcmpfunc tcbdbcmplexical/decimal/cmpint32/cmpint64' */

Added: packages/python-pytc/trunk/debian/patches/series
===================================================================
--- packages/python-pytc/trunk/debian/patches/series	                        (rev 0)
+++ packages/python-pytc/trunk/debian/patches/series	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1,3 @@
+signed-byte
+python2.4-compatibility
+unnecessary-dependencies

Added: packages/python-pytc/trunk/debian/patches/signed-byte
===================================================================
--- packages/python-pytc/trunk/debian/patches/signed-byte	                        (rev 0)
+++ packages/python-pytc/trunk/debian/patches/signed-byte	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1,85 @@
+The optimize and tune methods of pytc.BDB and pytc.HDB can take negative
+values to their apow and fpow arguments. However, Python's bounds checking on
+the 'b' (byte) formatter prevents such values from actually being passed.
+
+This patch corrects the problem by implementing its own bounds checking on the
+affected arguments.
+
+Index: pytc-0.6/pytc.c
+===================================================================
+--- pytc-0.6.orig/pytc.c
++++ pytc-0.6/pytc.c
+@@ -16,6 +16,7 @@
+ #include <tcbdb.h>
+ #include <tchdb.h>
+ #include <tcutil.h>
++#include <limits.h>
+ 
+ /* FIXME: handle error */
+ /* FIXME: refactoring */
+@@ -27,6 +28,21 @@
+   iter_item
+ } itertype;
+ 
++static bool
++char_bounds(short x) {
++  if (x < SCHAR_MIN) {
++    PyErr_SetString(PyExc_OverflowError,
++    "signed byte integer is less than minimum");
++    return false;
++  } else if (x > SCHAR_MAX) {
++    PyErr_SetString(PyExc_OverflowError,
++    "signed byte integer is greater than maximum");
++    return false;
++  } else {
++    return true;
++  }
++}
++
+ /* Error Objects */
+ 
+ static PyObject *PyTCError;
+@@ -510,15 +526,18 @@
+   static PyObject * \
+   a(PyTCHDB *self, PyObject *args, PyObject *keywds) { \
+     bool result; \
+-    char apow, fpow; \
++    short apow, fpow; \
+     PY_LONG_LONG bnum; \
+     unsigned char opts; \
+     static char *kwlist[] = {"bnum", "apow", "fpow", "opts", NULL}; \
+   \
+-    if (!PyArg_ParseTupleAndKeywords(args, keywds, "LbbB:" #b, kwlist, \
++    if (!PyArg_ParseTupleAndKeywords(args, keywds, "LhhB:" #b, kwlist, \
+                                      &bnum, &apow, &fpow, &opts)) { \
+       return NULL; \
+     } \
++    if (!(char_bounds(apow) && char_bounds(fpow))) { \
++      return NULL; \
++    } \
+     Py_BEGIN_ALLOW_THREADS \
+     result = c(self->hdb, bnum, apow, fpow, opts); \
+     Py_END_ALLOW_THREADS \
+@@ -1238,17 +1257,20 @@
+   static PyObject * \
+   a(PyTCBDB *self, PyObject *args, PyObject *keywds) { \
+     bool result; \
+-    char apow, fpow; \
++    short apow, fpow; \
+     int lmemb, nmemb; \
+     PY_LONG_LONG bnum; \
+     unsigned char opts; \
+     static char *kwlist[] = {"lmemb", "nmemb", "bnum", "apow", "fpow", "opts", NULL}; \
+   \
+-    if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiLbbB:" #b, kwlist, \
++    if (!PyArg_ParseTupleAndKeywords(args, keywds, "iiLhhB:" #b, kwlist, \
+                                      &lmemb, &nmemb, &bnum, \
+                                      &apow, &fpow, &opts)) { \
+       return NULL; \
+     } \
++    if (!(char_bounds(apow) && char_bounds(fpow))) { \
++      return NULL; \
++    } \
+     Py_BEGIN_ALLOW_THREADS \
+     result = c(self->bdb, lmemb, nmemb, bnum, apow, fpow, opts); \
+     Py_END_ALLOW_THREADS \

Added: packages/python-pytc/trunk/debian/patches/unnecessary-dependencies
===================================================================
--- packages/python-pytc/trunk/debian/patches/unnecessary-dependencies	                        (rev 0)
+++ packages/python-pytc/trunk/debian/patches/unnecessary-dependencies	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1,15 @@
+Remove unnecessary dependencies.
+
+Index: pytc-0.6/setup.py
+===================================================================
+--- pytc-0.6.orig/setup.py
++++ pytc-0.6/setup.py
+@@ -17,7 +17,7 @@
+   library_dirs.append('/sw/lib')
+ 
+ ext = Extension('pytc',
+-                libraries = ['tokyocabinet', 'z', 'pthread', 'm', 'c'],
++                libraries = ['tokyocabinet'],
+                 sources = ['pytc.c'],
+                 include_dirs = include_dirs,
+                 library_dirs = library_dirs,

Added: packages/python-pytc/trunk/debian/pycompat
===================================================================
--- packages/python-pytc/trunk/debian/pycompat	                        (rev 0)
+++ packages/python-pytc/trunk/debian/pycompat	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1 @@
+2

Added: packages/python-pytc/trunk/debian/rules
===================================================================
--- packages/python-pytc/trunk/debian/rules	                        (rev 0)
+++ packages/python-pytc/trunk/debian/rules	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1,7 @@
+#!/usr/bin/make -f
+
+DEB_PYTHON_SYSTEM=pycentral
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+include /usr/share/cdbs/1/class/python-distutils.mk


Property changes on: packages/python-pytc/trunk/debian/rules
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/python-pytc/trunk/debian/watch
===================================================================
--- packages/python-pytc/trunk/debian/watch	                        (rev 0)
+++ packages/python-pytc/trunk/debian/watch	2008-12-18 06:24:45 UTC (rev 7116)
@@ -0,0 +1,3 @@
+version=3
+
+http://pypi.python.org/packages/source/p/pytc/pytc-(.*)\.tar\.gz




More information about the Python-modules-commits mailing list