From 6433dc31be1a538ed448198bfa31071a01acb1d2 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Tue, 6 Dec 2022 08:19:25 -0500 Subject: [PATCH 1/5] python-b2sdk: rename to python3-b2sdk This package no longer reverts a later version, so this package can match the expected nomenclature. --- srcpkgs/python-b2sdk | 1 + .../patches/lazy-fixture.patch | 0 .../patches/setuptools_scm.patch | 0 srcpkgs/{python-b2sdk => python3-b2sdk}/template | 15 +++++++++++---- srcpkgs/{python-b2sdk => python3-b2sdk}/update | 0 5 files changed, 12 insertions(+), 4 deletions(-) create mode 120000 srcpkgs/python-b2sdk rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/lazy-fixture.patch (100%) rename srcpkgs/{python-b2sdk => python3-b2sdk}/patches/setuptools_scm.patch (100%) rename srcpkgs/{python-b2sdk => python3-b2sdk}/template (71%) rename srcpkgs/{python-b2sdk => python3-b2sdk}/update (100%) diff --git a/srcpkgs/python-b2sdk b/srcpkgs/python-b2sdk new file mode 120000 index 000000000000..3eb37f21757b --- /dev/null +++ b/srcpkgs/python-b2sdk @@ -0,0 +1 @@ +python3-b2sdk \ No newline at end of file diff --git a/srcpkgs/python-b2sdk/patches/lazy-fixture.patch b/srcpkgs/python3-b2sdk/patches/lazy-fixture.patch similarity index 100% rename from srcpkgs/python-b2sdk/patches/lazy-fixture.patch rename to srcpkgs/python3-b2sdk/patches/lazy-fixture.patch diff --git a/srcpkgs/python-b2sdk/patches/setuptools_scm.patch b/srcpkgs/python3-b2sdk/patches/setuptools_scm.patch similarity index 100% rename from srcpkgs/python-b2sdk/patches/setuptools_scm.patch rename to srcpkgs/python3-b2sdk/patches/setuptools_scm.patch diff --git a/srcpkgs/python-b2sdk/template b/srcpkgs/python3-b2sdk/template similarity index 71% rename from srcpkgs/python-b2sdk/template rename to srcpkgs/python3-b2sdk/template index 58101fd48579..f0da74a3ea97 100644 --- a/srcpkgs/python-b2sdk/template +++ b/srcpkgs/python3-b2sdk/template @@ -1,8 +1,7 @@ -# Template file for 'python-b2sdk' -# keep python-b2sdk name to revert this package -pkgname=python-b2sdk +# Template file for 'python3-b2sdk' +pkgname=python3-b2sdk version=1.18.0 -revision=2 +revision=3 build_style=python3-pep517 make_install_target="dist/b2sdk-${version}-*-*-*.whl" hostmakedepends="python3-setuptools_scm python3-wheel" @@ -15,8 +14,16 @@ license="MIT" homepage="https://pypi.org/project/b2sdk" distfiles="${PYPI_SITE}/b/b2sdk/b2sdk-${version}.tar.gz" checksum=9272f28d18d498b66d33d749a0f05e49d9bb1a9134f94261c0b8bfa1b56f3eec +replaces="python-b2sdk>=0" +# Tests require an application key make_check=no post_install() { vlicense LICENSE } + +python-b2sdk_package() { + build_style=meta + depends="${sourcepkg}>=${version}_${revision}" + short_desc+=" - transitional package" +} diff --git a/srcpkgs/python-b2sdk/update b/srcpkgs/python3-b2sdk/update similarity index 100% rename from srcpkgs/python-b2sdk/update rename to srcpkgs/python3-b2sdk/update From aa9c55a75e485d8cbda53a503568eb269e25c485 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Tue, 6 Dec 2022 09:28:45 -0500 Subject: [PATCH 2/5] New package: python3-rst2ansi-0.1.5 --- .../python3-rst2ansi/patches/table-fix.patch | 31 +++++++++++++++++++ .../python3-rst2ansi/patches/unicode.patch | 25 +++++++++++++++ srcpkgs/python3-rst2ansi/template | 23 ++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 srcpkgs/python3-rst2ansi/patches/table-fix.patch create mode 100644 srcpkgs/python3-rst2ansi/patches/unicode.patch create mode 100644 srcpkgs/python3-rst2ansi/template diff --git a/srcpkgs/python3-rst2ansi/patches/table-fix.patch b/srcpkgs/python3-rst2ansi/patches/table-fix.patch new file mode 100644 index 000000000000..61e28098c7cd --- /dev/null +++ b/srcpkgs/python3-rst2ansi/patches/table-fix.patch @@ -0,0 +1,31 @@ +From 1b1b963804bcc87a7187d07c3943585d9385ea92 Mon Sep 17 00:00:00 2001 +From: Jakub Wilk +Date: Thu, 14 Jul 2016 13:39:31 +0200 +Subject: [PATCH 1/2] Fix name error + +--- + rst2ansi/table.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/rst2ansi/table.py b/rst2ansi/table.py +index 389eb38..9f867a5 100644 +--- a/rst2ansi/table.py ++++ b/rst2ansi/table.py +@@ -91,7 +91,7 @@ def noop(*args, **kwargs): + + def visit_table(self, node): + if self.level > 0: +- raise SkipChildren ++ raise nodes.SkipChildren + self.level += 1 + + def depart_table(self, node): +@@ -197,7 +197,7 @@ def _draw_rule(self): + + def visit_table(self, node): + if self.level > 0: +- raise SkipChildren ++ raise nodes.SkipChildren + self.level += 1 + self._draw_rule() + diff --git a/srcpkgs/python3-rst2ansi/patches/unicode.patch b/srcpkgs/python3-rst2ansi/patches/unicode.patch new file mode 100644 index 000000000000..591eb0704234 --- /dev/null +++ b/srcpkgs/python3-rst2ansi/patches/unicode.patch @@ -0,0 +1,25 @@ +From c6f390b45be689a5760060c990e3fe10f502e671 Mon Sep 17 00:00:00 2001 +From: "Franklin \"Snaipe\" Mathieu" +Date: Mon, 25 Jan 2021 18:06:51 +0100 +Subject: [PATCH 2/2] api: fix AttributeError on decode when feeding unicode + strings in python3 + +Fixes #12, #13 +--- + rst2ansi/__init__.py | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/rst2ansi/__init__.py b/rst2ansi/__init__.py +index f0665f4..0ea9a97 100644 +--- a/rst2ansi/__init__.py ++++ b/rst2ansi/__init__.py +@@ -45,5 +45,8 @@ def style_role(name, rawtext, text, lineno, inliner, options={}, content=[]): + for style in STYLES: + roles.register_local_role('ansi-' + style, style_role) + +- out = core.publish_string(input_string.decode('utf-8'), settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf'))) ++ if hasattr(input_string, 'decode'): ++ input_string = input_string.decode('utf-8') ++ ++ out = core.publish_string(input_string, settings_overrides=overrides, writer=Writer(unicode=output_encoding.startswith('utf'))) + return out.decode(output_encoding) diff --git a/srcpkgs/python3-rst2ansi/template b/srcpkgs/python3-rst2ansi/template new file mode 100644 index 000000000000..31734232678f --- /dev/null +++ b/srcpkgs/python3-rst2ansi/template @@ -0,0 +1,23 @@ +# Template file for 'python3-rst2ansi' +pkgname=python3-rst2ansi +version=0.1.5 +revision=1 +build_style=python3-module +hostmakedepends="python3-setuptools" +depends="python3-docutils" +short_desc="Python utility for rendering RST in the terminal" +maintainer="Andrew J. Hesford " +license="MIT" +homepage="https://github.com/Snaipe/python-rst2ansi" +distfiles=" + ${PYPI_SITE}/r/rst2ansi/rst2ansi-${version}.tar.gz + https://raw.githubusercontent.com/Snaipe/python-rst2ansi/v${version}/LICENSE +" +checksum="1b17fb9a628d40f57933ad1a3aa952346444be069469508e73e95060da33fe6f + f9e900cbd36e32459517036a0e55e437c6311dca5eee1a9086df9f525e94d8c0" +make_check=no # package defines no tests +skip_extraction="LICENSE" + +post_install() { + vlicense "${XBPS_SRCDISTDIR}/${sourcepkg}-${version}/LICENSE" +} From 7cb7960b3b2bb3acd869d63661b21a2695c37ff5 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Tue, 6 Dec 2022 11:51:56 -0500 Subject: [PATCH 3/5] python3-docutils: update to 0.19. --- srcpkgs/python3-docutils/template | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/srcpkgs/python3-docutils/template b/srcpkgs/python3-docutils/template index 9d322219faf7..d36b578c1000 100644 --- a/srcpkgs/python3-docutils/template +++ b/srcpkgs/python3-docutils/template @@ -1,7 +1,7 @@ # Template file for 'python3-docutils' pkgname=python3-docutils -version=0.18.1 -revision=2 +version=0.19 +revision=1 build_style=python3-module hostmakedepends="python3-setuptools" # docutils/writers/odf_odt/pygmentsformatter.py @@ -12,7 +12,7 @@ maintainer="Alessio Sergi " license="Public Domain, BSD-2-Clause, GPL-3.0-or-later, Python-2.0" homepage="http://docutils.sourceforge.net" distfiles="${PYPI_SITE}/d/docutils/docutils-${version}.tar.gz" -checksum=679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06 +checksum=33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6 alternatives=" docutils:rst2html:/usr/bin/rst2html.py From 91394a55a4002c44b46171a76b411b4b847a5e6c Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Tue, 6 Dec 2022 12:20:32 -0500 Subject: [PATCH 4/5] python3-tqdm: update to 4.64.1. --- srcpkgs/python3-tqdm/template | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/srcpkgs/python3-tqdm/template b/srcpkgs/python3-tqdm/template index 66d7346427ec..91cb10685a46 100644 --- a/srcpkgs/python3-tqdm/template +++ b/srcpkgs/python3-tqdm/template @@ -1,16 +1,18 @@ # Template file for 'python3-tqdm' pkgname=python3-tqdm -version=4.48.2 -revision=5 +version=4.64.1 +revision=1 build_style=python3-module -hostmakedepends="python3-setuptools" -depends="python3-setuptools" +hostmakedepends="python3-setuptools_scm" +depends="python3" +checkdepends="python3-pytest-xdist python3-pytest-asyncio + python3-pytest-timeout $depends" short_desc="Fast, extensible progress bar for Python and CLI (Python3)" maintainer="Orphaned " license="MPL-2.0, MIT" homepage="https://tqdm.github.io/" -distfiles="https://github.com/tqdm/tqdm/archive/v${version}.tar.gz" -checksum=91a61673103ae2d5a1b93672ff60455d689b58372c08b1a27e1a7def71dc05a3 +distfiles="${PYPI_SITE}/t/tqdm/tqdm-${version}.tar.gz" +checksum=5f4f682a004951c1b450bc753c710e9280c5746ce6ffedee253ddbcbf54cf1e4 conflicts="python-tqdm>=0" post_install() { From a420a0c7d48f188a93fa576b7455acac3e14eb87 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Tue, 6 Dec 2022 09:43:08 -0500 Subject: [PATCH 5/5] backblaze-b2: update to 3.6.0. Fixes: #37484. --- .../patches/setuptools_scm_version.patch | 13 +++++++++ .../patches/src_last_modified_millis.patch | 12 --------- srcpkgs/backblaze-b2/template | 27 ++++++------------- 3 files changed, 21 insertions(+), 31 deletions(-) create mode 100644 srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch delete mode 100644 srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch diff --git a/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch new file mode 100644 index 000000000000..2038bdb7c72c --- /dev/null +++ b/srcpkgs/backblaze-b2/patches/setuptools_scm_version.patch @@ -0,0 +1,13 @@ +Setup works just fine with the version of setuptools_scm in Void. + +--- a/setup.py ++++ b/setup.py +@@ -111,7 +111,7 @@ + # for example: + # $ pip install -e .[dev,test] + extras_require={'doc': read_requirements('doc')}, +- setup_requires=['setuptools_scm<6.0'], ++ setup_requires=['setuptools_scm'], + use_scm_version=True, + + # If there are data files included in your packages that need to be diff --git a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch b/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch deleted file mode 100644 index 04ec4886fe4a..000000000000 --- a/srcpkgs/backblaze-b2/patches/src_last_modified_millis.patch +++ /dev/null @@ -1,12 +0,0 @@ ---- a/b2/console_tool.py -+++ b/b2/console_tool.py -@@ -28,7 +28,8 @@ from b2sdk.account_info.sqlite_account_i - B2_ACCOUNT_INFO_ENV_VAR, B2_ACCOUNT_INFO_DEFAULT_FILE - ) - from b2sdk.progress import make_progress_listener --from b2sdk.raw_api import MetadataDirectiveMode, SRC_LAST_MODIFIED_MILLIS -+from b2sdk.raw_api import MetadataDirectiveMode -+from b2sdk.http_constants import SRC_LAST_MODIFIED_MILLIS - from b2sdk.version import VERSION as b2sdk_version - from b2sdk.v1 import ( - parse_sync_folder, diff --git a/srcpkgs/backblaze-b2/template b/srcpkgs/backblaze-b2/template index 1552c67ef8e6..47801daa5a18 100644 --- a/srcpkgs/backblaze-b2/template +++ b/srcpkgs/backblaze-b2/template @@ -1,34 +1,23 @@ # Template file for 'backblaze-b2' pkgname=backblaze-b2 -version=2.1.0 -revision=3 +version=3.6.0 +revision=1 build_style=python3-module -hostmakedepends="python3-setuptools" -depends="python3-logfury python3-Arrow python3-requests python3-six - python3-tqdm python-b2sdk python3-phx-class-registry" -checkdepends="python3-pytest $depends python3-pyflakes python3-mock - python3-dateutil" +hostmakedepends="python3-setuptools_scm" +depends="python3-Arrow python3-b2sdk python3-docutils + python3-phx-class-registry python3-rst2ansi python3-tabulate" short_desc="Command Line Interface for Backblaze's B2 storage service" maintainer="Andrea Brancaleoni " license="MIT" homepage="https://github.com/Backblaze/B2_Command_Line_Tool" distfiles="${PYPI_SITE}/b/b2/b2-${version}.tar.gz" -checksum=fdae4aa7c88c7981ae68784600cc820ab8fd591a2ca6dc7af5e6b4d1549c2080 +checksum=a879e751348b635ca772a2231be20c2e835abaf830534e2ab2f1fb75967c0252 replaces="python-b2>=0" -provides="python-b2-${version}_${revision}" - -post_patch() { - # this files is necessary for do_check - # the files is copied directly from its GitHub's repository - cp "$FILESDIR/test_b2_command_line.py" "$wrksrc" -} +make_check=no # tests require unpackaged dependencies post_install() { - # Remove test directory polluting site-packages - rm -rf ${DESTDIR}/usr/lib/python*/site-packages/test - # Avoid conflict with Boost's b2 tool - mv ${DESTDIR}/usr/bin/b2 ${DESTDIR}/usr/bin/backblaze-b2 + mv ${DESTDIR}/usr/bin/b2 ${DESTDIR}/usr/bin/backblaze-b2 vlicense LICENSE }