[Python-modules-commits] r18192 - in packages/pyvorbis/trunk/debian (10 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Wed Aug 17 15:24:10 UTC 2011


    Date: Wednesday, August 17, 2011 @ 15:24:09
  Author: morph
Revision: 18192

Converted to 3.0 (quilt) format (patches included)

Added:
  packages/pyvorbis/trunk/debian/patches/01_previous_changes.patch
  packages/pyvorbis/trunk/debian/patches/02_whrandom_gone.patch
  packages/pyvorbis/trunk/debian/patches/series
Modified:
  packages/pyvorbis/trunk/debian/changelog
  packages/pyvorbis/trunk/debian/control
  packages/pyvorbis/trunk/debian/rules
  packages/pyvorbis/trunk/debian/source/format
Deleted:
  packages/pyvorbis/trunk/debian/patches/00list
  packages/pyvorbis/trunk/debian/patches/01_previous_changes.dpatch
  packages/pyvorbis/trunk/debian/patches/02_whrandom_gone.dpatch

Modified: packages/pyvorbis/trunk/debian/changelog
===================================================================
--- packages/pyvorbis/trunk/debian/changelog	2011-08-17 15:07:27 UTC (rev 18191)
+++ packages/pyvorbis/trunk/debian/changelog	2011-08-17 15:24:09 UTC (rev 18192)
@@ -13,8 +13,9 @@
     - bump Standards-Version to 3.9.2 (no changes needed)
   * debian/rules
     - put strip info in the right place
+  * Converted to 3.0 (quilt) format (patches included)
 
- -- Sandro Tosi <morph at debian.org>  Wed, 17 Aug 2011 17:06:58 +0200
+ -- Sandro Tosi <morph at debian.org>  Wed, 17 Aug 2011 17:23:55 +0200
 
 pyvorbis (1.4-2) unstable; urgency=medium
 

Modified: packages/pyvorbis/trunk/debian/control
===================================================================
--- packages/pyvorbis/trunk/debian/control	2011-08-17 15:07:27 UTC (rev 18191)
+++ packages/pyvorbis/trunk/debian/control	2011-08-17 15:24:09 UTC (rev 18192)
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Sandro Tosi <morph at debian.org>
-Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.3.5-11), dpatch, 
+Build-Depends: debhelper (>= 5.0.37.2), python-all-dev (>= 2.3.5-11),
  python-all-dbg, python-support (>= 0.3), python-ogg-dbg (>= 1.3-1.1), 
  libvorbis-dev (>= 1.0.1)
 Standards-Version: 3.9.2

Deleted: packages/pyvorbis/trunk/debian/patches/00list
===================================================================
--- packages/pyvorbis/trunk/debian/patches/00list	2011-08-17 15:07:27 UTC (rev 18191)
+++ packages/pyvorbis/trunk/debian/patches/00list	2011-08-17 15:24:09 UTC (rev 18192)
@@ -1,2 +0,0 @@
-01_previous_changes
-02_whrandom_gone

