Hello community, here is the log from the commit of package sphinxbase for openSUSE:Factory checked in at 2020-03-25 23:49:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/sphinxbase (Old) and /work/SRC/openSUSE:Factory/.sphinxbase.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "sphinxbase" Wed Mar 25 23:49:52 2020 rev:4 rq:788306 version:0.8 Changes: -------- --- /work/SRC/openSUSE:Factory/sphinxbase/sphinxbase.changes 2019-03-04 09:22:33.812577354 +0100 +++ /work/SRC/openSUSE:Factory/.sphinxbase.new.3160/sphinxbase.changes 2020-03-25 23:50:50.052012024 +0100 @@ -1,0 +2,11 @@ +Wed Mar 25 10:20:48 UTC 2020 - Antonio Larrosa <alarr...@suse.com> + +- spec file cleanup + +------------------------------------------------------------------- +Wed Jan 15 11:59:52 UTC 2020 - Antonio Larrosa <alarr...@suse.com> + +- Generate python3 bindings instead of python2. +- Add use-python3.patch + +------------------------------------------------------------------- New: ---- use-python3.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ sphinxbase.spec ++++++ --- /var/tmp/diff_new_pack.k9FvL5/_old 2020-03-25 23:50:52.132011473 +0100 +++ /var/tmp/diff_new_pack.k9FvL5/_new 2020-03-25 23:50:52.136011472 +0100 @@ -1,7 +1,7 @@ # # spec file for package sphinxbase # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,13 +16,14 @@ # +%define sover 1 Name: sphinxbase Version: 0.8 Release: 0 Summary: Support library required by Pocketsphinx License: BSD-2-Clause AND MIT Group: Productivity/Office/Other -Url: http://cmusphinx.sourceforge.net/wiki/download/ +URL: http://cmusphinx.sourceforge.net/wiki/download/ Source: http://downloads.sourceforge.net/project/cmusphinx/%{name}/%{version}/%{name}-%{version}.tar.gz # PATCH-FIX-UPSTREAM remove __DATE and __TIME Patch0: sphinxbase-no-date.patch @@ -34,32 +35,33 @@ Patch3: sphinxbase-uninit.patch # PATCH-FIX-UPSTREAM boo#1127564 Patch4: workaround-gcc-issue-on-i586.patch +Patch5: use-python3.patch BuildRequires: alsa-devel BuildRequires: bison BuildRequires: doxygen BuildRequires: fdupes BuildRequires: libsndfile-devel BuildRequires: pkgconfig -BuildRequires: python-Cython -BuildRequires: python-devel BuildRequires: python-rpm-macros +BuildRequires: python3-Cython +BuildRequires: python3-devel +Requires(post): update-alternatives +Requires(postun): update-alternatives %if 0%{?suse_version} <= 1210 BuildRequires: liblapack3 %else BuildRequires: lapack-devel %endif -Requires(post): update-alternatives -Requires(postun): update-alternatives %description CMU Sphinx toolkit is a speech recognition tool and has a number of packages for different tasks and applications. -%package -n libsphinxbase1 +%package -n libsphinxbase%{sover} Summary: Sphinxbase speech recognizer library Group: System/Libraries -%description -n libsphinxbase1 +%description -n libsphinxbase%{sover} CMU Sphinx toolkit is a speech recognition tool and has a number of packages for different tasks and applications. @@ -77,13 +79,13 @@ CMU Sphinx toolkit is a speech recognition tool and has a number of packages for different tasks and applications. -%package -n python2-sphinxbase -Summary: Python bindings for sphinxbase required by python-pocketsphinx +%package -n python3-sphinxbase +Summary: Python3 bindings for sphinxbase Group: Development/Languages/Python Requires: %{name} = %{version} -%description -n python2-sphinxbase -Python2 bindings for %{name}-%{version} +%description -n python3-sphinxbase +Python3 bindings for %{name}-%{version} CMU Sphinx toolkit is a speech recognition tool and has a number of packages for different tasks and applications. @@ -97,13 +99,14 @@ %ifarch i586 %patch4 -p1 %endif +%patch5 -p1 # It has to be regenerated by cython rm python/sphinxbase.c -sed -ie "s,\#\!/usr/bin/env perl,#!/usr/bin/perl," src/sphinx_lmtools/sphinx_lm_sort +sed -ie "s,\#\!%{_bindir}/env perl,#!%{_bindir}/perl," src/sphinx_lmtools/sphinx_lm_sort %build -%configure --disable-static -make %{?_smp_mflags} +%configure --disable-static --with-python=%{_bindir}/python3 +%make_build %install %make_install @@ -120,7 +123,7 @@ %ifarch x86_64 i586 %check -make check +%make_build check %endif %post @@ -136,8 +139,8 @@ update-alternatives --remove sphinx_pitch %{_bindir}/sphinx_pitch-%{version} fi -%post -n libsphinxbase1 -p /sbin/ldconfig -%postun -n libsphinxbase1 -p /sbin/ldconfig +%post -n libsphinxbase%{sover} -p /sbin/ldconfig +%postun -n libsphinxbase%{sover} -p /sbin/ldconfig %files %doc AUTHORS ChangeLog README NEWS @@ -158,16 +161,18 @@ %{_bindir}/sphinx_cont_fileseg %{_bindir}/sphinx_lm_sort -%files -n libsphinxbase1 -%{_libdir}/*.so.* +%files -n libsphinxbase%{sover} +%{_libdir}/libsphinxbase.so.%{sover}* +%{_libdir}/libsphinxad.so.* %files devel -%{_libdir}/*.so +%{_libdir}/libsphinxbase.so +%{_libdir}/libsphinxad.so %{_libdir}/pkgconfig/sphinxbase.pc %{_includedir}/sphinxbase/ -%files -n python2-sphinxbase -%{py_sitedir}/SphinxBase-0.8-py%{py_ver}.egg-info -%{py_sitedir}/*.so +%files -n python3-sphinxbase +%{python3_sitearch}/SphinxBase-0.8-py%{python3_version}.egg-info +%{python3_sitearch}/sphinxbase*.so %changelog ++++++ sphinxbase-uninit.patch ++++++ --- /var/tmp/diff_new_pack.k9FvL5/_old 2020-03-25 23:50:52.156011467 +0100 +++ /var/tmp/diff_new_pack.k9FvL5/_new 2020-03-25 23:50:52.156011467 +0100 @@ -1,6 +1,8 @@ ---- src/sphinx_lmtools/sphinx_lm_eval.c.orig 2012-12-05 07:06:03.000000000 -0700 -+++ src/sphinx_lmtools/sphinx_lm_eval.c 2013-03-29 07:59:16.776912497 -0600 -@@ -193,7 +193,7 @@ +Index: src/sphinx_lmtools/sphinx_lm_eval.c +=================================================================== +--- src/sphinx_lmtools/sphinx_lm_eval.c.orig ++++ src/sphinx_lmtools/sphinx_lm_eval.c +@@ -193,7 +193,7 @@ evaluate_file(ngram_model_t *lm, logmath { FILE *fh; lineiter_t *litor; ++++++ use-python3.patch ++++++ Index: sphinxbase-0.8/python/Makefile.am =================================================================== --- sphinxbase-0.8.orig/python/Makefile.am +++ sphinxbase-0.8/python/Makefile.am @@ -35,5 +35,5 @@ endif if BUILD_CYTHON $(srcdir)/sphinxbase.c: $(srcdir)/sphinxbase.pyx $(srcdir)/sphinxbase.pxd - cython -o $@ $< + cython -3 -o $@ $< endif Index: sphinxbase-0.8/python/Makefile.in =================================================================== --- sphinxbase-0.8.orig/python/Makefile.in +++ sphinxbase-0.8/python/Makefile.in @@ -503,7 +503,7 @@ uninstall-am: uninstall-local uninstall- @BUILD_PYTHON_TRUE@ touch $@ @BUILD_CYTHON_TRUE@$(srcdir)/sphinxbase.c: $(srcdir)/sphinxbase.pyx $(srcdir)/sphinxbase.pxd -@BUILD_CYTHON_TRUE@ cython -o $@ $< +@BUILD_CYTHON_TRUE@ cython -3 -o $@ $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. Index: sphinxbase-0.8/python/sphinxbase.pyx =================================================================== --- sphinxbase-0.8.orig/python/sphinxbase.pyx +++ sphinxbase-0.8/python/sphinxbase.pyx @@ -6,6 +6,7 @@ # notice is not removed. # # Author: David Huggins-Daines <dhugg...@cs.cmu.edu> +import io cdef class LogMath: """ @@ -534,19 +535,19 @@ cdef class HuffCode: ckd_free(symbols) def read(self, infile): - if not isinstance(infile, file): - infile = file(infile, "rb") + if not isinstance(infile, io.IOBase): + infile = open(infile, "rb") huff_code_free(self.hc) self.hc = huff_code_read(PyFile_AsFile(infile)) def write(self, outfile): - if not isinstance(outfile, file): - outfile = file(outfile, "wb") + if not isinstance(outfile, io.IOBase): + outfile = open(outfile, "wb") huff_code_write(self.hc, PyFile_AsFile(outfile)) def dump(self, outfile): - if not isinstance(outfile, file): - outfile = file(outfile, "w") + if not isinstance(outfile, io.IOBase): + outfile = open(outfile, "w") huff_code_dump(self.hc, PyFile_AsFile(outfile)) def encode(self, seq): @@ -648,8 +649,8 @@ cdef class HuffCode: return (output, offset) def attach(self, fh, char *mode): - if not isinstance(fh, file): - fh = file(fh, mode) + if not isinstance(fh, io.IOBase): + fh = open(fh, mode) self.fh = fh huff_code_attach(self.hc, PyFile_AsFile(fh), mode) Index: sphinxbase-0.8/python/setup.py.in =================================================================== --- sphinxbase-0.8.orig/python/setup.py.in +++ sphinxbase-0.8/python/setup.py.in @@ -28,7 +28,7 @@ class bogus_uninstall(distutils.command. if os.path.isdir(f): dirs[f] = 1 continue - print "Trying to remove file", f + print("Trying to remove file %s" % f) try: os.unlink(f) except: @@ -37,11 +37,11 @@ class bogus_uninstall(distutils.command. # This is really not guaranteed to work!!! for d in dirs: while d != self.prefix: - print "Trying to remove dir", d + print("Trying to remove dir %s" % d) try: if d.endswith(".egg-info"): files=[os.path.join(d,f) for f in os.listdir(d)] - print "Trying to remove:", " ".join(files) + print("Trying to remove: " + " ".join(files)) for f in files: os.unlink(f) os.rmdir(d) except: