Hello community,

here is the log from the commit of package pocketsphinx for openSUSE:Factory 
checked in at 2020-03-26 23:38:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pocketsphinx (Old)
 and      /work/SRC/openSUSE:Factory/.pocketsphinx.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "pocketsphinx"

Thu Mar 26 23:38:07 2020 rev:5 rq:788659 version:0.8

Changes:
--------
--- /work/SRC/openSUSE:Factory/pocketsphinx/pocketsphinx.changes        
2020-03-25 23:50:56.980010190 +0100
+++ /work/SRC/openSUSE:Factory/.pocketsphinx.new.3160/pocketsphinx.changes      
2020-03-26 23:38:08.630880542 +0100
@@ -1,0 +2,11 @@
+Thu Mar 26 10:22:01 UTC 2020 - Antonio Larrosa <alarr...@suse.com>
+
+- Use update-alternatives for the man pages
+- pocketsphinx-devel now conflicts with pocketsphinx5-devel
+- python3-pocketsphinx now conflicts with python3-pocketsphinx5 and
+  python3-pocketsphinx-python <= 0.1.3
+- Fixes for symbol-not-found errors in the python3 port and a small fix
+  to use python3 in another python call. Updated patch:
+  * use-python3.patch
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ pocketsphinx.spec ++++++
--- /var/tmp/diff_new_pack.M9h1iN/_old  2020-03-26 23:38:09.678880921 +0100
+++ /var/tmp/diff_new_pack.M9h1iN/_new  2020-03-26 23:38:09.678880921 +0100
@@ -40,6 +40,7 @@
 BuildRequires:  python3-Cython
 BuildRequires:  python3-devel
 BuildRequires:  python3-gobject
+BuildRequires:  python3-setuptools
 BuildRequires:  sphinxbase-devel
 Requires(post): update-alternatives
 Requires(postun): update-alternatives
@@ -62,6 +63,7 @@
 Summary:        Development files for pocketsphinx, a speech recognizer library
 Group:          Development/Libraries/C and C++
 Requires:       libpocketsphinx%{sover} = %{version}
+Conflicts:      pocketsphinx5-devel
 
 %description devel
 CMU Sphinx toolkit has a number of packages for different tasks and
@@ -75,6 +77,9 @@
 Summary:        Python3 bindings for pocketsphinx
 Group:          Development/Languages/Python
 Requires:       %{name} = %{version}
+Requires:       python3-sphinxbase
+Conflicts:      python3-pocketsphinx5
+Conflicts:      python3-pocketsphinx-python <= 0.1.3
 
 %description -n python3-pocketsphinx
 Pocketsphinx is a version of the open-source CMU Sphinx II speech
@@ -104,6 +109,8 @@
 for binary in pocketsphinx_batch pocketsphinx_continuous 
pocketsphinx_mdef_convert ; do
     mv %{buildroot}%{_bindir}/$binary %{buildroot}%{_bindir}/$binary-%{version}
     ln -s %{_sysconfdir}/alternatives/$binary %{buildroot}%{_bindir}/$binary
+    mv %{buildroot}%{_mandir}/man1/$binary.1 
%{buildroot}%{_mandir}/man1/$binary-%{version}.1
+    ln -s %{_sysconfdir}/alternatives/$binary.1%{ext_man} 
%{buildroot}%{_mandir}/man1/$binary.1%{ext_man}
 done
 
 %check
@@ -112,7 +119,10 @@
 %post
 update-alternatives --install %{_bindir}/pocketsphinx_batch pocketsphinx_batch 
%{_bindir}/pocketsphinx_batch-%{version} 10 \
   --slave %{_bindir}/pocketsphinx_continuous pocketsphinx_continuous 
%{_bindir}/pocketsphinx_continuous-%{version} \
-  --slave %{_bindir}/pocketsphinx_mdef_convert pocketsphinx_mdef_convert 
%{_bindir}/pocketsphinx_mdef_convert-%{version}
+  --slave %{_bindir}/pocketsphinx_mdef_convert pocketsphinx_mdef_convert 
%{_bindir}/pocketsphinx_mdef_convert-%{version} \
+  --slave %{_mandir}/man1/pocketsphinx_batch.1%{ext_man} 
pocketsphinx_batch.1%{ext_man} 
%{_mandir}/man1/pocketsphinx_batch-%{version}.1%{ext_man} \
+  --slave %{_mandir}/man1/pocketsphinx_continuous.1%{ext_man} 
pocketsphinx_continuous.1%{ext_man} 
%{_mandir}/man1/pocketsphinx_continuous-%{version}.1%{ext_man} \
+  --slave %{_mandir}/man1/pocketsphinx_mdef_convert.1%{ext_man} 
pocketsphinx_mdef_convert.1%{ext_man} 
%{_mandir}/man1/pocketsphinx_mdef_convert-%{version}.1%{ext_man}
 
 %postun
 if [ ! -f %{_bindir}/pocketsphinx_batch ]; then
@@ -128,6 +138,9 @@
 %ghost %{_sysconfdir}/alternatives/pocketsphinx_batch
 %ghost %{_sysconfdir}/alternatives/pocketsphinx_continuous
 %ghost %{_sysconfdir}/alternatives/pocketsphinx_mdef_convert
+%ghost %{_sysconfdir}/alternatives/pocketsphinx_batch.1%{ext_man}
+%ghost %{_sysconfdir}/alternatives/pocketsphinx_continuous.1%{ext_man}
+%ghost %{_sysconfdir}/alternatives/pocketsphinx_mdef_convert.1%{ext_man}
 %{_bindir}/pocketsphinx_batch*
 %{_bindir}/pocketsphinx_continuous*
 %{_bindir}/pocketsphinx_mdef_convert*
@@ -141,7 +154,7 @@
 %{_libdir}/libpocketsphinx.so.%{sover}*
 
 %files devel
-%{_includedir}/%{name}/
+%{_includedir}/%{name}
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/pocketsphinx.pc
 

++++++ use-python3.patch ++++++
--- /var/tmp/diff_new_pack.M9h1iN/_old  2020-03-26 23:38:09.702880929 +0100
+++ /var/tmp/diff_new_pack.M9h1iN/_new  2020-03-26 23:38:09.702880929 +0100
@@ -2,6 +2,15 @@
 ===================================================================
 --- pocketsphinx-0.8.orig/python/Makefile.am
 +++ pocketsphinx-0.8/python/Makefile.am
+@@ -13,7 +13,7 @@ noinst_HEADERS = bogus_pygobject.h
+ 
+ if BUILD_PYTHON
+ # Setuptools isn't really compatible with distutils, unfortunately
+-SETUPTOOLS_CRAP = `python -c 'import setuptools' 2>/dev/null \
++SETUPTOOLS_CRAP = `python3 -c 'import setuptools' 2>/dev/null \
+       && echo --single-version-externally-managed --record filelist.txt`
+ 
+ all-local: pymod-build-stamp
 @@ -40,5 +40,5 @@ endif
  
  if BUILD_CYTHON
@@ -13,6 +22,15 @@
 ===================================================================
 --- pocketsphinx-0.8.orig/python/Makefile.in
 +++ pocketsphinx-0.8/python/Makefile.in
+@@ -217,7 +217,7 @@ pkginclude_HEADERS = pocketsphinx.pxd
+ noinst_HEADERS = bogus_pygobject.h
+ 
+ # Setuptools isn't really compatible with distutils, unfortunately
+-@BUILD_PYTHON_TRUE@SETUPTOOLS_CRAP = `python -c 'import setuptools' 
2>/dev/null \
++@BUILD_PYTHON_TRUE@SETUPTOOLS_CRAP = `python3 -c 'import setuptools' 
2>/dev/null \
+ @BUILD_PYTHON_TRUE@   && echo --single-version-externally-managed --record 
filelist.txt`
+ 
+ all: all-am
 @@ -505,7 +505,7 @@ uninstall-am: uninstall-local uninstall-
  @BUILD_PYTHON_TRUE@   touch $@
  
@@ -26,7 +44,16 @@
 ===================================================================
 --- pocketsphinx-0.8.orig/python/pocketsphinx.pyx
 +++ pocketsphinx-0.8/python/pocketsphinx.pyx
