Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] backblaze-b2: update to 3.6.0
@ 2022-12-06 14:47 ahesford
  2022-12-06 16:24 ` [PR PATCH] [Updated] " ahesford
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: ahesford @ 2022-12-06 14:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 401 bytes --]

There is a new pull request by ahesford against master on the void-packages repository

https://github.com/ahesford/void-packages backblaze
https://github.com/void-linux/void-packages/pull/40928

backblaze-b2: update to 3.6.0
#### Testing the changes
- I tested the changes in this PR: **NO**

@kartikynwa 

A patch file from https://github.com/void-linux/void-packages/pull/40928.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-backblaze-40928.patch --]
[-- Type: text/x-diff, Size: 11072 bytes --]

From 6433dc31be1a538ed448198bfa31071a01acb1d2 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 08:19:25 -0500
Subject: [PATCH 1/3] 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 f14e7e7f5ea1a8a9567b5ee4ed9f91464cc44382 Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:28:45 -0500
Subject: [PATCH 2/3] 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 <jwilk@jwilk.net>
+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" <snaipe@arista.com>
+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 <ajh@sideband.org>"
+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 6f9f360260c56d398dcff943053e7c6ddf748f2d Mon Sep 17 00:00:00 2001
From: "Andrew J. Hesford" <ajh@sideband.org>
Date: Tue, 6 Dec 2022 09:43:08 -0500
Subject: [PATCH 3/3] 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..6bb39f263972 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 <abc@pompel.me>"
 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"
-}
+checkdepends=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
 }

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2022-12-07 14:52 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06 14:47 [PR PATCH] backblaze-b2: update to 3.6.0 ahesford
2022-12-06 16:24 ` [PR PATCH] [Updated] " ahesford
2022-12-06 16:35 ` kartikynwa
2022-12-06 17:21 ` [PR PATCH] [Updated] " ahesford
2022-12-06 17:21 ` ahesford
2022-12-06 17:22 ` ahesford
2022-12-07  5:31 ` kartikynwa
2022-12-07  5:32 ` kartikynwa
2022-12-07  8:41 ` kartikynwa
2022-12-07  8:43 ` kartikynwa
2022-12-07  8:45 ` kartikynwa
2022-12-07 13:37 ` [PR PATCH] [Updated] " ahesford
2022-12-07 13:42 ` ahesford
2022-12-07 14:21 ` kartikynwa
2022-12-07 14:31 ` kartikynwa
2022-12-07 14:34 ` [PR PATCH] [Updated] " ahesford
2022-12-07 14:35 ` ahesford
2022-12-07 14:44 ` kartikynwa
2022-12-07 14:52 ` [PR PATCH] [Merged]: " ahesford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).