-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-python/jsonschema: keeping old package for weird DANDI issue
dandi/dandi-cli#825 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Horea Christian <chr@chymera.eu>
- Loading branch information
1 parent
cc02742
commit 4ae7cca
Showing
5 changed files
with
143 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
*jsonschema-3.2.0-r1 (01 Feb 2022) | ||
|
||
01 Feb 2022; <chymera@gentoo.org> | ||
+files/jsonschema-3.2.0-add-webcolors-1.11-compat.patch, | ||
+jsonschema-3.2.0-r1.ebuild, +metadata.xml: | ||
dev-python/jsonschema: keeping old package for weird DANDI issue | ||
https://github.com/dandi/dandi-cli/issues/825 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
DIST jsonschema-3.2.0.tar.gz 167226 SHA256 c8a85b28d377cc7737e46e2d9f2b4f44ee3c0e1deac6bf46ddefc7187d30797a SHA512 acbb4cec730a8cdab9f070593ed896064fbe082d464ec362adc952e4985e9eaa12ad0f2d55a04018ffdaf675e54037999a7219533dad6b84bf609f5dfe21bbab WHIRLPOOL 6ec7f42433ab85970a3ec3b4b62c9007112b142b2d5fb17c5289fbf4ea8727fd847f4328a4f1b3b426bb25eeec293d498888f63fe416665742e22622b294c34a |
70 changes: 70 additions & 0 deletions
70
dev-python/jsonschema/files/jsonschema-3.2.0-add-webcolors-1.11-compat.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
From 09595a50f507399bf3fa8c68ed6371c42b9c4874 Mon Sep 17 00:00:00 2001 | ||
From: Julian Berman <Julian@GrayVines.com> | ||
Date: Fri, 21 Feb 2020 09:30:05 -0500 | ||
Subject: [PATCH 1/2] Newer webcolors has a new API apparently. | ||
|
||
--- | ||
jsonschema/_format.py | 2 +- | ||
setup.cfg | 4 ++-- | ||
2 files changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/jsonschema/_format.py b/jsonschema/_format.py | ||
index 281a7cf..f3c758c 100644 | ||
--- a/jsonschema/_format.py | ||
+++ b/jsonschema/_format.py | ||
@@ -354,7 +354,7 @@ else: | ||
def is_css21_color(instance): | ||
if ( | ||
not isinstance(instance, str_types) or | ||
- instance.lower() in webcolors.css21_names_to_hex | ||
+ instance.lower() in webcolors.CSS21_NAMES_TO_HEX | ||
): | ||
return True | ||
return is_css_color_code(instance) | ||
-- | ||
2.24.1 | ||
|
||
From 0d192e192526252c30c16b3651c293bb5f21a99f Mon Sep 17 00:00:00 2001 | ||
From: Julian Berman <Julian@GrayVines.com> | ||
Date: Fri, 21 Feb 2020 09:56:13 -0500 | ||
Subject: [PATCH 2/2] Sigh... but also drops Py2 compat. | ||
|
||
--- | ||
jsonschema/_format.py | 11 ++++++++--- | ||
setup.cfg | 4 ++-- | ||
2 files changed, 10 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/jsonschema/_format.py b/jsonschema/_format.py | ||
index f3c758c..b96efb6 100644 | ||
--- a/jsonschema/_format.py | ||
+++ b/jsonschema/_format.py | ||
@@ -342,10 +342,15 @@ def is_draft3_time(instance): | ||
return datetime.datetime.strptime(instance, "%H:%M:%S") | ||
|
||
|
||
-try: | ||
+try: # webcolors>=1.11 | ||
+ from webcolors import CSS21_NAMES_TO_HEX | ||
import webcolors | ||
except ImportError: | ||
- pass | ||
+ try: # webcolors<1.11 | ||
+ from webcolors import css21_names_to_hex as CSS21_NAMES_TO_HEX | ||
+ import webcolors | ||
+ except ImportError: | ||
+ pass | ||
else: | ||
def is_css_color_code(instance): | ||
return webcolors.normalize_hex(instance) | ||
@@ -354,7 +359,7 @@ else: | ||
def is_css21_color(instance): | ||
if ( | ||
not isinstance(instance, str_types) or | ||
- instance.lower() in webcolors.CSS21_NAMES_TO_HEX | ||
+ instance.lower() in CSS21_NAMES_TO_HEX | ||
): | ||
return True | ||
return is_css_color_code(instance) | ||
-- | ||
2.24.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Copyright 1999-2022 Gentoo Authors | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=7 | ||
|
||
PYTHON_COMPAT=( python3_{8..10} ) | ||
DISTUTILS_USE_SETUPTOOLS=rdepend | ||
|
||
inherit distutils-r1 | ||
|
||
DESCRIPTION="An implementation of JSON-Schema validation for Python" | ||
HOMEPAGE="https://pypi.org/project/jsonschema/ https://github.com/Julian/jsonschema" | ||
SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" | ||
|
||
LICENSE="MIT" | ||
SLOT="0" | ||
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux" | ||
|
||
BDEPEND=" | ||
dev-python/attrs[${PYTHON_USEDEP}] | ||
dev-python/pyrsistent[${PYTHON_USEDEP}] | ||
dev-python/six[${PYTHON_USEDEP}] | ||
test? ( dev-python/twisted[${PYTHON_USEDEP}] ) | ||
" | ||
|
||
RDEPEND="${BDEPEND} | ||
dev-python/idna[${PYTHON_USEDEP}] | ||
>=dev-python/jsonpointer-1.13[${PYTHON_USEDEP}] | ||
dev-python/rfc3987[${PYTHON_USEDEP}] | ||
dev-python/strict-rfc3339[${PYTHON_USEDEP}] | ||
dev-python/webcolors[${PYTHON_USEDEP}] | ||
dev-python/rfc3986-validator[${PYTHON_USEDEP}] | ||
dev-python/rfc3339-validator[${PYTHON_USEDEP}] | ||
" | ||
|
||
BDEPEND+=" | ||
dev-python/setuptools_scm[${PYTHON_USEDEP}] | ||
" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/${P}-add-webcolors-1.11-compat.patch | ||
) | ||
|
||
distutils_enable_tests unittest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>chutzpah@gentoo.org</email> | ||
<name>Patrick McLean</name> | ||
</maintainer> | ||
<maintainer type="project"> | ||
<email>python@gentoo.org</email> | ||
<name>Python</name> | ||
</maintainer> | ||
<longdescription lang="en"> | ||
jsonschema is an implementation of JSON Schema (currently in Draft 3) for | ||
Python (supporting 2.6+ including Python 3). | ||
</longdescription> | ||
<stabilize-allarches/> | ||
<upstream> | ||
<remote-id type="pypi">jsonschema</remote-id> | ||
<remote-id type="github">Julian/jsonschema</remote-id> | ||
</upstream> | ||
</pkgmetadata> |