[Python-modules-commits] [python-speechrecognition] 02/03: Import Debian changes 3.7.1+ds-1

Ethan Ward ethanward-guest at moszumanska.debian.org
Sat Nov 4 19:44:03 UTC 2017


This is an automated email from the git hooks/post-receive script.

ethanward-guest pushed a commit to branch master
in repository python-speechrecognition.

commit b3c7cf8c31c11f50120021cf8b8f113bd742267e
Author: Ethan Ward <ethan.ward at mycroft.ai>
Date:   Mon Jul 17 12:53:40 2017 -0500

    Import Debian changes 3.7.1+ds-1
    
    python-speechrecognition (3.7.1+ds-1) UNRELEASED; urgency=medium
    
      * Initial Debian packaging (closes: #869108)
---
 debian/.git-dpm                                 | 11 +++
 debian/changelog                                |  5 ++
 debian/compat                                   |  1 +
 debian/control                                  | 31 ++++++++
 debian/copyright                                | 77 +++++++++++++++++++
 debian/patches/0001-Allow-disabling-tests.patch | 98 +++++++++++++++++++++++++
 debian/patches/0002-Remove-extra-license.patch  | 47 ++++++++++++
 debian/patches/series                           |  2 +
 debian/rules                                    | 16 ++++
 debian/source/format                            |  1 +
 debian/source/options                           |  0
 debian/tests/control                            |  4 +
 debian/tests/py3                                | 12 +++
 debian/watch                                    |  4 +
 14 files changed, 309 insertions(+)

diff --git a/debian/.git-dpm b/debian/.git-dpm
new file mode 100644
index 0000000..e016bd3
--- /dev/null
+++ b/debian/.git-dpm
@@ -0,0 +1,11 @@
+# see git-dpm(1) from git-dpm package
+1995ce3998b70d938c0692516eb52512611dd376
+1995ce3998b70d938c0692516eb52512611dd376
+1995ce3998b70d938c0692516eb52512611dd376
+1995ce3998b70d938c0692516eb52512611dd376
+speechrecognition_3.7.1.orig.tar.gz
+07309e6d9dd6b3f760af09dd1c366b847de34917
+125418704
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..08abb02
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+python-speechrecognition (3.7.1+ds-1) UNRELEASED; urgency=medium
+
+  * Initial Debian packaging (closes: #869108)
+
+ -- Ethan Ward <ethan.ward at mycroft.ai>  Mon, 17 Jul 2017 12:53:40 -0500
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..322b36e
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,31 @@
+Source: python-speechrecognition
+Section: python
+Priority: optional
+Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
+Uploaders: Ethan Ward <ethan.ward at mycroft.ai>
+Build-Depends: debhelper (>= 10),
+               dh-python,
+               flac,
+               python3-all,
+               python3-setuptools
+Standards-Version: 4.1.1
+Homepage: https://pypi.python.org/pypi/SpeechRecognition
+Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/speechrecognition.git
+Vcs-Browser: https://anonscm.debian.org/git/python-modules/packages/speechrecognition.git
+
+Package: python3-speechrecognition
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}
+Recommends: flac, python3-pocketsphinx, python3-pyaudio
+Description: Library for performing speech recognition (Python 3)
+ A library for performing speech recognition that
+ has support for several engines and APIs, online and offline. This includes:
+ CMU Sphinx
+ Google Speech Recognition
+ Google Cloud SPeech API
+ Wit.ai
+ Microsoft Bing Voice Recognition
+ Houndify API
+ IBM Speech to Text
+ .
+ This package contains the module for Python 3.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..c665c95
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,77 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: speechrecognition
+Source: https://pypi.python.org/pypi/speechrecognition
+Comment: The flac binaries provided with this package have been removed, as it
+ is against Debian policy to include binaries without the corresponding source.
+ The included python wheels have also been removed, and the included packages
+ have instead been added as recommended Debian packages.
+Files-Excluded: third-party/*
+ speech_recognition/flac*
+
+Files: *
+Copyright: (c) 2014-2017 Anthony Zhang (Uberi)
+License: BSD-3-Clause
+
+Files: debian/*
+Copyright: (c) 2017, Ethan Ward <ethan.ward at mycroft.ai>
+License: BSD-3-Clause
+
+Files: speech_recognition/pocketsphinx-data/*
+Copyright: (c) 1999-2015 Carnegie Mellon University
+License: BSD-2-Clause
+
+License: BSD-3-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ .
+ 1. Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ .
+ 3. Neither the name of the copyright holder nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
+ LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ THE POSSIBILITY OF SUCH DAMAGE.
+
+License: BSD-2-Clause
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+ .
+ 1. Redistributions of source code must retain the above copyright
+    notice, this list of conditions and the following disclaimer.
+ .
+ 2. Redistributions in binary form must reproduce the above copyright
+    notice, this list of conditions and the following disclaimer in
+    the documentation and/or other materials provided with the
+    distribution.
+ .
+ This work was supported in part by funding from the Defense Advanced
+ Research Projects Agency and the National Science Foundation of the
+ United States of America, and the CMU Sphinx Speech Consortium.
+ .
+ THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
+ ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
+ NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/debian/patches/0001-Allow-disabling-tests.patch b/debian/patches/0001-Allow-disabling-tests.patch
new file mode 100644
index 0000000..415de08
--- /dev/null
+++ b/debian/patches/0001-Allow-disabling-tests.patch
@@ -0,0 +1,98 @@
+From: Ethan Ward <ethan.ward at mycroft.ai>
+Date: Fri, 1 Sep 2017 12:16:56 -0500
+Subject: Allow disabling tests
+
+Fix typos
+---
+ tests/test_audio.py            | 6 +++++-
+ tests/test_recognition.py      | 4 ++++
+ tests/test_special_features.py | 1 +
+ 3 files changed, 10 insertions(+), 1 deletion(-)
+
+diff --git a/tests/test_audio.py b/tests/test_audio.py
+index 4a18860..fccfc16 100644
+--- a/tests/test_audio.py
++++ b/tests/test_audio.py
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env python3
+ 
+ import unittest
+-from os import path
++from os import path, environ
+ 
+ import speech_recognition as sr
+ 
+@@ -98,6 +98,7 @@ class TestAudioFile(unittest.TestCase):
+         self.assertEqual(audio.sample_width, 2)
+         self.assertSimilar(audio.get_raw_data()[:32], b"\x00\x00\xfe\xff\x02\x00\xfe\xff\xff\xff\x04\x00\xfa\xff\x04\x00\xfa\xff\t\x00\xf6\xff\n\x00\xfa\xff\xff\xff\x08\x00\xf5\xff")
+ 
++    @unittest.skipIf(environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
+     def test_flac_mono_16_bit(self):
+         r = sr.Recognizer()
+         with sr.AudioFile(path.join(path.dirname(path.realpath(__file__)), "audio-mono-16-bit-44100Hz.flac")) as source: audio = r.record(source)
+@@ -106,6 +107,7 @@ class TestAudioFile(unittest.TestCase):
+         self.assertEqual(audio.sample_width, 2)
+         self.assertSimilar(audio.get_raw_data()[:32], b"\x00\x00\xff\xff\x01\x00\xff\xff\x00\x00\x01\x00\xfe\xff\x02\x00\xfc\xff\x06\x00\xf9\xff\x06\x00\xfe\xff\xfe\xff\x05\x00\xfa\xff")
+ 
++    @unittest.skipIf(environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
+     def test_flac_mono_24_bit(self):
+         r = sr.Recognizer()
+         with sr.AudioFile(path.join(path.dirname(path.realpath(__file__)), "audio-mono-24-bit-44100Hz.flac")) as source: audio = r.record(source)
+@@ -116,6 +118,7 @@ class TestAudioFile(unittest.TestCase):
+         else:
+             self.assertSimilar(audio.get_raw_data()[:32], b"\x00\x00\x00\x00\x00\xff\xfe\xff\x00\x02\x01\x00\x00\xfd\xfe\xff\x00\x04\x00\x00\x00\xfc\x00\x00\x00\x04\xfe\xff\x00\xfb\x00\x00")
+ 
++    @unittest.skipIf(environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
+     def test_flac_stereo_16_bit(self):
+         r = sr.Recognizer()
+         with sr.AudioFile(path.join(path.dirname(path.realpath(__file__)), "audio-stereo-16-bit-44100Hz.flac")) as source: audio = r.record(source)
+@@ -124,6 +127,7 @@ class TestAudioFile(unittest.TestCase):
+         self.assertEqual(audio.sample_width, 2)
+         self.assertSimilar(audio.get_raw_data()[:32], b"\xff\xff\xff\xff\x02\x00\xfe\xff\x00\x00\x01\x00\xfd\xff\x01\x00\xff\xff\x04\x00\xfa\xff\x05\x00\xff\xff\xfd\xff\x08\x00\xf6\xff")
+ 
++    @unittest.skipIf(environ.get("FLAC_TEST_SKIP", False), "Skipping flac tests")
+     def test_flac_stereo_24_bit(self):
+         r = sr.Recognizer()
+         with sr.AudioFile(path.join(path.dirname(path.realpath(__file__)), "audio-stereo-24-bit-44100Hz.flac")) as source: audio = r.record(source)
+diff --git a/tests/test_recognition.py b/tests/test_recognition.py
+index 269dc00..4c78c99 100644
+--- a/tests/test_recognition.py
++++ b/tests/test_recognition.py
+@@ -13,21 +13,25 @@ class TestRecognition(unittest.TestCase):
+         self.AUDIO_FILE_FR = os.path.join(os.path.dirname(os.path.realpath(__file__)), "french.aiff")
+         self.AUDIO_FILE_ZH = os.path.join(os.path.dirname(os.path.realpath(__file__)), "chinese.flac")
+ 
++    @unittest.skipIf(os.environ.get("POCKETSPHINX_TEST_SKIP"), "Skipping pocketsphinx tests")
+     def test_sphinx_english(self):
+         r = sr.Recognizer()
+         with sr.AudioFile(self.AUDIO_FILE_EN) as source: audio = r.record(source)
+         self.assertEqual(r.recognize_sphinx(audio), "wanted to three")
+ 
++    @unittest.skipIf(os.environ.get("GOOGLE_TEST_SKIP",False), "Requires internet connection")
+     def test_google_english(self):
+         r = sr.Recognizer()
+         with sr.AudioFile(self.AUDIO_FILE_EN) as source: audio = r.record(source)
+         self.assertEqual(r.recognize_google(audio), "one two three")
+ 
++    @unittest.skipIf(os.environ.get("GOOGLE_TEST_SKIP",False), "Requires internet connection")
+     def test_google_french(self):
+         r = sr.Recognizer()
+         with sr.AudioFile(self.AUDIO_FILE_FR) as source: audio = r.record(source)
+         self.assertEqual(r.recognize_google(audio, language="fr-FR"), u"et c'est la dictée numéro 1")
+ 
++    @unittest.skipIf(os.environ.get("GOOGLE_TEST_SKIP",False), "Requires internet connection")
+     def test_google_chinese(self):
+         r = sr.Recognizer()
+         with sr.AudioFile(self.AUDIO_FILE_ZH) as source: audio = r.record(source)
+diff --git a/tests/test_special_features.py b/tests/test_special_features.py
+index c77ab44..a4018d3 100644
+--- a/tests/test_special_features.py
++++ b/tests/test_special_features.py
+@@ -11,6 +11,7 @@ class TestSpecialFeatures(unittest.TestCase):
+     def setUp(self):
+         self.AUDIO_FILE_EN = os.path.join(os.path.dirname(os.path.realpath(__file__)), "english.wav")
+ 
++    @unittest.skipIf(os.environ.get('POCKETSPHINX_TEST_SKIP', False),"Skipping pocketsphinx tests")
+     def test_sphinx_keywords(self):
+         r = sr.Recognizer()
+         with sr.AudioFile(self.AUDIO_FILE_EN) as source: audio = r.record(source)
diff --git a/debian/patches/0002-Remove-extra-license.patch b/debian/patches/0002-Remove-extra-license.patch
new file mode 100644
index 0000000..bedc228
--- /dev/null
+++ b/debian/patches/0002-Remove-extra-license.patch
@@ -0,0 +1,47 @@
+From: Ethan Ward <ethan.ward at mycroft.ai>
+Date: Fri, 1 Sep 2017 16:21:50 -0500
+Subject: Remove extra license
+
+---
+ .../pocketsphinx-data/en-US/LICENSE.txt            | 31 ----------------------
+ 1 file changed, 31 deletions(-)
+ delete mode 100644 speech_recognition/pocketsphinx-data/en-US/LICENSE.txt
+
+diff --git a/speech_recognition/pocketsphinx-data/en-US/LICENSE.txt b/speech_recognition/pocketsphinx-data/en-US/LICENSE.txt
+deleted file mode 100644
+index d559552..0000000
+--- a/speech_recognition/pocketsphinx-data/en-US/LICENSE.txt
++++ /dev/null
+@@ -1,31 +0,0 @@
+-Copyright (c) 1999-2015 Carnegie Mellon University.  All rights
+-reserved.
+-
+-Redistribution and use in source and binary forms, with or without
+-modification, are permitted provided that the following conditions
+-are met:
+-
+-1. Redistributions of source code must retain the above copyright
+-   notice, this list of conditions and the following disclaimer. 
+-
+-2. Redistributions in binary form must reproduce the above copyright
+-   notice, this list of conditions and the following disclaimer in
+-   the documentation and/or other materials provided with the
+-   distribution.
+-
+-This work was supported in part by funding from the Defense Advanced 
+-Research Projects Agency and the National Science Foundation of the 
+-United States of America, and the CMU Sphinx Speech Consortium.
+-
+-THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND 
+-ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
+-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+-PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
+-NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+-SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
+-LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 
+-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
+-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
+-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+- 
+\ No newline at end of file
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..3e17d28
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Allow-disabling-tests.patch
+0002-Remove-extra-license.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..b4203e2
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,16 @@
+#!/usr/bin/make -f
+
+export PYBUILD_NAME=speechrecognition
+# Google tests are skipped because they require an internet
+# connection, pocketsphinx tests are skipped due to an error
+# with the pocketsphinx package
+export POCKETSPHINX_TEST_SKIP=1
+export GOOGLE_TEST_SKIP=1
+
+%:
+	dh $@ --with python3 --buildsystem=pybuild
+
+override_dh_auto_test:
+	export POCKETSPHINX_TEST_SKIP=1
+	export GOOGLE_TEST_SKIP=1
+	dh_auto_test
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/options b/debian/source/options
new file mode 100644
index 0000000..e69de29
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..a36e992
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,4 @@
+Tests: py3
+Depends: python3-all,
+         python3-speechrecognition,
+         flac
diff --git a/debian/tests/py3 b/debian/tests/py3
new file mode 100644
index 0000000..0bbd010
--- /dev/null
+++ b/debian/tests/py3
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+set -e
+
+cp -r tests "$AUTOPKGTEST_TMP"
+for py in $(py3versions -r 2>/dev/null)
+ do cd "$AUTOPKGTEST_TMP"
+ echo "Testing with $py:"
+ export GOOGLE_TEST_SKIP=1
+ export POCKETSPHINX_TEST_SKIP=1
+ $py -m unittest discover 2>/dev/null
+ done
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..f14888c
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+opts="filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/speech_recognition-$1\.tar\.gz/,\
+  dversionmangle=s/\+ds\d*$// ,repacksuffix=+ds" \
+  https://github.com/Uberi/speech_recognition/tags .*/v?(\d\S+)\.tar\.gz

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-speechrecognition.git



More information about the Python-modules-commits mailing list