Hello community, here is the log from the commit of package sphinxbase for openSUSE:Factory checked in at 2020-03-26 23:38:01 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sphinxbase (Old) and /work/SRC/openSUSE:Factory/.sphinxbase.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sphinxbase" Thu Mar 26 23:38:01 2020 rev:5 rq:788657 version:0.8 Changes: -------- --- /work/SRC/openSUSE:Factory/sphinxbase/sphinxbase.changes 2020-03-25 23:50:50.052012024 +0100 +++ /work/SRC/openSUSE:Factory/.sphinxbase.new.3160/sphinxbase.changes 2020-03-26 23:38:07.294880060 +0100 @@ -1,0 +2,9 @@ +Thu Mar 26 15:34:45 UTC 2020 - Antonio Larrosa <alarr...@suse.com> + +- sphinxbase-devel now conflicts with sphinxbase5-devel +- python3-sphinxbase now conflicts with python3-sphinxbase5 and + python3-pocketsphinx-python <= 0.1.3 +- Fix some symbol-not-found errors in the python3 port. Updated patch: + * use-python3.patch + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sphinxbase.spec ++++++ --- /var/tmp/diff_new_pack.rc9IGn/_old 2020-03-26 23:38:08.198880386 +0100 +++ /var/tmp/diff_new_pack.rc9IGn/_new 2020-03-26 23:38:08.202880388 +0100 @@ -72,6 +72,7 @@ Requires: alsa-devel Requires: lapack-devel Requires: libsndfile-devel +Conflicts: sphinxbase5-devel %description devel devel files for %{name}-%{version} @@ -83,6 +84,8 @@ Summary: Python3 bindings for sphinxbase Group: Development/Languages/Python Requires: %{name} = %{version} +Conflicts: python3-sphinxbase5 +Conflicts: python3-pocketsphinx-python <= 0.1.3 %description -n python3-sphinxbase Python3 bindings for %{name}-%{version} ++++++ use-python3.patch ++++++ --- /var/tmp/diff_new_pack.rc9IGn/_old 2020-03-26 23:38:08.238880400 +0100 +++ /var/tmp/diff_new_pack.rc9IGn/_new 2020-03-26 23:38:08.238880400 +0100 @@ -26,15 +26,16 @@ =================================================================== --- sphinxbase-0.8.orig/python/sphinxbase.pyx +++ sphinxbase-0.8/python/sphinxbase.pyx -@@ -6,6 +6,7 @@ +@@ -6,6 +6,8 @@ # notice is not removed. # # Author: David Huggins-Daines <dhugg...@cs.cmu.edu> +import io ++from libc.stdio cimport fdopen cdef class LogMath: """ -@@ -534,19 +535,19 @@ cdef class HuffCode: +@@ -534,20 +536,20 @@ cdef class HuffCode: ckd_free(symbols) def read(self, infile): @@ -43,24 +44,37 @@ + if not isinstance(infile, io.IOBase): + infile = open(infile, "rb") huff_code_free(self.hc) - self.hc = huff_code_read(PyFile_AsFile(infile)) +- self.hc = huff_code_read(PyFile_AsFile(infile)) ++ self.hc = huff_code_read(fdopen(PyObject_AsFileDescriptor(infile), "rb")) def write(self, outfile): - if not isinstance(outfile, file): - outfile = file(outfile, "wb") +- huff_code_write(self.hc, PyFile_AsFile(outfile)) + if not isinstance(outfile, io.IOBase): + outfile = open(outfile, "wb") - huff_code_write(self.hc, PyFile_AsFile(outfile)) ++ huff_code_write(self.hc, fdopen(PyObject_AsFileDescriptor(outfile), "wb")) def dump(self, outfile): - if not isinstance(outfile, file): - outfile = file(outfile, "w") +- huff_code_dump(self.hc, PyFile_AsFile(outfile)) + if not isinstance(outfile, io.IOBase): + outfile = open(outfile, "w") - huff_code_dump(self.hc, PyFile_AsFile(outfile)) ++ huff_code_dump(self.hc, fdopen(PyObject_AsFileDescriptor(outfile), "w")) def encode(self, seq): -@@ -648,8 +649,8 @@ cdef class HuffCode: + """ +@@ -619,7 +621,7 @@ cdef class HuffCode: + nbits += offset + i += 1 + #print "output:", binstr(output, nbits) +- outstr = PyString_FromStringAndSize(output, nbytes) ++ outstr = PyBytes_FromStringAndSize(output, nbytes) + PyMem_Free(output) + return (outstr, offset) + +@@ -648,10 +650,10 @@ cdef class HuffCode: return (output, offset) def attach(self, fh, char *mode): @@ -69,8 +83,11 @@ + if not isinstance(fh, io.IOBase): + fh = open(fh, mode) self.fh = fh - huff_code_attach(self.hc, PyFile_AsFile(fh), mode) +- huff_code_attach(self.hc, PyFile_AsFile(fh), mode) ++ huff_code_attach(self.hc, fdopen(PyObject_AsFileDescriptor(fh), mode), mode) + def detach(self): + huff_code_detach(self.hc) Index: sphinxbase-0.8/python/setup.py.in =================================================================== --- sphinxbase-0.8.orig/python/setup.py.in @@ -98,3 +115,20 @@ for f in files: os.unlink(f) os.rmdir(d) except: +Index: sphinxbase-0.8/python/sphinxbase.pxd +=================================================================== +--- sphinxbase-0.8.orig/python/sphinxbase.pxd ++++ sphinxbase-0.8/python/sphinxbase.pxd +@@ -20,10 +20,10 @@ cdef extern from *: + # Get Python stuff to access stdio + cdef extern from "Python.h": + ctypedef struct FILE +- FILE *PyFile_AsFile(object) ++ int PyObject_AsFileDescriptor(object) + void *PyMem_Malloc(size_t n) + void PyMem_Free(void *p) +- object PyString_FromStringAndSize(char *v, Py_ssize_t len) ++ object PyBytes_FromStringAndSize(char *v, Py_ssize_t len) + + cdef extern from "sphinxbase/logmath.h": + ctypedef struct logmath_t