From 102ebe939d9939978d6a57a421115759c1016f23 Mon Sep 17 00:00:00 2001 From: Stephen McConnel Date: Mon, 20 Apr 2020 16:00:26 -0600 Subject: [PATCH] Add package for python3-aeneas Also fix spurious warning messages that occur for at least python 3.8. --- aeneas/diagnostics.py | 4 ++-- aeneas/tools/abstract_cli_program.py | 4 ++-- debian/changelog | 7 +++++++ debian/compat | 2 +- debian/control | 20 +++++++++++++++++--- debian/copyright | 2 +- debian/{install => python-aeneas.install} | 0 debian/python-aeneas.lintian-overrides | 2 ++ debian/python3-aeneas.install | 3 +++ debian/python3-aeneas.lintian-overrides | 2 ++ debian/rules | 4 +++- docs/source/changelog.rst | 4 +++- 12 files changed, 43 insertions(+), 11 deletions(-) rename debian/{install => python-aeneas.install} (100%) create mode 100644 debian/python-aeneas.lintian-overrides create mode 100644 debian/python3-aeneas.install create mode 100644 debian/python3-aeneas.lintian-overrides diff --git a/aeneas/diagnostics.py b/aeneas/diagnostics.py index 7d9e98a1..6f4e291f 100644 --- a/aeneas/diagnostics.py +++ b/aeneas/diagnostics.py @@ -56,9 +56,9 @@ def check_shell_encoding(cls): """ is_in_utf8 = True is_out_utf8 = True - if sys.stdin.encoding not in ["UTF-8", "UTF8"]: + if sys.stdin.encoding not in ["UTF-8", "UTF8", "utf-8", "utf8"]: is_in_utf8 = False - if sys.stdout.encoding not in ["UTF-8", "UTF8"]: + if sys.stdout.encoding not in ["UTF-8", "UTF8", "utf-8", "utf8"]: is_out_utf8 = False if (is_in_utf8) and (is_out_utf8): gf.print_success(u"shell encoding OK") diff --git a/aeneas/tools/abstract_cli_program.py b/aeneas/tools/abstract_cli_program.py index be5bb2fa..b5b9fadd 100644 --- a/aeneas/tools/abstract_cli_program.py +++ b/aeneas/tools/abstract_cli_program.py @@ -295,10 +295,10 @@ def run(self, arguments, show_help=True): if self.use_sys: # check that sys.stdin.encoding and sys.stdout.encoding are set to utf-8 if not gf.FROZEN: - if sys.stdin.encoding not in ["UTF-8", "UTF8"]: + if sys.stdin.encoding not in ["UTF-8", "UTF8", "utf-8", "utf8"]: self.print_warning(u"The default input encoding is not UTF-8.") self.print_warning(u"You might want to set 'PYTHONIOENCODING=UTF-8' in your shell.") - if sys.stdout.encoding not in ["UTF-8", "UTF8"]: + if sys.stdout.encoding not in ["UTF-8", "UTF8", "utf-8", "utf8"]: self.print_warning(u"The default output encoding is not UTF-8.") self.print_warning(u"You might want to set 'PYTHONIOENCODING=UTF-8' in your shell.") # decode using sys.stdin.encoding diff --git a/debian/changelog b/debian/changelog index dce85a6e..cba510b3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +aeneas (1.7.4) stable; urgency=medium + + * Fix spurious warnings about "encoding is not UTF-8" when encoding is "utf-8" + * Add debian packaging for python3-aeneas + + -- Stephen McConnel Thu, 02 Apr 2020 16:45:00 -0600 + aeneas (1.7.1) stable; urgency=medium * Fix bug #151 diff --git a/debian/compat b/debian/compat index 7f8f011e..ec635144 100644 --- a/debian/compat +++ b/debian/compat @@ -1 +1 @@ -7 +9 diff --git a/debian/control b/debian/control index 6564c39c..53773e8a 100644 --- a/debian/control +++ b/debian/control @@ -1,6 +1,5 @@ Source: aeneas Section: python -X-Python-Version: >= 2.7 Priority: optional Maintainer: Alberto Pettarin Build-Depends: debhelper (>= 9.0.0), @@ -8,14 +7,29 @@ Build-Depends: debhelper (>= 9.0.0), python-all-dev, python-setuptools, python-numpy, python-lxml, python-bs4, + python3-all-dev, + python3-setuptools, + python3-numpy, python3-lxml, python3-bs4, libasound2-dev, libsndfile1-dev, libespeak-dev -Standards-Version: 3.9.5 +Standards-Version: 4.1.4 Homepage: https://github.com/readbeyond/aeneas Package: python-aeneas Architecture: any -Depends: ${misc:Depends}, ${python:Depends}, +Depends: ${misc:Depends}, ${python:Depends}, ${shlibs:Depends}, espeak, espeak-data, libespeak1, vorbis-tools, ffmpeg, flac +Replaces: python3-aeneas +Description: Python library to automagically synchronize audio and text + aeneas automatically generates a synchronization map between a list of + text fragments and an audio file containing the narration of the text. + In computer science this task is known as (automatically computing a) + forced alignment. + +Package: python3-aeneas +Architecture: any +Depends: ${misc:Depends}, ${python3:Depends}, ${shlibs:Depends}, + espeak, espeak-data, libespeak1, vorbis-tools, ffmpeg, flac +Replaces: python-aeneas Description: Python library to automagically synchronize audio and text aeneas automatically generates a synchronization map between a list of text fragments and an audio file containing the narration of the text. diff --git a/debian/copyright b/debian/copyright index ce03b7f7..33175ec9 100644 --- a/debian/copyright +++ b/debian/copyright @@ -4,7 +4,7 @@ Files: * Copyright: 2012-2013, Alberto Pettarin (www.albertopettarin.it) 2013-2015, ReadBeyond Srl (www.readbeyond.it) 2015-2018, Alberto Pettarin (www.albertopettarin.it) -License: AGPLv3 +License: AGPLv3-only The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software. diff --git a/debian/install b/debian/python-aeneas.install similarity index 100% rename from debian/install rename to debian/python-aeneas.install diff --git a/debian/python-aeneas.lintian-overrides b/debian/python-aeneas.lintian-overrides new file mode 100644 index 00000000..d181bd15 --- /dev/null +++ b/debian/python-aeneas.lintian-overrides @@ -0,0 +1,2 @@ +python-aeneas: binary-without-manpage +python-aeneas: debian-changelog-file-contains-invalid-email-address diff --git a/debian/python3-aeneas.install b/debian/python3-aeneas.install new file mode 100644 index 00000000..2acdc06c --- /dev/null +++ b/debian/python3-aeneas.install @@ -0,0 +1,3 @@ +aeneas_check_setup.py /usr/share/python3-aeneas +VERSION /usr/share/python3-aeneas +aeneas/tools/res/audio.mp3 /usr/share/python3-aeneas/aeneas/tools/res diff --git a/debian/python3-aeneas.lintian-overrides b/debian/python3-aeneas.lintian-overrides new file mode 100644 index 00000000..6fda14af --- /dev/null +++ b/debian/python3-aeneas.lintian-overrides @@ -0,0 +1,2 @@ +python3-aeneas: binary-without-manpage +python3-aeneas: debian-changelog-file-contains-invalid-email-address diff --git a/debian/rules b/debian/rules index d0c10cef..0ab4b2f6 100755 --- a/debian/rules +++ b/debian/rules @@ -3,5 +3,7 @@ export PYBUILD_NAME=aeneas %: - dh $@ --with python2 --buildsystem=pybuild + dh $@ --with python2,python3 --buildsystem=pybuild +override_dh_shlibdeps: + dh_shlibdeps && dh_numpy && dh_numpy3 diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index 39f669c8..8304d225 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -1,7 +1,7 @@ Changelog ========= -v1.7.4 (2018-05-??) +v1.7.4 (2020-05-??) ------------------- #. Fixed bug #203 (support for macOS TTS) @@ -11,6 +11,8 @@ v1.7.4 (2018-05-??) #. Updated copyright strings with 2018 #. Updated acknowledgements #. Added Travis CI (Linux, macOS) +#. Fixed spurious warnings about not using UTF-8 when "utf-8" is seen +#. Added debian packaging for python3-aeneas v1.7.3 (2017-03-15) -------------------