From a15f7aad5df29a780dde442155e29b940f671ce2 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 16 Sep 2022 16:20:52 +0200 Subject: Renumbering patches. Signed-off-by: Daniel Baumann --- ...0001-remove-sphinxcontrib.googleanalytics.patch | 18 ------------- .../0002-enable-Sphinx-html_copy_source.patch | 20 --------------- .../0003-Use-python3-shebang-on-examples.patch | 30 ---------------------- .../0004-Avoid-writing-bytes-to-stdout.patch | 21 --------------- debian/patches/debian/0001-google-analytics.patch | 18 +++++++++++++ debian/patches/debian/0002-html-output.patch | 20 +++++++++++++++ debian/patches/debian/0003-python-shebang.patch | 30 ++++++++++++++++++++++ debian/patches/debian/0004-quiet-stdout.patch | 21 +++++++++++++++ debian/patches/series | 8 +++--- 9 files changed, 93 insertions(+), 93 deletions(-) delete mode 100644 debian/patches/0001-remove-sphinxcontrib.googleanalytics.patch delete mode 100644 debian/patches/0002-enable-Sphinx-html_copy_source.patch delete mode 100644 debian/patches/0003-Use-python3-shebang-on-examples.patch delete mode 100644 debian/patches/0004-Avoid-writing-bytes-to-stdout.patch create mode 100644 debian/patches/debian/0001-google-analytics.patch create mode 100644 debian/patches/debian/0002-html-output.patch create mode 100644 debian/patches/debian/0003-python-shebang.patch create mode 100644 debian/patches/debian/0004-quiet-stdout.patch diff --git a/debian/patches/0001-remove-sphinxcontrib.googleanalytics.patch b/debian/patches/0001-remove-sphinxcontrib.googleanalytics.patch deleted file mode 100644 index 9efaacd..0000000 --- a/debian/patches/0001-remove-sphinxcontrib.googleanalytics.patch +++ /dev/null @@ -1,18 +0,0 @@ -Author: Carl Suster -Description: Disable Google Analytics extension for building the documentation with Sphinx. - -diff -Naurp terminaltables.orig/docs/conf.py terminaltables/docs/conf.py ---- terminaltables.orig/docs/conf.py -+++ terminaltables/docs/conf.py -@@ -42,11 +42,6 @@ extensions.append('sphinx.ext.extlinks') - extlinks = {'github': ('https://github.com/robpol86/{0}/blob/v{1}/%s'.format(project, version), '')} - - --# google analytics --extensions.append('sphinxcontrib.googleanalytics') --googleanalytics_id = 'UA-82627369-1' -- -- - # SCVersioning. - scv_banner_greatest_tag = True - scv_grm_exclude = ('.gitignore', '.nojekyll', 'README.rst') diff --git a/debian/patches/0002-enable-Sphinx-html_copy_source.patch b/debian/patches/0002-enable-Sphinx-html_copy_source.patch deleted file mode 100644 index e703d32..0000000 --- a/debian/patches/0002-enable-Sphinx-html_copy_source.patch +++ /dev/null @@ -1,20 +0,0 @@ -Author: Carl Suster -Description: - We would like for the HTML source files to be installed, and they are - needed for the search page. In theory this could be done by passing an - argument `-Dhtml_copy_source=1` in debian/rules, however this causes - HAS_SOURCE to be equal to 1 instead of True so dh_sphinxdoc fails with a - "doesn't look like a Sphinc search page" error. - -diff -Naurp terminaltables.orig/docs/conf.py terminaltables/docs/conf.py ---- terminaltables.orig/docs/conf.py -+++ terminaltables/docs/conf.py -@@ -27,7 +27,7 @@ html_context = dict( - github_version=os.environ.get('TRAVIS_BRANCH', 'master'), - source_suffix='.rst', - ) --html_copy_source = False -+html_copy_source = True - html_favicon = 'favicon.ico' - html_theme = 'sphinx_rtd_theme' - html_title = project diff --git a/debian/patches/0003-Use-python3-shebang-on-examples.patch b/debian/patches/0003-Use-python3-shebang-on-examples.patch deleted file mode 100644 index 8805031..0000000 --- a/debian/patches/0003-Use-python3-shebang-on-examples.patch +++ /dev/null @@ -1,30 +0,0 @@ -Author: Carl Suster -Description: Use python3 shebang on examples. - -diff -Naurp terminaltables.orig/example1.py terminaltables/example1.py ---- terminaltables.orig/example1.py -+++ terminaltables/example1.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - """Simple example usage of terminaltables without any other dependencies. - - Just prints sample text and exits. -diff -Naurp terminaltables.orig/example2.py terminaltables/example2.py ---- terminaltables.orig/example2.py -+++ terminaltables/example2.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - """Example usage of terminaltables with colorclass. - - Just prints sample text and exits. -diff -Naurp terminaltables.orig/example3.py terminaltables/example3.py ---- terminaltables.orig/example3.py -+++ terminaltables/example3.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/python3 - """Simple example usage of terminaltables and column_max_width(). - - Just prints sample text and exits. diff --git a/debian/patches/0004-Avoid-writing-bytes-to-stdout.patch b/debian/patches/0004-Avoid-writing-bytes-to-stdout.patch deleted file mode 100644 index cf36463..0000000 --- a/debian/patches/0004-Avoid-writing-bytes-to-stdout.patch +++ /dev/null @@ -1,21 +0,0 @@ -Author: Carl Suster -Description: Avoid writing bytes to stdout - In Python 3, bytes should be written to the underlying buffer object - rather than directly to stdout. This was causing legitimate test - failures. - -diff -Naurp terminaltables.orig/terminaltables/terminal_io.py terminaltables/terminaltables/terminal_io.py ---- terminaltables.orig/terminaltables/terminal_io.py -+++ terminaltables/terminaltables/terminal_io.py -@@ -94,5 +94,10 @@ def set_terminal_title(title, kernel32=N - return kernel32.SetConsoleTitleW(title) != 0 - - # Linux/OSX. -- sys.stdout.write(b'\033]0;' + title_bytes + b'\007') -+ set_title = b'\033]0;' + title_bytes + b'\007' -+ if hasattr(sys.stdout, 'buffer'): -+ sys.stdout.buffer.write(set_title) -+ else: -+ text = set_title.decode(sys.stdout.encoding, 'strict') -+ sys.stdout.write(text) - return True diff --git a/debian/patches/debian/0001-google-analytics.patch b/debian/patches/debian/0001-google-analytics.patch new file mode 100644 index 0000000..9efaacd --- /dev/null +++ b/debian/patches/debian/0001-google-analytics.patch @@ -0,0 +1,18 @@ +Author: Carl Suster +Description: Disable Google Analytics extension for building the documentation with Sphinx. + +diff -Naurp terminaltables.orig/docs/conf.py terminaltables/docs/conf.py +--- terminaltables.orig/docs/conf.py ++++ terminaltables/docs/conf.py +@@ -42,11 +42,6 @@ extensions.append('sphinx.ext.extlinks') + extlinks = {'github': ('https://github.com/robpol86/{0}/blob/v{1}/%s'.format(project, version), '')} + + +-# google analytics +-extensions.append('sphinxcontrib.googleanalytics') +-googleanalytics_id = 'UA-82627369-1' +- +- + # SCVersioning. + scv_banner_greatest_tag = True + scv_grm_exclude = ('.gitignore', '.nojekyll', 'README.rst') diff --git a/debian/patches/debian/0002-html-output.patch b/debian/patches/debian/0002-html-output.patch new file mode 100644 index 0000000..e703d32 --- /dev/null +++ b/debian/patches/debian/0002-html-output.patch @@ -0,0 +1,20 @@ +Author: Carl Suster +Description: + We would like for the HTML source files to be installed, and they are + needed for the search page. In theory this could be done by passing an + argument `-Dhtml_copy_source=1` in debian/rules, however this causes + HAS_SOURCE to be equal to 1 instead of True so dh_sphinxdoc fails with a + "doesn't look like a Sphinc search page" error. + +diff -Naurp terminaltables.orig/docs/conf.py terminaltables/docs/conf.py +--- terminaltables.orig/docs/conf.py ++++ terminaltables/docs/conf.py +@@ -27,7 +27,7 @@ html_context = dict( + github_version=os.environ.get('TRAVIS_BRANCH', 'master'), + source_suffix='.rst', + ) +-html_copy_source = False ++html_copy_source = True + html_favicon = 'favicon.ico' + html_theme = 'sphinx_rtd_theme' + html_title = project diff --git a/debian/patches/debian/0003-python-shebang.patch b/debian/patches/debian/0003-python-shebang.patch new file mode 100644 index 0000000..8805031 --- /dev/null +++ b/debian/patches/debian/0003-python-shebang.patch @@ -0,0 +1,30 @@ +Author: Carl Suster +Description: Use python3 shebang on examples. + +diff -Naurp terminaltables.orig/example1.py terminaltables/example1.py +--- terminaltables.orig/example1.py ++++ terminaltables/example1.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + """Simple example usage of terminaltables without any other dependencies. + + Just prints sample text and exits. +diff -Naurp terminaltables.orig/example2.py terminaltables/example2.py +--- terminaltables.orig/example2.py ++++ terminaltables/example2.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + """Example usage of terminaltables with colorclass. + + Just prints sample text and exits. +diff -Naurp terminaltables.orig/example3.py terminaltables/example3.py +--- terminaltables.orig/example3.py ++++ terminaltables/example3.py +@@ -1,4 +1,4 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + """Simple example usage of terminaltables and column_max_width(). + + Just prints sample text and exits. diff --git a/debian/patches/debian/0004-quiet-stdout.patch b/debian/patches/debian/0004-quiet-stdout.patch new file mode 100644 index 0000000..cf36463 --- /dev/null +++ b/debian/patches/debian/0004-quiet-stdout.patch @@ -0,0 +1,21 @@ +Author: Carl Suster +Description: Avoid writing bytes to stdout + In Python 3, bytes should be written to the underlying buffer object + rather than directly to stdout. This was causing legitimate test + failures. + +diff -Naurp terminaltables.orig/terminaltables/terminal_io.py terminaltables/terminaltables/terminal_io.py +--- terminaltables.orig/terminaltables/terminal_io.py ++++ terminaltables/terminaltables/terminal_io.py +@@ -94,5 +94,10 @@ def set_terminal_title(title, kernel32=N + return kernel32.SetConsoleTitleW(title) != 0 + + # Linux/OSX. +- sys.stdout.write(b'\033]0;' + title_bytes + b'\007') ++ set_title = b'\033]0;' + title_bytes + b'\007' ++ if hasattr(sys.stdout, 'buffer'): ++ sys.stdout.buffer.write(set_title) ++ else: ++ text = set_title.decode(sys.stdout.encoding, 'strict') ++ sys.stdout.write(text) + return True diff --git a/debian/patches/series b/debian/patches/series index 62e718a..00072e4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,4 +1,4 @@ -0001-remove-sphinxcontrib.googleanalytics.patch -0002-enable-Sphinx-html_copy_source.patch -0003-Use-python3-shebang-on-examples.patch -0004-Avoid-writing-bytes-to-stdout.patch +debian/0001-google-analytics.patch +debian/0002-html-output.patch +debian/0003-python-shebang.patch +debian/0004-quiet-stdout.patch -- cgit v1.2.3