commit:     7406f6fb93e459904ca3393a5c65877b6e89e668
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu Mar 30 16:15:17 2023 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu Mar 30 16:19:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7406f6fb

dev-python/genson: Bump to 1.2.2

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/genson/Manifest                      |  1 +
 dev-python/genson/files/genson-1.2.2-test.patch | 28 +++++++++++++++++++
 dev-python/genson/genson-1.2.2.ebuild           | 36 +++++++++++++++++++++++++
 3 files changed, 65 insertions(+)

diff --git a/dev-python/genson/Manifest b/dev-python/genson/Manifest
index f6fed66f63fd..ca6859ba679d 100644
--- a/dev-python/genson/Manifest
+++ b/dev-python/genson/Manifest
@@ -1 +1,2 @@
 DIST genson-1.1.0.tar.gz 26662 BLAKE2B 
726b0467edca9ca503d73c914d35392f0784ae8be01a8287b84da3cd5ae4b4cd6e12a46b1a7baf73db40377b915ddb3c4b53f4a135e3923fa775af5b51a5261c
 SHA512 
54264dcc51cd5ece9bd428079fcd5cf833f32ef36afbb7987de9982d33253834c5c8c35d18b21ad4003fc2ffac4da02965a00844457b7d8ca6c6bf3d3facb8d6
+DIST genson-1.2.2.tar.gz 34387 BLAKE2B 
2e3c3b0fd96d93fe1e7244c11828dfb42d8e9bd97058a1b76d983e02094b2e62560e00b08e2ce1d21abf7e858f481a9e2a5678d51b27162fde1d60535031f54e
 SHA512 
9caf1936518db5ffb412c6b1f1d28b33e9aef2e6f9b2fe50bcc2932a75522dcbc57bf7bc6b3df41244ee470060295a92fb6ba0be9f6fcf512950a81615f85f87

diff --git a/dev-python/genson/files/genson-1.2.2-test.patch 
b/dev-python/genson/files/genson-1.2.2-test.patch
new file mode 100644
index 000000000000..1fb14ea900b0
--- /dev/null
+++ b/dev-python/genson/files/genson-1.2.2-test.patch
@@ -0,0 +1,28 @@
+From 48cb6895f1a4b3320d9ae210debd0befe06bec43 Mon Sep 17 00:00:00 2001
+From: Jon Wolverton <jonwolver...@google.com>
+Date: Mon, 19 Apr 2021 14:27:42 -0400
+Subject: [PATCH] use python -m genson for test_bin
+
+---
+ test/test_bin.py | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/test/test_bin.py b/test/test_bin.py
+index cd16d38..acee10f 100644
+--- a/test/test_bin.py
++++ b/test/test_bin.py
+@@ -25,8 +25,9 @@ def run(args=[], stdin_data=None):
+     Run the ``genson`` executable as a subprocess and return
+     (stdout, stderr).
+     """
+-    genson_process = Popen(['genson'] + args, stdout=PIPE, stderr=PIPE,
+-                           stdin=PIPE if stdin_data is not None else None)
++    genson_process = Popen(
++        ['python', '-m', 'genson'] + args, stdout=PIPE, stderr=PIPE,
++        stdin=PIPE if stdin_data is not None else None)
+     if stdin_data is not None:
+         stdin_data = stdin_data.encode('utf-8')
+     (stdout, stderr) = genson_process.communicate(stdin_data)
+-- 
+2.40.0
+

diff --git a/dev-python/genson/genson-1.2.2.ebuild 
b/dev-python/genson/genson-1.2.2.ebuild
new file mode 100644
index 000000000000..0e3e174a3bed
--- /dev/null
+++ b/dev-python/genson/genson-1.2.2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{9..11} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="GenSON is a powerful, user-friendly JSON Schema generator built 
in Python"
+HOMEPAGE="
+       https://github.com/wolverdude/GenSON/
+       https://pypi.org/project/genson/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+BDEPEND="
+       test? (
+               dev-python/jsonschema[${PYTHON_USEDEP}]
+       )
+"
+
+distutils_enable_tests unittest
+
+src_prepare() {
+       distutils-r1_src_prepare
+       # https://github.com/wolverdude/GenSON/pull/70
+       sed -i -e 's@TEST_URI@test://@' test/test_builder.py || die
+       # known broken in this release
+       [[ ${PV} != 1.2.2 ]] && die "Restore test_bin.py!"
+       rm test/test_bin.py || die
+}

Reply via email to