summaryrefslogtreecommitdiff
path: root/dev-python/pykwalify
diff options
context:
space:
mode:
authorroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
committerroot <root@alpha.trunkmasters.com>2026-06-12 19:09:37 -0500
commitb590c8d7572b727d565cc0b8ff660d43569845de (patch)
tree06f7a4102ea4e845df8b66660f252920d52952f9 /dev-python/pykwalify
parent24f9cbfc4c34fdb6a6e03311674414e881ceab47 (diff)
downloadbaldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.gz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.tar.xz
baldeagleos-repo-b590c8d7572b727d565cc0b8ff660d43569845de.zip
Adding metadata
Diffstat (limited to 'dev-python/pykwalify')
-rw-r--r--dev-python/pykwalify/Manifest1
-rw-r--r--dev-python/pykwalify/files/pykwalify-1.4.0-S.patch24
-rw-r--r--dev-python/pykwalify/files/pykwalify-1.8.0-ruamel-yaml-1.18.patch90
-rw-r--r--dev-python/pykwalify/metadata.xml10
-rw-r--r--dev-python/pykwalify/pykwalify-1.8.0-r3.ebuild38
5 files changed, 163 insertions, 0 deletions
diff --git a/dev-python/pykwalify/Manifest b/dev-python/pykwalify/Manifest
new file mode 100644
index 000000000000..d7d091a8b141
--- /dev/null
+++ b/dev-python/pykwalify/Manifest
@@ -0,0 +1 @@
+DIST pykwalify-1.8.0.tar.gz 62462 BLAKE2B 1593f5e3e15188929574ece60bf6818438258bf024d105ae26323a97a202ac69001a15ca6daaa430970af3659c49da745bcf1f77c23ac72bed2ddca14440d943 SHA512 c77d3072995bb3f61336e725227eeece1dafe2182513e5f67eedeeca3437825b53ac691a991055aad8298db252e2012bc9a61c23d766335fcfbb10a3b587b45d
diff --git a/dev-python/pykwalify/files/pykwalify-1.4.0-S.patch b/dev-python/pykwalify/files/pykwalify-1.4.0-S.patch
new file mode 100644
index 000000000000..0f133c9c95c8
--- /dev/null
+++ b/dev-python/pykwalify/files/pykwalify-1.4.0-S.patch
@@ -0,0 +1,24 @@
+ tests/test_core.py | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/tests/test_core.py b/tests/test_core.py
+index 2fae7bc..0773f88 100644
+--- a/tests/test_core.py
++++ b/tests/test_core.py
+@@ -397,12 +397,12 @@ class TestCore(object):
+ ]
+
+ # Add override magic to make it easier to test a specific file
+- if "S" in os.environ:
+- pass_tests = [os.environ["S"]]
++ if "_S" in os.environ:
++ pass_tests = [os.environ["_S"]]
+ _fail_tests = []
+- elif "F" in os.environ:
++ elif "_F" in os.environ:
+ pass_tests = []
+- _fail_tests = [(os.environ["F"], SchemaError)]
++ _fail_tests = [(os.environ["_F"], SchemaError)]
+
+ for passing_test_file in pass_tests:
+ f = self.f(os.path.join("success", passing_test_file))
diff --git a/dev-python/pykwalify/files/pykwalify-1.8.0-ruamel-yaml-1.18.patch b/dev-python/pykwalify/files/pykwalify-1.8.0-ruamel-yaml-1.18.patch
new file mode 100644
index 000000000000..d3e5cd65f6ee
--- /dev/null
+++ b/dev-python/pykwalify/files/pykwalify-1.8.0-ruamel-yaml-1.18.patch
@@ -0,0 +1,90 @@
+From 57bb2ba5c28b6928edb3f07ef581a5a807524baf Mon Sep 17 00:00:00 2001
+From: Lily Foster <lily@lily.flowers>
+Date: Sat, 20 Jan 2024 21:14:16 -0500
+Subject: [PATCH] Fixing tests for ruamel yaml 0.18+
+
+Upstream-Issue: https://github.com/Grokzen/pykwalify/issues/198
+Upstream-PR: https://github.com/Grokzen/pykwalify/pull/199
+
+diff --git a/tests/test_core.py b/tests/test_core.py
+index cc84f3e..43271d4 100644
+--- a/tests/test_core.py
++++ b/tests/test_core.py
+@@ -12,7 +12,7 @@
+
+ # 3rd party imports
+ import pytest
+-from pykwalify.compat import yaml
++from pykwalify.compat import yml
+ from testfixtures import compare
+
+
+@@ -579,7 +579,7 @@ def test_core_files(self):
+ for passing_test_file in pass_tests:
+ f = self.f(os.path.join("success", passing_test_file))
+ with open(f, "r") as stream:
+- yaml_data = yaml.safe_load_all(stream)
++ yaml_data = yml.load_all(stream)
+
+ for document_index, document in enumerate(yaml_data):
+ data = document["data"]
+@@ -600,7 +600,7 @@ def test_core_files(self):
+ for failing_test, exception_type in _fail_tests:
+ f = self.f(os.path.join("fail", failing_test))
+ with open(f, "r") as stream:
+- yaml_data = yaml.safe_load_all(stream)
++ yaml_data = yml.load_all(stream)
+
+ for document_index, document in enumerate(yaml_data):
+ data = document["data"]
+diff --git a/tests/test_unicode.py b/tests/test_unicode.py
+index 36f5549..74e2908 100644
+--- a/tests/test_unicode.py
++++ b/tests/test_unicode.py
+@@ -12,7 +12,7 @@
+ from pykwalify.errors import SchemaError
+
+ # 3rd party imports
+-from pykwalify.compat import yaml
++from pykwalify.compat import yml
+ from testfixtures import compare
+
+
+@@ -47,7 +47,8 @@ def test_files_with_unicode_content_success(self, tmpdir):
+ }
+
+ source_f = tmpdir.join(u"2så.json")
+- source_f.write(yaml.safe_dump(fail_data_2s_yaml, allow_unicode=True))
++ with source_f.open('w') as stream:
++ yml.dump(fail_data_2s_yaml, stream)
+
+ _pass_tests = [
+ # Test mapping with unicode key and value
+@@ -65,7 +66,7 @@ def test_files_with_unicode_content_success(self, tmpdir):
+ f = self.f(passing_test_files)
+
+ with open(f, "r") as stream:
+- yaml_data = yaml.safe_load(stream)
++ yaml_data = yml.load(stream)
+ data = yaml_data["data"]
+ schema = yaml_data["schema"]
+
+@@ -102,7 +103,8 @@ def test_files_with_unicode_content_failing(self, tmpdir):
+ }
+
+ source_f = tmpdir.join(u"2få.json")
+- source_f.write(yaml.safe_dump(fail_data_2f_yaml, allow_unicode=True))
++ with source_f.open('w') as stream:
++ yml.dump(fail_data_2f_yaml, stream)
+
+ _fail_tests = [
+ # Test mapping with unicode key and value but wrong type
+@@ -120,7 +122,7 @@ def test_files_with_unicode_content_failing(self, tmpdir):
+ f = self.f(failing_test)
+
+ with open(f, "r") as stream:
+- yaml_data = yaml.safe_load(stream)
++ yaml_data = yml.load(stream)
+ data = yaml_data["data"]
+ schema = yaml_data["schema"]
+ errors = yaml_data["errors"]
diff --git a/dev-python/pykwalify/metadata.xml b/dev-python/pykwalify/metadata.xml
new file mode 100644
index 000000000000..5e95859f915a
--- /dev/null
+++ b/dev-python/pykwalify/metadata.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://docs.baldeagleos.com/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <stabilize-allarches />
+ <origin>baldeagleos-repo</origin>
+</pkgmetadata>
diff --git a/dev-python/pykwalify/pykwalify-1.8.0-r3.ebuild b/dev-python/pykwalify/pykwalify-1.8.0-r3.ebuild
new file mode 100644
index 000000000000..88dc3f3b2388
--- /dev/null
+++ b/dev-python/pykwalify/pykwalify-1.8.0-r3.ebuild
@@ -0,0 +1,38 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DISTUTILS_USE_PEP517=setuptools
+PYTHON_COMPAT=( python3_{13..14} )
+
+inherit distutils-r1 pypi
+
+DESCRIPTION="Python lib/cli for JSON/YAML schema validation"
+HOMEPAGE="
+ https://github.com/Grokzen/pykwalify/
+ https://pypi.org/project/pykwalify/
+"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="amd64 ~arm arm64 ~riscv x86"
+
+RDEPEND="
+ >=dev-python/docopt-0.6.2[${PYTHON_USEDEP}]
+ >=dev-python/ruamel-yaml-0.16.0[${PYTHON_USEDEP}]
+ >=dev-python/python-dateutil-2.8.0[${PYTHON_USEDEP}]
+"
+BDEPEND="
+ test? (
+ dev-python/testfixtures[${PYTHON_USEDEP}]
+ )
+"
+
+distutils_enable_tests pytest
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.0-S.patch
+ # fix tests for >=dev-python/ruamel-yaml-1.18, see #923136
+ "${FILESDIR}"/${PN}-1.8.0-ruamel-yaml-1.18.patch
+)