From 0a8197f8c9a7990de49ba21cacc889ef4cbf7eeb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 16 Sep 2022 11:09:41 +0200 Subject: Adding debian version 3.1.0-4. Signed-off-by: Daniel Baumann --- debian/changelog | 51 ++++++++++++++++++++++ debian/clean | 3 ++ debian/control | 51 ++++++++++++++++++++++ debian/copyright | 30 +++++++++++++ debian/gbp.conf | 7 +++ ...0001-remove-sphinxcontrib.googleanalytics.patch | 27 ++++++++++++ .../0002-enable-Sphinx-html_copy_source.patch | 28 ++++++++++++ .../0003-Use-python3-shebang-on-examples.patch | 41 +++++++++++++++++ .../0004-Avoid-writing-bytes-to-stdout.patch | 29 ++++++++++++ debian/patches/series | 4 ++ debian/python-terminaltables-doc.docs | 1 + debian/python-terminaltables-doc.examples | 3 ++ debian/python-terminaltables-doc.links | 4 ++ debian/python3-terminaltables-doc.doc-base | 12 +++++ debian/rules | 31 +++++++++++++ debian/source/format | 1 + debian/source/options | 1 + debian/upstream/metadata | 4 ++ debian/watch | 4 ++ 19 files changed, 332 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/clean create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/gbp.conf create mode 100644 debian/patches/0001-remove-sphinxcontrib.googleanalytics.patch create mode 100644 debian/patches/0002-enable-Sphinx-html_copy_source.patch create mode 100644 debian/patches/0003-Use-python3-shebang-on-examples.patch create mode 100644 debian/patches/0004-Avoid-writing-bytes-to-stdout.patch create mode 100644 debian/patches/series create mode 100644 debian/python-terminaltables-doc.docs create mode 100644 debian/python-terminaltables-doc.examples create mode 100644 debian/python-terminaltables-doc.links create mode 100644 debian/python3-terminaltables-doc.doc-base create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/source/options create mode 100644 debian/upstream/metadata create mode 100644 debian/watch diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..764cc66 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,51 @@ +terminaltables (3.1.0-4) unstable; urgency=medium + + [ Carl Suster ] + * Remove d/gbp.conf except for branch/tag layout (Closes: #944687). + + [ Debian Janitor ] + * Bump debhelper from old 10 to 12. + * Set upstream metadata fields: Bug-Database, Bug-Submit, Repository, + Repository-Browse. + + [ Ondřej Nový ] + * d/control: Update Maintainer field with new Debian Python Team + contact address. + * d/control: Update Vcs-* fields with new Debian Python Team Salsa + layout. + + -- Sandro Tosi Sat, 04 Jun 2022 21:40:53 -0400 + +terminaltables (3.1.0-3) unstable; urgency=medium + + [ Ondřej Nový ] + * d/control: Set Vcs-* to salsa.debian.org + * d/control: Remove ancient X-Python3-Version field + * Use debhelper-compat instead of debian/compat. + + [ Carl Suster ] + * d/control: Remove accidental build-depend on python-setuptools + (Closes: #943284). + * Add patch to fix stdout writing issue that caused test suite failures. + + -- Carl Suster Tue, 12 Nov 2019 14:30:07 +1100 + +terminaltables (3.1.0-2) unstable; urgency=medium + + * Upload to unstable. + * Bump standards version to 4.1.1, no changes needed. + * Rename doc package from python3-terminaltables-doc to + python-terminaltables-doc. + * Add autopkgtest-pkg-python test suite. + * Switch to python3-sphinx* instead of the py2 versions. + * Migrate from git-dpm to gbp. + * Add patch to correct the shebang lines of examples to python3. + * Install examples in the examples directory as executables. + + -- Carl Suster Sat, 02 Dec 2017 00:52:18 +1100 + +terminaltables (3.1.0-1) experimental; urgency=medium + + * Initial release (Closes: #850093) + + -- Carl Suster Mon, 09 Jan 2017 16:56:28 +1100 diff --git a/debian/clean b/debian/clean new file mode 100644 index 0000000..10ecb87 --- /dev/null +++ b/debian/clean @@ -0,0 +1,3 @@ +*.egg-info/* +.cache/ +debian/upstream-changelog diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..779713e --- /dev/null +++ b/debian/control @@ -0,0 +1,51 @@ +Source: terminaltables +Section: python +Priority: optional +Maintainer: Debian Python Team +Uploaders: Carl Suster +Build-Depends: + debhelper-compat (= 12), + dh-python, + python3-all, + python3-colorama, + python3-colorclass, + python3-pytest, + python3-setuptools, + python3-sphinx, + python3-sphinx-rtd-theme, + python3-termcolor, +Standards-Version: 4.1.1 +Homepage: https://github.com/Robpol86/terminaltables +Vcs-Git: https://salsa.debian.org/python-team/packages/terminaltables.git +Vcs-Browser: https://salsa.debian.org/python-team/packages/terminaltables +Testsuite: autopkgtest-pkg-python + +Package: python3-terminaltables +Architecture: all +Depends: ${python3:Depends}, ${misc:Depends} +Suggests: python3-terminaltables-doc +Description: Python library for printing tables to the console + Easily draw tables in terminal/console applications from a list of lists of + strings. + . + Supports: multi-line rows, table titles, POSIX and Windows, Wide CJK + (Chinese/Japanese/Korean) characters are displayed correctly, RTL Arabic and + Hebrew characters are aligned correctly, alignment and justification. + Colored text is supported through colorclass, colorama, termcolor, or just + plain ANSI escape codes. + . + This package provides the Python 3 module. + +Package: python-terminaltables-doc +Section: doc +Architecture: all +Depends: ${misc:Depends}, ${sphinxdoc:Depends} +Built-Using: ${sphinxdoc:Built-Using} +Recommends: python3-terminaltables +Breaks: python3-terminaltables-doc +Replaces: python3-terminaltables-doc +Description: Documentation for terminaltables table printer + Easily draw tables in terminal/console applications from a list of lists of + strings. + . + This package contains the documentation for terminaltables. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..2bf448e --- /dev/null +++ b/debian/copyright @@ -0,0 +1,30 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: terminaltables +Source: https://github.com/Robpol86/terminaltables + +Files: * +Copyright: 2016 Robpol86 +License: MIT + +Files: debian/* +Copyright: 2017 Carl Suster +License: MIT + +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a + copy of this software and associated documentation files (the "Software"), + to deal in the Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, sublicense, + and/or sell copies of the Software, and to permit persons to whom the + Software is furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included + in all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. + IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY + CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/debian/gbp.conf b/debian/gbp.conf new file mode 100644 index 0000000..e63aaba --- /dev/null +++ b/debian/gbp.conf @@ -0,0 +1,7 @@ +[DEFAULT] +upstream-tree = branch +debian-tag = debian/%(version)s +upstream-branch = upstream +debian-branch = debian/master +distribution = unstable +pristine-tar = True 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 +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 +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 +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 +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 diff --git a/debian/python-terminaltables-doc.docs b/debian/python-terminaltables-doc.docs new file mode 100644 index 0000000..a1320b1 --- /dev/null +++ b/debian/python-terminaltables-doc.docs @@ -0,0 +1 @@ +README.rst diff --git a/debian/python-terminaltables-doc.examples b/debian/python-terminaltables-doc.examples new file mode 100644 index 0000000..445be2c --- /dev/null +++ b/debian/python-terminaltables-doc.examples @@ -0,0 +1,3 @@ +example1.py +example2.py +example3.py diff --git a/debian/python-terminaltables-doc.links b/debian/python-terminaltables-doc.links new file mode 100644 index 0000000..4e97469 --- /dev/null +++ b/debian/python-terminaltables-doc.links @@ -0,0 +1,4 @@ +/usr/share/doc/python-terminaltables-doc/html/_sources/ /usr/share/doc/python-terminaltables-doc/rst +/usr/share/doc/python-terminaltables-doc/html/_sources/ /usr/share/doc/python3-terminaltables/rst +/usr/share/doc/python-terminaltables-doc/html /usr/share/doc/python3-terminaltables/html +/usr/share/doc/python-terminaltables-doc/examples /usr/share/doc/python3-terminaltables/examples diff --git a/debian/python3-terminaltables-doc.doc-base b/debian/python3-terminaltables-doc.doc-base new file mode 100644 index 0000000..1053018 --- /dev/null +++ b/debian/python3-terminaltables-doc.doc-base @@ -0,0 +1,12 @@ +Document: terminaltables +Title: Debian terminaltables Manual +Author: Robpol86 +Abstract: This manual describes terminaltables - a Python table printer +Section: Programming/Python + +Format: text +Files: /usr/share/doc/python3-terminaltables-doc/rst/*.txt + +Format: HTML +Index: /usr/share/doc/python3-terminaltables-doc/html/index.html +Files: /usr/share/doc/python3-terminaltables-doc/html/*.html diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..a3dbe71 --- /dev/null +++ b/debian/rules @@ -0,0 +1,31 @@ +#!/usr/bin/make -f +#export DH_VERBOSE = 1 + +export PYBUILD_NAME=terminaltables + +export PYBUILD_BEFORE_TEST=cp example*.py {build_dir} +export PYBUILD_AFTER_TEST=rm {build_dir}/example*.py + +%: + dh $@ --with python3,sphinxdoc --buildsystem pybuild + +override_dh_sphinxdoc: export http_proxy=127.0.0.1:9 +override_dh_sphinxdoc: export https_proxy=127.0.0.1:9 +override_dh_sphinxdoc: +ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) + PYTHONPATH=. /usr/share/sphinx/scripts/python3/sphinx-build -N -q -E -b html docs/ debian/python-terminaltables-doc/usr/share/doc/python-terminaltables-doc/html/ + dh_sphinxdoc +endif + +override_dh_compress: + dh_compress -X example1.py -X example2.py -X example3.py -X html/ + +override_dh_installchangelogs: + # Trim the changelog section out of the README file. Note that this will + # hang if the changelog-section-{start,end} strings don't appear exactly as + # they are in the README file. + python3 -c "with open('README.rst', encoding='utf-8') as r: print(''.join( \ + ['' for x in iter(r.readline, '.. changelog-section-start\n')] + \ + [x for x in iter(r.readline, '.. changelog-section-end\n')]))" \ + > debian/upstream-changelog + dh_installchangelogs debian/upstream-changelog 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..b2b7b88 --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +extend-diff-ignore="^[^/]+\.egg-info/" diff --git a/debian/upstream/metadata b/debian/upstream/metadata new file mode 100644 index 0000000..a3e01b5 --- /dev/null +++ b/debian/upstream/metadata @@ -0,0 +1,4 @@ +Bug-Database: https://github.com/Robpol86/terminaltables/issues +Bug-Submit: https://github.com/Robpol86/terminaltables/issues/new +Repository: https://github.com/Robpol86/terminaltables.git +Repository-Browse: https://github.com/Robpol86/terminaltables diff --git a/debian/watch b/debian/watch new file mode 100644 index 0000000..d5156e4 --- /dev/null +++ b/debian/watch @@ -0,0 +1,4 @@ +version=3 + +opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/colorclass-$1\.tar\.gz/ \ + https://github.com/Robpol86/terminaltables/releases .*/v?(\d\S*)\.tar\.gz -- cgit v1.2.3