diff -Nru audioread-1.0.1/audioread/ffdec.py audioread-1.0.3/audioread/ffdec.py --- audioread-1.0.1/audioread/ffdec.py 2013-03-14 17:51:10.000000000 +0000 +++ audioread-1.0.3/audioread/ffdec.py 2014-03-31 22:54:53.000000000 +0000 @@ -178,7 +178,7 @@ def close(self): """Close the ffmpeg process used to perform the decoding.""" if hasattr(self, 'proc') and self.proc.returncode is None: - self.proc.terminate() + self.proc.kill() # Flush the stdout buffer (stderr already flushed). stdout_reader = ReaderThread(self.proc.stdout) stdout_reader.start() diff -Nru audioread-1.0.1/audioread/gstdec.py audioread-1.0.3/audioread/gstdec.py --- audioread-1.0.1/audioread/gstdec.py 2013-04-24 17:06:18.000000000 +0000 +++ audioread-1.0.3/audioread/gstdec.py 2014-03-31 22:54:53.000000000 +0000 @@ -366,8 +366,8 @@ for path in sys.argv[1:]: path = os.path.abspath(os.path.expanduser(path)) with GstAudioFile(path) as f: - print f.channels - print f.samplerate - print f.duration + print(f.channels) + print(f.samplerate) + print(f.duration) for s in f: - print len(s), ord(s[0]) + print(len(s), ord(s[0])) diff -Nru audioread-1.0.1/audioread/rawread.py audioread-1.0.3/audioread/rawread.py --- audioread-1.0.1/audioread/rawread.py 2013-01-29 18:38:47.000000000 +0000 +++ audioread-1.0.3/audioread/rawread.py 2014-05-27 00:45:23.000000000 +0000 @@ -46,17 +46,20 @@ try: self._file = aifc.open(self._fh) + except aifc.Error: + # Return to the beginning of the file to try the WAV reader. + self._fh.seek(0) + else: self._is_aif = True return - except aifc.Error: - pass try: self._file = wave.open(self._fh) - self._is_aif = False - return except wave.Error: pass + else: + self._is_aif = False + return raise UnsupportedError() diff -Nru audioread-1.0.1/debian/changelog audioread-1.0.3/debian/changelog --- audioread-1.0.1/debian/changelog 2013-05-14 19:45:09.000000000 +0000 +++ audioread-1.0.3/debian/changelog 2014-09-29 07:25:53.000000000 +0000 @@ -1,3 +1,15 @@ +audioread (1.0.3-1) unstable; urgency=medium + + * New upstream release + + Drop the print() patch, merged upstream. + * d/control: bump Standards-Version to 3.9.6, no changes needed. + * Switch to pybuild: + + Remove the python[3]-audioread.install files + + Add dh-python to Build-Depends + + Clean up d/rules. + + -- Simon Chopin Mon, 29 Sep 2014 09:25:53 +0200 + audioread (1.0.1-1) unstable; urgency=low [ Simon Chopin ] diff -Nru audioread-1.0.1/debian/control audioread-1.0.3/debian/control --- audioread-1.0.1/debian/control 2013-05-14 10:59:34.000000000 +0000 +++ audioread-1.0.3/debian/control 2014-09-28 20:33:46.000000000 +0000 @@ -5,9 +5,10 @@ Uploaders: Simon Chopin Build-Depends: debhelper (>= 8.1), + dh-python, python-all (>= 2.6.6-3~), python3-all -Standards-Version: 3.9.4 +Standards-Version: 3.9.6 X-Python-Version: >= 2.6 X-Python3-Version: >= 3.2 Homepage: https://github.com/sampsyo/audioread diff -Nru audioread-1.0.1/debian/patches/series audioread-1.0.3/debian/patches/series --- audioread-1.0.1/debian/patches/series 2013-05-14 10:59:34.000000000 +0000 +++ audioread-1.0.3/debian/patches/series 2014-08-22 11:41:25.000000000 +0000 @@ -1,2 +1 @@ avconv.patch -use_print_function diff -Nru audioread-1.0.1/debian/patches/use_print_function audioread-1.0.3/debian/patches/use_print_function --- audioread-1.0.1/debian/patches/use_print_function 2013-05-14 10:59:34.000000000 +0000 +++ audioread-1.0.3/debian/patches/use_print_function 1970-01-01 00:00:00.000000000 +0000 @@ -1,29 +0,0 @@ -From: Simon Chopin -Date: Tue, 14 May 2013 12:46:50 +0200 -Subject: [PATCH] Use the print() function instead of the print keyword -Forwarded: https://github.com/sampsyo/audioread/pull/7 - ---- - audioread/gstdec.py | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/audioread/gstdec.py b/audioread/gstdec.py -index 78285db..fa8078f 100644 ---- a/audioread/gstdec.py -+++ b/audioread/gstdec.py -@@ -366,8 +366,8 @@ if __name__ == '__main__': - for path in sys.argv[1:]: - path = os.path.abspath(os.path.expanduser(path)) - with GstAudioFile(path) as f: -- print f.channels -- print f.samplerate -- print f.duration -+ print(f.channels) -+ print(f.samplerate) -+ print(f.duration) - for s in f: -- print len(s), ord(s[0]) -+ print(len(s), ord(s[0])) --- -1.7.10.4 - diff -Nru audioread-1.0.1/debian/python3-audioread.install audioread-1.0.3/debian/python3-audioread.install --- audioread-1.0.1/debian/python3-audioread.install 2013-05-14 10:59:34.000000000 +0000 +++ audioread-1.0.3/debian/python3-audioread.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/python3* diff -Nru audioread-1.0.1/debian/python-audioread.install audioread-1.0.3/debian/python-audioread.install --- audioread-1.0.1/debian/python-audioread.install 2013-05-14 10:59:34.000000000 +0000 +++ audioread-1.0.3/debian/python-audioread.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/python2.* diff -Nru audioread-1.0.1/debian/rules audioread-1.0.3/debian/rules --- audioread-1.0.1/debian/rules 2013-05-14 11:10:39.000000000 +0000 +++ audioread-1.0.3/debian/rules 2014-08-22 11:41:25.000000000 +0000 @@ -1,18 +1,7 @@ #!/usr/bin/make -f -%: - dh $@ --with python2,python3 - -override_dh_auto_install: - dh_auto_install - python3 setup.py install --skip-build --no-compile \ - --root debian/tmp \ - --install-layout=deb -override_dh_auto_build: - dh_auto_build - python3 setup.py build; +export PYBUILD_NAME=audioread -override_dh_auto_clean: - dh_auto_clean - python3 setup.py clean -a +%: + dh $@ --with python2,python3 --buildsystem=pybuild diff -Nru audioread-1.0.1/PKG-INFO audioread-1.0.3/PKG-INFO --- audioread-1.0.1/PKG-INFO 2013-04-29 17:48:37.000000000 +0000 +++ audioread-1.0.3/PKG-INFO 2014-08-22 19:54:54.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: audioread -Version: 1.0.1 +Version: 1.0.3 Summary: multi-library, cross-platform audio decoding Home-page: https://github.com/sampsyo/audioread Author: Adrian Sampson @@ -9,6 +9,9 @@ Description: audioread ========= + .. image:: https://secure.travis-ci.org/sampsyo/audioread.png + :target: https://travis-ci.org/sampsyo/audioread/ + Decode audio files using whichever backend is available. The library currently supports: @@ -31,7 +34,7 @@ Use the library like so:: with audioread.audio_open(filename) as f: - print f.channels, f.samplerate, f.duration + print(f.channels, f.samplerate, f.duration) for buf in f: do_something(buf) @@ -54,6 +57,10 @@ unsupported by the backends; if the file doesn't exist, a standard ``IOError`` will be raised. + Audioread is "universal" and supports both Python 2 (2.6+) and Python 3 + (3.2+). The GStreamer backend currently only supports 2.x since gst-python is + 2.x-only. + Future Work ----------- @@ -71,6 +78,12 @@ Version History --------------- + 1.0.3 + Use the rawread (standard-library) backend for .wav files. + + 1.0.2 + Send SIGKILL, not SIGTERM, to ffmpeg processes to avoid occasional hangs. + 1.0.1 When GStreamer fails to report a duration, raise an exception instead of silently setting the duration field to None. @@ -134,3 +147,4 @@ Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 diff -Nru audioread-1.0.1/README.rst audioread-1.0.3/README.rst --- audioread-1.0.1/README.rst 2013-04-24 17:07:18.000000000 +0000 +++ audioread-1.0.3/README.rst 2014-05-27 00:46:11.000000000 +0000 @@ -1,6 +1,9 @@ audioread ========= +.. image:: https://secure.travis-ci.org/sampsyo/audioread.png + :target: https://travis-ci.org/sampsyo/audioread/ + Decode audio files using whichever backend is available. The library currently supports: @@ -23,7 +26,7 @@ Use the library like so:: with audioread.audio_open(filename) as f: - print f.channels, f.samplerate, f.duration + print(f.channels, f.samplerate, f.duration) for buf in f: do_something(buf) @@ -46,6 +49,10 @@ unsupported by the backends; if the file doesn't exist, a standard ``IOError`` will be raised. +Audioread is "universal" and supports both Python 2 (2.6+) and Python 3 +(3.2+). The GStreamer backend currently only supports 2.x since gst-python is +2.x-only. + Future Work ----------- @@ -63,6 +70,12 @@ Version History --------------- +1.0.3 + Use the rawread (standard-library) backend for .wav files. + +1.0.2 + Send SIGKILL, not SIGTERM, to ffmpeg processes to avoid occasional hangs. + 1.0.1 When GStreamer fails to report a duration, raise an exception instead of silently setting the duration field to None. diff -Nru audioread-1.0.1/setup.py audioread-1.0.3/setup.py --- audioread-1.0.1/setup.py 2013-04-24 17:07:42.000000000 +0000 +++ audioread-1.0.3/setup.py 2014-05-27 00:46:31.000000000 +0000 @@ -20,7 +20,7 @@ return open(path).read() setup(name='audioread', - version='1.0.1', + version='1.0.3', description='multi-library, cross-platform audio decoding', author='Adrian Sampson', author_email='adrian@radbox.org', @@ -40,5 +40,6 @@ 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.2', 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', ], )