[Python-modules-commits] r7548 - in packages/pyusb/trunk/debian (7 files)

bzed at users.alioth.debian.org bzed at users.alioth.debian.org
Sun Feb 15 20:52:07 UTC 2009


    Date: Sunday, February 15, 2009 @ 20:52:06
  Author: bzed
Revision: 7548

* debian/control:
  - adding dpatch to Build-Depends
  - Removing Petter Reinholdtsen from Uploaders
* debian/rules:
  - adding dpatch include for cdbs.
* debian/patches:
  - adding patch from Thomas Viehmann - thanks for that:
    * Don't pass int* where we need Py_ssize_t*.
      Breaks (overwriting parameters) for python 2.5 on 64 bit arch.
      Needs the usual PEP353 compatibility bruhaha plus printf.
    (Closes: #515207)

Added:
  packages/pyusb/trunk/debian/patches/
  packages/pyusb/trunk/debian/patches/00dpatch.conf
  packages/pyusb/trunk/debian/patches/00list
  packages/pyusb/trunk/debian/patches/PEP353_compat_fix.dpatch
Modified:
  packages/pyusb/trunk/debian/changelog
  packages/pyusb/trunk/debian/control
  packages/pyusb/trunk/debian/rules

Modified: packages/pyusb/trunk/debian/changelog
===================================================================
--- packages/pyusb/trunk/debian/changelog	2009-02-15 20:44:42 UTC (rev 7547)
+++ packages/pyusb/trunk/debian/changelog	2009-02-15 20:52:06 UTC (rev 7548)
@@ -1,4 +1,4 @@
-pyusb (0.4.1-5) UNRELEASED; urgency=low
+pyusb (0.4.1-5) UNRELEASED; urgency=medium
 
   [ Piotr Ożarowski ]
   * Remove myself from uploaders.
@@ -7,8 +7,21 @@
   * debian/control
     - switch Vcs-Browser field to viewsvn
 
- -- Piotr Ożarowski <piotr at debian.org>  Tue, 22 Jul 2008 23:59:13 +0200
+  [ Bernd Zeimetz ]
+  * debian/control:
+    - adding dpatch to Build-Depends
+    - Removing Petter Reinholdtsen from Uploaders
+  * debian/rules:
+    - adding dpatch include for cdbs.
+  * debian/patches:
+    - adding patch from Thomas Viehmann - thanks for that:
+      * Don't pass int* where we need Py_ssize_t*.
+        Breaks (overwriting parameters) for python 2.5 on 64 bit arch.
+        Needs the usual PEP353 compatibility bruhaha plus printf.
+      (Closes: #515207)
 
+ -- Bernd Zeimetz <bzed at debian.org>  Sun, 15 Feb 2009 21:29:38 +0100
+
 pyusb (0.4.1-4) unstable; urgency=low
 
   [ Piotr Ożarowski ]

Modified: packages/pyusb/trunk/debian/control
===================================================================
--- packages/pyusb/trunk/debian/control	2009-02-15 20:44:42 UTC (rev 7547)
+++ packages/pyusb/trunk/debian/control	2009-02-15 20:52:06 UTC (rev 7548)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Petter Reinholdtsen <pere at debian.org>, Bernd Zeimetz <bzed at debian.org>
-Build-Depends: debhelper (>= 5), cdbs  (>=0.4.41), libusb-dev, python-all-dev, python-support (>= 0.3)
+Build-Depends: debhelper (>= 5), cdbs  (>=0.4.41), libusb-dev, python-all-dev, python-support (>= 0.3), daptch
 Standards-Version: 3.8.0
 Homepage: http://pyusb.berlios.de/
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/pyusb/trunk/

Added: packages/pyusb/trunk/debian/patches/00dpatch.conf
===================================================================
--- packages/pyusb/trunk/debian/patches/00dpatch.conf	                        (rev 0)
+++ packages/pyusb/trunk/debian/patches/00dpatch.conf	2009-02-15 20:52:06 UTC (rev 7548)
@@ -0,0 +1,2 @@
+conf_debianonly=1
+conf_origtargzpath=../tarballs

Added: packages/pyusb/trunk/debian/patches/00list
===================================================================
--- packages/pyusb/trunk/debian/patches/00list	                        (rev 0)
+++ packages/pyusb/trunk/debian/patches/00list	2009-02-15 20:52:06 UTC (rev 7548)
@@ -0,0 +1 @@
+PEP353_compat_fix.dpatch

Added: packages/pyusb/trunk/debian/patches/PEP353_compat_fix.dpatch
===================================================================
--- packages/pyusb/trunk/debian/patches/PEP353_compat_fix.dpatch	                        (rev 0)
+++ packages/pyusb/trunk/debian/patches/PEP353_compat_fix.dpatch	2009-02-15 20:52:06 UTC (rev 7548)
@@ -0,0 +1,71 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## PEP353_compat_fix.dpatch by Thomas Viehmann
+##
+## DP: * Don't pass int* where we need Py_ssize_t*.
+## DP:   Breaks (overwriting parameters) for python 2.5 on 64 bit arch.
+## DP:   Needs the usual PEP353 compatibility bruhaha plus printf.
+
+ at DPATCH@
+diff -urNad pyusb~/pyusb.c pyusb/pyusb.c
+--- pyusb~/pyusb.c	2007-09-28 23:46:58.000000000 +0200
++++ pyusb/pyusb.c	2009-02-15 21:33:15.000000000 +0100
+@@ -13,6 +13,14 @@
+ #include <stdio.h>
+ #define DEFAULT_TIMEOUT 100
+ 
++/* see PEP353 */
++#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
++typedef int Py_ssize_t;
++# define PY_SSIZE_T_MAX INT_MAX
++# define PY_SSIZE_T_MIN INT_MIN
++# define PY_FORMAT_SIZE_T ""
++#endif
++
+ /*
+  * Necessary to compile successfully in python 2.3
+  * Thanks to Mark Rages for the patch
+@@ -126,7 +134,7 @@
+  */
+ PYUSB_STATIC char *getBuffer(
+ 	PyObject *obj,
+-	int *size
++	Py_ssize_t *size
+ 	)
+ {
+ 	char *p = NULL;
+@@ -1104,7 +1112,7 @@
+ 	int index = 0;
+ 	char *bytes;
+ 	PyObject *data;
+-	int size;
++	Py_ssize_t size;
+ 	int timeout = DEFAULT_TIMEOUT;
+ 	int ret;
+ 	int as_read = 0;
+@@ -1162,7 +1170,7 @@
+ 		   timeout);
+ 
+ 	if (as_read) {
+-		fprintf(stderr, "\tbuffer: %d\n", size);
++		fprintf(stderr, "\tbuffer: %" PY_FORMAT_SIZE_T "d\n", size);
+ 	} else {
+ 		fprintf(stderr, "controlMsg buffer param:\n");
+ 		printBuffer(bytes, size);
+@@ -1386,7 +1394,7 @@
+ 	int endpoint;
+ 	int timeout = DEFAULT_TIMEOUT;
+ 	char *data;
+-	int size;
++	Py_ssize_t size;
+ 	PyObject *bytes;
+ 	int ret;
+ 	PyObject *retObj;
+@@ -1493,7 +1501,7 @@
+ 	int endpoint;
+ 	int timeout = DEFAULT_TIMEOUT;
+ 	char *data;
+-	int size;
++	Py_ssize_t size;
+ 	PyObject *bytes;
+ 	int ret;
+ 	PyObject *retObj;


Property changes on: packages/pyusb/trunk/debian/patches/PEP353_compat_fix.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: packages/pyusb/trunk/debian/rules
===================================================================
--- packages/pyusb/trunk/debian/rules	2009-02-15 20:44:42 UTC (rev 7547)
+++ packages/pyusb/trunk/debian/rules	2009-02-15 20:52:06 UTC (rev 7548)
@@ -2,6 +2,7 @@
 
 DEB_PYTHON_SYSTEM = pysupport
 
+include /usr/share/cdbs/1/rules/dpatch.mk
 include /usr/share/cdbs/1/rules/debhelper.mk
 include /usr/share/cdbs/1/class/python-distutils.mk
 




More information about the Python-modules-commits mailing list