Deleted: packages/pyvorbis/trunk/debian/patches/01_previous_changes.dpatch
===================================================================
--- packages/pyvorbis/trunk/debian/patches/01_previous_changes.dpatch	2011-08-17 15:07:27 UTC (rev 18191)
+++ packages/pyvorbis/trunk/debian/patches/01_previous_changes.dpatch	2011-08-17 15:24:09 UTC (rev 18192)
@@ -1,316 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 01_previous_changes.dpatch by Sandro Tosi <matrixhasu at gmail.com>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: New patch generated from pyvorbis 1.3-3 diff.gz
-
- at DPATCH@
-
---- pyvorbis-1.3.orig/src/pyvorbiscodec.h
-+++ pyvorbis-1.3/src/pyvorbiscodec.h
-@@ -22,8 +22,8 @@
- extern PyTypeObject py_dsp_type;
- extern PyTypeObject py_block_type;
- 
--PyObject *py_dsp_from_dsp(vorbis_dsp_state *vd, PyObject *parent);
--PyObject *py_block_from_block(vorbis_block *vb, PyObject *parent);
-+PyObject *py_dsp_alloc(PyObject *parent);
-+void py_dsp_dealloc(PyObject *self);
- 
- #endif /* __VORBISCODEC_H__ */
- 
---- pyvorbis-1.3.orig/src/pyvorbiscodec.c
-+++ pyvorbis-1.3/src/pyvorbiscodec.c
-@@ -29,7 +29,6 @@
- FDEF(dsp_close) "Signal that all audio data has been written to the object.";
- FDEF(vorbis_bitrate_flushpacket) "";
- 
--static void py_dsp_dealloc(PyObject *);
- static PyObject *py_dsp_getattr(PyObject *, char*);
- 
- char py_dsp_doc[] = "";
-@@ -82,14 +81,11 @@
- };
- 
- PyObject *
--py_dsp_from_dsp(vorbis_dsp_state *vd, PyObject *parent)
-+py_dsp_alloc(PyObject *parent)
- {
--  py_dsp *ret = (py_dsp *) PyObject_NEW(py_dsp, &py_dsp_type);
--
-+  py_dsp *ret = (py_dsp *) PyObject_New(py_dsp, &py_dsp_type);
-   if (ret == NULL) 
-     return NULL;
--  
--  ret->vd = *vd;
-   ret->parent = parent;
-   Py_XINCREF(parent);
-   return (PyObject *) ret;
-@@ -100,25 +96,23 @@
- {
-   py_vinfo* py_vi;
-   py_dsp *ret;
--  vorbis_info *vi;
--  vorbis_dsp_state vd;
-   
-   if (!PyArg_ParseTuple(args, "O!", &py_vinfo_type, &py_vi))
-     return NULL;
-   
--  ret = (py_dsp *) PyObject_NEW(py_dsp, &py_dsp_type);
--  ret->parent = NULL;
--  vi = &py_vi->vi;
--  vorbis_synthesis_init(&vd, vi);
--  return py_dsp_from_dsp(&vd, (PyObject *) py_vi);
-+  ret = (py_dsp *) py_dsp_alloc((PyObject*) py_vi);
-+  if (ret == NULL)
-+    return NULL;
-+  vorbis_synthesis_init(&ret->vd, &py_vi->vi);
-+  return (PyObject *) ret;
- }
- 
--static void
-+void
- py_dsp_dealloc(PyObject *self)
- {
-   vorbis_dsp_clear(PY_DSP(self));
-   Py_XDECREF(((py_dsp *)self)->parent);
--  PyMem_DEL(self);
-+  PyObject_Del(self);
- }
- 
- static PyObject*
-@@ -127,21 +121,26 @@
-   return Py_FindMethod(DSP_methods, self, name);
- }
- 
-+static void py_block_dealloc(PyObject *);
-+PyObject * py_block_alloc(PyObject *parent);
-+
- static PyObject *
- py_vorbis_analysis_blockout(PyObject *self, PyObject *args)
- {
--  vorbis_block vb;
--  int ret;
-   py_dsp *dsp_self = (py_dsp *) self;
-+  py_block* py_vb;
- 
-   if (!PyArg_ParseTuple(args, ""))
-     return NULL;
- 
--  vorbis_block_init(&dsp_self->vd, &vb);
--  ret = vorbis_analysis_blockout(&dsp_self->vd, &vb);
--  if (ret == 1)
--    return py_block_from_block(&vb, self);
-+  py_vb = (py_block*) py_block_alloc(self);
-+  if (py_vb == NULL)
-+    return NULL;
-+
-+  if (vorbis_analysis_blockout(&dsp_self->vd, &py_vb->vb) == 1)
-+    return (PyObject*) py_vb;
-   else {
-+    py_block_dealloc((PyObject*) py_vb);
-     Py_INCREF(Py_None);
-     return Py_None;
-   }
-@@ -207,16 +206,16 @@
- static PyObject *
- py_vorbis_block_init(PyObject *self, PyObject *args)
- {
--  vorbis_block vb;
--  py_dsp *dsp_self = (py_dsp *) self;
--  PyObject *ret;
-+  py_block *py_vb;
- 
-   if (!PyArg_ParseTuple(args, ""))
-     return NULL;
- 
--  vorbis_block_init(&dsp_self->vd,&vb);
--  ret = py_block_from_block(&vb, self);
--  return ret;
-+  py_vb = (py_block*) py_block_alloc(self);
-+  if (py_vb == NULL)
-+    return NULL;
-+
-+  return (PyObject*) py_vb;
- }
- 
- /* Returns "len" if all arguments are strings of the same length, 
-@@ -397,7 +396,6 @@
- /*********************************************************
- 			VorbisBlock
- *********************************************************/
--static void py_block_dealloc(PyObject *);
- static PyObject *py_block_getattr(PyObject *, char*);
- 
- FDEF(vorbis_analysis) "Output an OggPage.";
-@@ -442,12 +440,25 @@
-   {NULL, NULL}
- };
- 
-+PyObject *
-+py_block_alloc(PyObject *parent)
-+{
-+  py_block *ret = (py_block *) PyObject_New(py_block, 
-+					    &py_block_type);
-+  if (ret == NULL)
-+    return NULL;
-+  vorbis_block_init(PY_DSP(parent), PY_BLOCK(ret));
-+  ret->parent = parent;
-+  Py_XINCREF(parent);
-+  return (PyObject *)ret;
-+}
-+
- static void
- py_block_dealloc(PyObject *self)
- {
-   vorbis_block_clear(PY_BLOCK(self));
-   Py_XDECREF(((py_block *)self)->parent);
--  PyMem_DEL(self);
-+  PyObject_Del(self);
- }
- 
- static PyObject*
-@@ -489,19 +500,3 @@
-   return Py_None;
- }
- 
--PyObject *
--py_block_from_block(vorbis_block *vb, PyObject *parent)
--{
--  py_block *ret = (py_block *) PyObject_NEW(py_block, 
--					    &py_block_type);
--  if (ret == NULL)
--    return NULL;
--  
--  ret->vb = *vb;
--  ret->parent = parent;
--  Py_XINCREF(parent);
--  return (PyObject *)ret;
--}
--
--
--
---- pyvorbis-1.3.orig/src/pyvorbisinfo.c
-+++ pyvorbis-1.3/src/pyvorbisinfo.c
-@@ -70,7 +70,7 @@
- py_info_new_from_vi(vorbis_info *vi)
- {
-   py_vinfo *newobj;
--  newobj = (py_vinfo *) PyObject_NEW(py_vinfo, 
-+  newobj = (py_vinfo *) PyObject_New(py_vinfo, 
-                                      &py_vinfo_type);
-   newobj->vi = *vi;
-   return (PyObject *) newobj;
-@@ -132,7 +132,7 @@
- static void
- py_ov_info_dealloc(PyObject *self)
- {
--  PyMem_DEL(self);
-+  PyObject_Del(self);
- }
- 
- #define CMP_RET(x) \
-@@ -188,19 +188,24 @@
- 
- static PyObject *
- py_vorbis_analysis_init(PyObject *self, PyObject *args)
-+// TV-FIXED
- {
-   int res;
--
--  py_vinfo *ovi_self = (py_vinfo *) self;
--  vorbis_dsp_state vd;
-+  py_dsp *ret;
-+  py_vinfo *py_vi = (py_vinfo *) self;
- 
-   if (!PyArg_ParseTuple(args, ""))
-     return NULL;
- 
--  if ((res = vorbis_analysis_init(&vd, &ovi_self->vi)))
--    return v_error_from_code(res, "vorbis_analysis_init");
-+  ret = (py_dsp *) py_dsp_alloc((PyObject*) py_vi);
-+  if (ret == NULL)
-+    return NULL;
- 
--  return py_dsp_from_dsp(&vd, self);
-+  if ((res = vorbis_analysis_init(&ret->vd, &py_vi->vi))) {
-+    py_dsp_dealloc((PyObject *) py_vi);
-+    return v_error_from_code(res, "vorbis_analysis_init");
-+  }
-+  return (PyObject*) ret;
- }
- 
- /*  
-@@ -323,7 +328,7 @@
- {
-   py_vcomment *newobj;
- 
--  newobj = (py_vcomment *) PyObject_NEW(py_vcomment, 
-+  newobj = (py_vcomment *) PyObject_New(py_vcomment, 
-                                         &py_vcomment_type);
-   newobj->vc = vc;
-   newobj->parent = parent;
-@@ -336,7 +341,7 @@
- py_comment_new_empty(void)
- {
-   py_vcomment *newobj;
--  newobj = (py_vcomment *) PyObject_NEW(py_vcomment, 
-+  newobj = (py_vcomment *) PyObject_New(py_vcomment, 
-                                         &py_vcomment_type);
-   if (!newobj)
-     return NULL;
-@@ -381,7 +386,7 @@
-     free(ovc_self->vc);
-   }
- 
--  PyMem_DEL(self);
-+  PyObject_Del(self);
- }
- 
- static PyObject*
-@@ -848,7 +853,7 @@
-   vcomment = create_comment_from_dict(dict);
-   if (!vcomment)
-     return NULL;
--  pvc = (py_vcomment *) PyObject_NEW(py_vcomment,
-+  pvc = (py_vcomment *) PyObject_New(py_vcomment,
-                                      &py_vcomment_type);
-   if (!pvc) {
-     vorbis_comment_clear(vcomment);
-@@ -905,6 +910,7 @@
- #if PY_UNICODE
-       item = PyUnicode_DecodeUTF8(val, vallen, NULL);
-       if (!item) {
-+        PyErr_Clear();
-         /* To deal with non-UTF8 comments (against the standard) */
-         item = PyString_FromStringAndSize(val, vallen); 
-       } 
---- pyvorbis-1.3.orig/test/ogg123.py
-+++ pyvorbis-1.3/test/ogg123.py
-@@ -165,9 +165,10 @@
-             sys.exit(0)
- 
-         elif arg == '-d' or arg == '--device':
-+            import ao
-             try:
--                driver_id = ao_get_driver_id(val)
--            except aoError:
-+                driver_id = ao.driver_id(val)
-+            except ao.aoError:
-                 sys.stderr.write('No such device %s\n' % val)
-                 sys.exit(1)
-                 
-@@ -199,7 +200,12 @@
-         usage()
-         sys.exit(0)
- 
--    myplayer = choices[modchoice]() # Either AOPlayer or LADPlayer
-+    if modchoice == 'ao' and driver_id:
-+        playerargs = (driver_id,)
-+    else:
-+        playerargs = ()
-+
-+    myplayer = apply(choices[modchoice],playerargs) # Either AOPlayer or LADPlayer
-     if verbose:
-         print "Module choice: %s" % modchoice
- 

Added: packages/pyvorbis/trunk/debian/patches/01_previous_changes.patch
===================================================================
--- packages/pyvorbis/trunk/debian/patches/01_previous_changes.patch	                        (rev 0)
+++ packages/pyvorbis/trunk/debian/patches/01_previous_changes.patch	2011-08-17 15:24:09 UTC (rev 18192)
@@ -0,0 +1,310 @@
+Author: Sandro Tosi <matrixhasu at gmail.com>
+Description: New patch generated from pyvorbis 1.3-3 diff.gz
+--- pyvorbis-1.5.orig/src/pyvorbiscodec.h
++++ pyvorbis-1.5/src/pyvorbiscodec.h
+@@ -22,8 +22,8 @@
+ extern PyTypeObject py_dsp_type;
+ extern PyTypeObject py_block_type;
+ 
+-PyObject *py_dsp_from_dsp(vorbis_dsp_state *vd, PyObject *parent);
+-PyObject *py_block_from_block(vorbis_block *vb, PyObject *parent);
++PyObject *py_dsp_alloc(PyObject *parent);
++void py_dsp_dealloc(PyObject *self);
+ 
+ #endif /* __VORBISCODEC_H__ */
+ 
+--- pyvorbis-1.5.orig/src/pyvorbiscodec.c
++++ pyvorbis-1.5/src/pyvorbiscodec.c
+@@ -29,7 +29,6 @@
+ FDEF(dsp_close) "Signal that all audio data has been written to the object.";
+ FDEF(vorbis_bitrate_flushpacket) "";
+ 
+-static void py_dsp_dealloc(PyObject *);
+ static PyObject *py_dsp_getattr(PyObject *, char*);
+ 
+ char py_dsp_doc[] = "";
+@@ -82,14 +81,11 @@
+ };
+ 
+ PyObject *
+-py_dsp_from_dsp(vorbis_dsp_state *vd, PyObject *parent)
++py_dsp_alloc(PyObject *parent)
+ {
+-  py_dsp *ret = (py_dsp *) PyObject_NEW(py_dsp, &py_dsp_type);
+-
++  py_dsp *ret = (py_dsp *) PyObject_New(py_dsp, &py_dsp_type);
+   if (ret == NULL) 
+     return NULL;
+-  
+-  ret->vd = *vd;
+   ret->parent = parent;
+   Py_XINCREF(parent);
+   return (PyObject *) ret;
+@@ -100,25 +96,23 @@
+ {
+   py_vinfo* py_vi;
+   py_dsp *ret;
+-  vorbis_info *vi;
+-  vorbis_dsp_state vd;
+   
+   if (!PyArg_ParseTuple(args, "O!", &py_vinfo_type, &py_vi))
+     return NULL;
+   
+-  ret = (py_dsp *) PyObject_NEW(py_dsp, &py_dsp_type);
+-  ret->parent = NULL;
+-  vi = &py_vi->vi;
+-  vorbis_synthesis_init(&vd, vi);
+-  return py_dsp_from_dsp(&vd, (PyObject *) py_vi);
++  ret = (py_dsp *) py_dsp_alloc((PyObject*) py_vi);
++  if (ret == NULL)
++    return NULL;
++  vorbis_synthesis_init(&ret->vd, &py_vi->vi);
++  return (PyObject *) ret;
+ }
+ 
+-static void
++void
+ py_dsp_dealloc(PyObject *self)
+ {
+   vorbis_dsp_clear(PY_DSP(self));
+   Py_XDECREF(((py_dsp *)self)->parent);
+-  PyMem_DEL(self);
++  PyObject_Del(self);
+ }
+ 
+ static PyObject*
+@@ -127,21 +121,26 @@
+   return Py_FindMethod(DSP_methods, self, name);
+ }
+ 
++static void py_block_dealloc(PyObject *);
++PyObject * py_block_alloc(PyObject *parent);
++
+ static PyObject *
+ py_vorbis_analysis_blockout(PyObject *self, PyObject *args)
+ {
+-  vorbis_block vb;
+-  int ret;
+   py_dsp *dsp_self = (py_dsp *) self;
++  py_block* py_vb;
+ 
+   if (!PyArg_ParseTuple(args, ""))
+     return NULL;
+ 
+-  vorbis_block_init(&dsp_self->vd, &vb);
+-  ret = vorbis_analysis_blockout(&dsp_self->vd, &vb);
+-  if (ret == 1)
+-    return py_block_from_block(&vb, self);
++  py_vb = (py_block*) py_block_alloc(self);
++  if (py_vb == NULL)
++    return NULL;
++
++  if (vorbis_analysis_blockout(&dsp_self->vd, &py_vb->vb) == 1)
++    return (PyObject*) py_vb;
+   else {
++    py_block_dealloc((PyObject*) py_vb);
+     Py_INCREF(Py_None);
+     return Py_None;
+   }
+@@ -207,16 +206,16 @@
+ static PyObject *
+ py_vorbis_block_init(PyObject *self, PyObject *args)
+ {
+-  vorbis_block vb;
+-  py_dsp *dsp_self = (py_dsp *) self;
+-  PyObject *ret;
++  py_block *py_vb;
+ 
+   if (!PyArg_ParseTuple(args, ""))
+     return NULL;
+ 
+-  vorbis_block_init(&dsp_self->vd,&vb);
+-  ret = py_block_from_block(&vb, self);
+-  return ret;
++  py_vb = (py_block*) py_block_alloc(self);
++  if (py_vb == NULL)
++    return NULL;
++
++  return (PyObject*) py_vb;
+ }
+ 
+ /* Returns "len" if all arguments are strings of the same length, 
+@@ -397,7 +396,6 @@
+ /*********************************************************
+ 			VorbisBlock
+ *********************************************************/
+-static void py_block_dealloc(PyObject *);
+ static PyObject *py_block_getattr(PyObject *, char*);
+ 
+ FDEF(vorbis_analysis) "Output an OggPage.";
+@@ -442,12 +440,25 @@
+   {NULL, NULL}
+ };
+ 
++PyObject *
++py_block_alloc(PyObject *parent)
++{
++  py_block *ret = (py_block *) PyObject_New(py_block,
++					    &py_block_type);
++  if (ret == NULL)
++    return NULL;
++  vorbis_block_init(PY_DSP(parent), PY_BLOCK(ret));
++  ret->parent = parent;
++  Py_XINCREF(parent);
++  return (PyObject *)ret;
++}
++
+ static void
+ py_block_dealloc(PyObject *self)
+ {
+   vorbis_block_clear(PY_BLOCK(self));
+   Py_XDECREF(((py_block *)self)->parent);
+-  PyMem_DEL(self);
++  PyObject_Del(self);
+ }
+ 
+ static PyObject*
+@@ -489,19 +500,3 @@
+   return Py_None;
+ }
+ 
+-PyObject *
+-py_block_from_block(vorbis_block *vb, PyObject *parent)
+-{
+-  py_block *ret = (py_block *) PyObject_NEW(py_block, 
+-					    &py_block_type);
+-  if (ret == NULL)
+-    return NULL;
+-  
+-  ret->vb = *vb;
+-  ret->parent = parent;
+-  Py_XINCREF(parent);
+-  return (PyObject *)ret;
+-}
+-
+-
+-
+--- pyvorbis-1.5.orig/src/pyvorbisinfo.c
++++ pyvorbis-1.5/src/pyvorbisinfo.c
+@@ -72,7 +72,7 @@
+ py_info_new_from_vi(vorbis_info *vi)
+ {
+   py_vinfo *newobj;
+-  newobj = (py_vinfo *) PyObject_NEW(py_vinfo, 
++  newobj = (py_vinfo *) PyObject_New(py_vinfo,
+                                      &py_vinfo_type);
+   newobj->vi = *vi;
+   return (PyObject *) newobj;
+@@ -134,7 +134,7 @@
+ static void
+ py_ov_info_dealloc(PyObject *self)
+ {
+-  PyMem_DEL(self);
++  PyObject_Del(self);
+ }
+ 
+ #define CMP_RET(x) \
+@@ -223,19 +223,24 @@
+ 
+ static PyObject *
+ py_vorbis_analysis_init(PyObject *self, PyObject *args)
++// TV-FIXED
+ {
+   int res;
+-
+-  py_vinfo *ovi_self = (py_vinfo *) self;
+-  vorbis_dsp_state vd;
++  py_dsp *ret;
++  py_vinfo *py_vi = (py_vinfo *) self;
+ 
+   if (!PyArg_ParseTuple(args, ""))
+     return NULL;
+ 
+-  if ((res = vorbis_analysis_init(&vd, &ovi_self->vi)))
+-    return v_error_from_code(res, "vorbis_analysis_init");
++  ret = (py_dsp *) py_dsp_alloc((PyObject*) py_vi);
++  if (ret == NULL)
++    return NULL;
+ 
+-  return py_dsp_from_dsp(&vd, self);
++  if ((res = vorbis_analysis_init(&ret->vd, &py_vi->vi))) {
++    py_dsp_dealloc((PyObject *) py_vi);
++    return v_error_from_code(res, "vorbis_analysis_init");
++  }
++  return (PyObject*) ret;
+ }
+ 
+ /*  
+@@ -360,7 +365,7 @@
+ {
+   py_vcomment *newobj;
+ 
+-  newobj = (py_vcomment *) PyObject_NEW(py_vcomment, 
++  newobj = (py_vcomment *) PyObject_New(py_vcomment,
+                                         &py_vcomment_type);
+   newobj->vc = vc;
+   newobj->parent = parent;
+@@ -373,7 +378,7 @@
+ py_comment_new_empty(void)
+ {
+   py_vcomment *newobj;
+-  newobj = (py_vcomment *) PyObject_NEW(py_vcomment, 
++  newobj = (py_vcomment *) PyObject_New(py_vcomment,
+                                         &py_vcomment_type);
+   if (!newobj)
+     return NULL;
+@@ -418,7 +423,7 @@
+     free(ovc_self->vc);
+   }
+ 
+-  PyMem_DEL(self);
++  PyObject_Del(self);
+ }
+ 
+ 
+@@ -942,7 +947,7 @@
+   vcomment = create_comment_from_dict(dict);
+   if (!vcomment)
+     return NULL;
+-  pvc = (py_vcomment *) PyObject_NEW(py_vcomment,
++  pvc = (py_vcomment *) PyObject_New(py_vcomment,
+                                      &py_vcomment_type);
+   if (!pvc) {
+     vorbis_comment_clear(vcomment);
+@@ -999,6 +1004,7 @@
+ #if PY_UNICODE
+       item = PyUnicode_DecodeUTF8(val, vallen, NULL);
+       if (!item) {
++        PyErr_Clear();
+         /* To deal with non-UTF8 comments (against the standard) */
+         item = PyString_FromStringAndSize(val, vallen); 
+       } 
+--- pyvorbis-1.5.orig/test/ogg123.py
++++ pyvorbis-1.5/test/ogg123.py
+@@ -165,9 +165,10 @@
+             sys.exit(0)
+ 
+         elif arg == '-d' or arg == '--device':
++            import ao
+             try:
+-                driver_id = ao_get_driver_id(val)
+-            except aoError:
++                driver_id = ao.driver_id(val)
++            except ao.aoError:
+                 sys.stderr.write('No such device %s\n' % val)
+                 sys.exit(1)
+                 
+@@ -199,7 +200,12 @@
+         usage()
+         sys.exit(0)
+ 
+-    myplayer = choices[modchoice]() # Either AOPlayer or LADPlayer
++    if modchoice == 'ao' and driver_id:
++        playerargs = (driver_id,)
++    else:
++        playerargs = ()
++
++    myplayer = apply(choices[modchoice],playerargs) # Either AOPlayer or LADPlayer
+     if verbose:
+         print "Module choice: %s" % modchoice
+ 

Deleted: packages/pyvorbis/trunk/debian/patches/02_whrandom_gone.dpatch
===================================================================
--- packages/pyvorbis/trunk/debian/patches/02_whrandom_gone.dpatch	2011-08-17 15:07:27 UTC (rev 18191)
+++ packages/pyvorbis/trunk/debian/patches/02_whrandom_gone.dpatch	2011-08-17 15:24:09 UTC (rev 18192)
@@ -1,29 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 02_whrandom_gone.dpatch by  <stew at debian.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: whrandom in python2.4 is deprecated, and in python2.5 is gone
-## DP: this patch uses the 'random' module which is a drop-in replacement
-
- at DPATCH@
-diff -urNad pyvorbis-1.3~/test/ogg123.py pyvorbis-1.3/test/ogg123.py
---- pyvorbis-1.3~/test/ogg123.py	2008-09-06 12:57:12.000000000 -0400
-+++ pyvorbis-1.3/test/ogg123.py	2008-09-06 12:57:51.000000000 -0400
-@@ -17,7 +17,7 @@
- import string
- import re
- import os
--import whrandom
-+import random
- import time
- 
- import ogg.vorbis
-@@ -189,7 +189,7 @@
-             verbose = 0
- 
-         elif arg == '-z' or arg == '--shuffle':
--            ri = whrandom.randrange
-+            ri = random.randrange
-             for pos in range(len(args)):
-                 newpos = ri(pos, len(args))
-                 tmp = args[pos]

Added: packages/pyvorbis/trunk/debian/patches/02_whrandom_gone.patch
===================================================================
--- packages/pyvorbis/trunk/debian/patches/02_whrandom_gone.patch	                        (rev 0)
+++ packages/pyvorbis/trunk/debian/patches/02_whrandom_gone.patch	2011-08-17 15:24:09 UTC (rev 18192)
@@ -0,0 +1,23 @@
+Author: <stew at debian.org>
+Description: whrandom in python2.4 is deprecated, and in python2.5 is gone
+this patch uses the 'random' module which is a drop-in replacement
+--- pyvorbis-1.5.orig/test/ogg123.py
++++ pyvorbis-1.5/test/ogg123.py
+@@ -17,7 +17,7 @@
+ import string
+ import re
+ import os
+-import whrandom
++import random
+ import time
+ 
+ import ogg.vorbis
+@@ -189,7 +189,7 @@
+             verbose = 0
+ 
+         elif arg == '-z' or arg == '--shuffle':
+-            ri = whrandom.randrange
++            ri = random.randrange
+             for pos in range(len(args)):
+                 newpos = ri(pos, len(args))
+                 tmp = args[pos]

Added: packages/pyvorbis/trunk/debian/patches/series
===================================================================
--- packages/pyvorbis/trunk/debian/patches/series	                        (rev 0)
+++ packages/pyvorbis/trunk/debian/patches/series	2011-08-17 15:24:09 UTC (rev 18192)
@@ -0,0 +1,2 @@
+01_previous_changes.patch
+02_whrandom_gone.patch

Modified: packages/pyvorbis/trunk/debian/rules
===================================================================
--- packages/pyvorbis/trunk/debian/rules	2011-08-17 15:07:27 UTC (rev 18191)
+++ packages/pyvorbis/trunk/debian/rules	2011-08-17 15:24:09 UTC (rev 18192)
@@ -5,11 +5,9 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-include /usr/share/dpatch/dpatch.make
-
 PYVERS:=$(shell pyversions -r)
 
-build: patch build-stamp build-debug-stamp
+build: build-stamp build-debug-stamp
 build-stamp:
 	dh_testdir
 
@@ -32,7 +30,7 @@
 
 	touch build-debug-stamp
 
-clean: unpatch
+clean:
 	dh_testdir
 	dh_testroot
 

Modified: packages/pyvorbis/trunk/debian/source/format
===================================================================
--- packages/pyvorbis/trunk/debian/source/format	2011-08-17 15:07:27 UTC (rev 18191)
+++ packages/pyvorbis/trunk/debian/source/format	2011-08-17 15:24:09 UTC (rev 18192)
@@ -1 +1 @@
-1.0
+3.0 (quilt)




More information about the Python-modules-commits mailing list