-@@ -265,7 +265,7 @@ cdef class Lattice:
+@@ -7,6 +7,8 @@
+ #
+ # Author: David Huggins-Daines <dhugg...@cs.cmu.edu>
+ 
++from libc.stdio cimport fdopen
++
+ cdef class LatNode:
+     """
+     Node in a word lattice.
+@@ -265,7 +267,7 @@ cdef class Lattice:
              self.dag = ps_lattice_read(NULL, latfile)
          self.n_frames = ps_lattice_n_frames(self.dag)
          if self.dag == NULL:
@@ -35,7 +62,7 @@
          
      cdef set_dag(Lattice self, ps_lattice_t *dag):
          ps_lattice_retain(dag)
-@@ -366,7 +366,7 @@ cdef class Lattice:
+@@ -366,7 +368,7 @@ cdef class Lattice:
  
          rv = ps_lattice_write(self.dag, outfile)
          if rv < 0:
@@ -44,7 +71,7 @@
  
  
  cdef class Segment:
-@@ -469,11 +469,11 @@ cdef class Decoder:
+@@ -469,11 +471,11 @@ cdef class Decoder:
              i = i + 2
          config = sb.cmd_ln_parse_r(NULL, ps_args(), self.argc, self.argv, 0)
          if config == NULL:
@@ -58,9 +85,39 @@
  
      cdef set_boxed(Decoder self, box):
          cdef ps_decoder_t *ps
-@@ -571,15 +571,15 @@ cdef class Decoder:
+@@ -506,7 +508,7 @@ cdef class Decoder:
+         cdef int nsamp
+         cdef char *cuttid
+ 
+-        cfh = PyFile_AsFile(fh)
++        cfh = fdopen(PyObject_AsFileDescriptor(fh), "rb")
+         if uttid == None:
+             cuttid = NULL
+         else:
+@@ -525,7 +527,7 @@ cdef class Decoder:
+         cdef FILE *cfh
+         cdef char *cuttid
+ 
+-        cfh = PyFile_AsFile(fh)
++        cfh = fdopen(PyObject_AsFileDescriptor(fh), "rb")
+         if uttid == None:
+             cuttid = NULL
+         else:
+@@ -555,7 +557,7 @@ cdef class Decoder:
+         @param data: Audio data to process.  This is packed binary
+         data, which consists of single-channel, 16-bit PCM audio, at
+         the sample rate specified when the decoder was initialized.
+-        @type data: str
++        @type data: bytes
+         @param no_search: Buffer the data without actually processing it 
(default is to process the
+         data as it is received).
+         @type no_search: bool
+@@ -569,17 +571,17 @@ cdef class Decoder:
+         cdef char* strdata
+         cdef raw_data_ptr cdata
          
-         PyString_AsStringAndSize(data, &strdata, &len)
+-        PyString_AsStringAndSize(data, &strdata, &len)
++        PyBytes_AsStringAndSize(data, &strdata, &len)
          cdata = strdata
 -        if ps_process_raw(self.ps, cdata, len / 2, no_search, full_utt) < 0:
 -            raise RuntimeError, "Failed to process %d samples of audio data" 
% len / 2
@@ -77,7 +134,7 @@
  
      def get_hyp(self):
          """
-@@ -633,7 +633,7 @@ cdef class Decoder:
+@@ -633,7 +635,7 @@ cdef class Decoder:
  
          dag = ps_get_lattice(self.ps)
          if dag == NULL:
@@ -86,7 +143,7 @@
          lat = Lattice()
          lat.set_dag(dag)
          return lat
-@@ -726,7 +726,7 @@ cdef class Decoder:
+@@ -726,7 +728,7 @@ cdef class Decoder:
          cdef SegmentIterator itor
          first_seg = ps_seg_iter(self.ps, &score)
          if first_seg == NULL:
@@ -97,9 +154,9 @@
          return (itor, score)
 Index: pocketsphinx-0.8/python/setup.py.in
 ===================================================================
---- pocketsphinx-0.8.orig/python/setup.py.in   2012-11-12 14:56:58.000000000 
+0100
-+++ pocketsphinx-0.8/python/setup.py.in        2020-01-15 12:46:21.842830046 
+0100
-@@ -5,7 +5,7 @@
+--- pocketsphinx-0.8.orig/python/setup.py.in
++++ pocketsphinx-0.8/python/setup.py.in
+@@ -5,7 +5,7 @@ except:
  
  import distutils.command.install
  import os
@@ -108,7 +165,7 @@
  import sys
  
  class bogus_uninstall(distutils.command.install.install):
-@@ -29,7 +29,7 @@
+@@ -29,7 +29,7 @@ class bogus_uninstall(distutils.command.
              if os.path.isdir(f):
                  dirs[f] = 1
                  continue
@@ -117,7 +174,7 @@
              try:
                  os.unlink(f)
              except:
-@@ -38,11 +38,11 @@
+@@ -38,11 +38,11 @@ class bogus_uninstall(distutils.command.
          # This is really not guaranteed to work!!!
          for d in dirs:
              while d != self.prefix:
@@ -131,7 +188,7 @@
                          for f in files: os.unlink(f)
                      os.rmdir(d)
                  except:
-@@ -51,7 +51,7 @@
+@@ -51,7 +51,7 @@ class bogus_uninstall(distutils.command.
  
  def pkgconfig(*packages, **kw):
      flag_map = {'-I': 'include_dirs', '-L': 'library_dirs', '-l': 'libraries'}
@@ -140,3 +197,18 @@
          kw.setdefault(flag_map.get(token[:2]), []).append(token[2:])
      return kw
  
+Index: pocketsphinx-0.8/python/pocketsphinx.pxd
+===================================================================
+--- pocketsphinx-0.8.orig/python/pocketsphinx.pxd
++++ pocketsphinx-0.8/python/pocketsphinx.pxd
+@@ -28,8 +28,8 @@ cdef extern from "stdio.h":
+     ctypedef struct FILE # oh dear...
+ 
+ cdef extern from "Python.h":
+-    FILE *PyFile_AsFile(object p)
+-    int PyString_AsStringAndSize(object p, char **buf, Py_ssize_t *len) 
except -1
++    int PyObject_AsFileDescriptor(object)
++    int PyBytes_AsStringAndSize(object p, char **buf, Py_ssize_t *len) except 
-1
+ 
+ # Don't rely on having PyGTK actually installed
+ cdef extern from "bogus_pygobject.h":


Reply via email to