diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/0001-remove-sphinxcontrib.googleanalytics.patch | 27 | ||||
-rw-r--r-- | debian/patches/0002-enable-Sphinx-html_copy_source.patch | 28 | ||||
-rw-r--r-- | debian/patches/0003-Use-python3-shebang-on-examples.patch | 41 | ||||
-rw-r--r-- | debian/patches/0004-Avoid-writing-bytes-to-stdout.patch | 29 | ||||
-rw-r--r-- | debian/patches/series | 4 |
5 files changed, 129 insertions, 0 deletions
diff --git a/debian/patches/0001-remove-sphinxcontrib.googleanalytics.patch b/debian/patches/0001-remove-sphinxcontrib.googleanalytics.patch new file mode 100644 index 0000000..1bfe452 --- /dev/null +++ b/debian/patches/0001-remove-sphinxcontrib.googleanalytics.patch @@ -0,0 +1,27 @@ +From: Carl Suster <carl@contraflo.ws> +Date: Sat, 7 Jan 2017 13:04:55 +1100 +Subject: remove sphinxcontrib.googleanalytics + +Disable Google Analytics extension for building the documentation with +Sphinx. + +Forwarded: no +--- + docs/conf.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/docs/conf.py b/docs/conf.py +index fb33f09..7580d0c 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -42,8 +42,8 @@ extlinks = {'github': ('https://github.com/robpol86/{0}/blob/v{1}/%s'.format(pro + + + # google analytics +-extensions.append('sphinxcontrib.googleanalytics') +-googleanalytics_id = 'UA-82627369-1' ++# extensions.append('sphinxcontrib.googleanalytics') ++# googleanalytics_id = 'UA-82627369-1' + + + # SCVersioning. diff --git a/debian/patches/0002-enable-Sphinx-html_copy_source.patch b/debian/patches/0002-enable-Sphinx-html_copy_source.patch new file mode 100644 index 0000000..29066db --- /dev/null +++ b/debian/patches/0002-enable-Sphinx-html_copy_source.patch @@ -0,0 +1,28 @@ +From: Carl Suster <carl@contraflo.ws> +Date: Sat, 7 Jan 2017 14:39:14 +1100 +Subject: enable Sphinx html_copy_source + +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. + +Forwarded: no +--- + docs/conf.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/docs/conf.py b/docs/conf.py +index 7580d0c..12ab980 100644 +--- a/docs/conf.py ++++ b/docs/conf.py +@@ -26,7 +26,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 new file mode 100644 index 0000000..1547032 --- /dev/null +++ b/debian/patches/0003-Use-python3-shebang-on-examples.patch @@ -0,0 +1,41 @@ +From: Carl Suster <carl@contraflo.ws> +Date: Fri, 1 Dec 2017 22:20:39 +1100 +Subject: Use python3 shebang on examples + +Forwarded: no +--- + example1.py | 2 +- + example2.py | 2 +- + example3.py | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/example1.py b/example1.py +index daf1fbf..d0e383f 100755 +--- a/example1.py ++++ b/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 --git a/example2.py b/example2.py +index 51644f8..63b6c2d 100755 +--- a/example2.py ++++ b/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 --git a/example3.py b/example3.py +index bec5500..ef6e96a 100755 +--- a/example3.py ++++ b/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 new file mode 100644 index 0000000..70690cb --- /dev/null +++ b/debian/patches/0004-Avoid-writing-bytes-to-stdout.patch @@ -0,0 +1,29 @@ +From: Carl Suster <carl@contraflo.ws> +Date: Tue, 12 Nov 2019 14:08:30 +1100 +Subject: 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. + +Forwarded: https://github.com/Robpol86/terminaltables/pull/71 +--- + terminaltables/terminal_io.py | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +diff --git a/terminaltables/terminal_io.py b/terminaltables/terminal_io.py +index 8b8c10d..005da1b 100644 +--- a/terminaltables/terminal_io.py ++++ b/terminaltables/terminal_io.py +@@ -94,5 +94,10 @@ def set_terminal_title(title, kernel32=None): + 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 new file mode 100644 index 0000000..62e718a --- /dev/null +++ b/debian/patches/series @@ -0,0 +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 |