From 9684c22349e35887fa2798a1f2b548b25bc4598009ef9f4e218345c08f4ba710 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 28 Apr 2025 16:49:44 +0000 Subject: [PATCH] =?UTF-8?q?-=20update=20to=200.5.7:=20=20=20*=20Fix=20an?= =?UTF-8?q?=20issue=20where=20the=20any=5Fof=20flag=20wasn=E2=80=99t=20pro?= =?UTF-8?q?perly=20respected=20=20=20=20=20in=20other=20than=20simple=20ca?= =?UTF-8?q?ses=20#297=20-=20update=20to=200.5.6:=20=20=20*=20Fix=20#292=20?= =?UTF-8?q?by=20adding=20intermediary=20class=20builder.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-jsonschema-objects?expand=0&rev=21 --- .gitattributes | 23 ++ .gitignore | 1 + no-six.patch | 437 +++++++++++++++++++++++ python-python-jsonschema-objects.changes | 98 +++++ python-python-jsonschema-objects.spec | 69 ++++ python_jsonschema_objects-0.5.4.tar.gz | 3 + python_jsonschema_objects-0.5.5.tar.gz | 3 + python_jsonschema_objects-0.5.7.tar.gz | 3 + 8 files changed, 637 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 no-six.patch create mode 100644 python-python-jsonschema-objects.changes create mode 100644 python-python-jsonschema-objects.spec create mode 100644 python_jsonschema_objects-0.5.4.tar.gz create mode 100644 python_jsonschema_objects-0.5.5.tar.gz create mode 100644 python_jsonschema_objects-0.5.7.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/no-six.patch b/no-six.patch new file mode 100644 index 0000000..e7c8e8e --- /dev/null +++ b/no-six.patch @@ -0,0 +1,437 @@ +Index: python_jsonschema_objects-0.5.4/python_jsonschema_objects/__init__.py +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/python_jsonschema_objects/__init__.py ++++ python_jsonschema_objects-0.5.4/python_jsonschema_objects/__init__.py +@@ -14,7 +14,6 @@ import jsonschema + import referencing.jsonschema + import referencing.retrieval + import referencing._core +-import six + from referencing import Registry, Resource + + import python_jsonschema_objects.classbuilder as classbuilder +@@ -43,7 +42,7 @@ class ObjectBuilder(object): + resolver: Optional[referencing.typing.Retrieve] = None, + specification_uri: Optional[str] = None, + ): +- if isinstance(schema_uri, six.string_types): ++ if isinstance(schema_uri, str): + uri = os.path.normpath(schema_uri) + self.basedir = os.path.dirname(uri) + with codecs.open(uri, "r", "utf-8") as fin: +@@ -220,7 +219,7 @@ class ObjectBuilder(object): + """ + kw = {"strict": strict, "any_of": any_of} + builder = classbuilder.ClassBuilder(self.resolver) +- for nm, defn in six.iteritems(self.schema.get("definitions", {})): ++ for nm, defn in self.schema.get("definitions", {}).items(): + resolved = self.resolver.lookup("#/definitions/" + nm) + uri = python_jsonschema_objects.util.resolve_ref_uri( + self.resolver._base_uri, "#/definitions/" + nm +@@ -229,19 +228,19 @@ class ObjectBuilder(object): + + if standardize_names: + name_transform = lambda t: inflection.camelize( +- inflection.parameterize(six.text_type(t), "_") ++ inflection.parameterize(str(t), "_") + ) + else: + name_transform = lambda t: t + + nm = self.schema["title"] if "title" in self.schema else self.schema["$id"] +- nm = inflection.parameterize(six.text_type(nm), "_") ++ nm = inflection.parameterize(str(nm), "_") + + builder.construct(nm, self.schema, **kw) + self._resolved = builder.resolved + + classes = {} +- for uri, klass in six.iteritems(builder.resolved): ++ for uri, klass in builder.resolved.items(): + title = getattr(klass, "__title__", None) + if title is not None: + classes[name_transform(title)] = klass +Index: python_jsonschema_objects-0.5.4/python_jsonschema_objects/classbuilder.py +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/python_jsonschema_objects/classbuilder.py ++++ python_jsonschema_objects-0.5.4/python_jsonschema_objects/classbuilder.py +@@ -6,7 +6,6 @@ import sys + + import jsonschema.exceptions + import referencing._core +-import six + + from python_jsonschema_objects import ( + pattern_properties, +@@ -81,26 +80,26 @@ class ProtocolBase(collections.abc.Mutab + return self.as_dict() == other.as_dict() + + def __str__(self): +- inverter = dict((v, k) for k, v in six.iteritems(self.__prop_names__)) ++ inverter = dict((v, k) for k, v in self.__prop_names__.items()) + props = sorted( + [ + "%s" % (inverter.get(k, k),) + for k, v in itertools.chain( +- six.iteritems(self._properties), +- six.iteritems(self._extended_properties), ++ self._properties.items(), ++ self._extended_properties.items(), + ) + ] + ) + return "<%s attributes: %s>" % (self.__class__.__name__, ", ".join(props)) + + def __repr__(self): +- inverter = dict((v, k) for k, v in six.iteritems(self.__prop_names__)) ++ inverter = dict((v, k) for k, v in self.__prop_names__.items()) + props = sorted( + [ + "%s=%s" % (inverter.get(k, k), repr(v)) + for k, v in itertools.chain( +- six.iteritems(self._properties), +- six.iteritems(self._extended_properties), ++ self._properties.items(), ++ self._extended_properties.items(), + ) + ] + ) +@@ -177,7 +176,7 @@ class ProtocolBase(collections.abc.Mutab + self._properties = dict( + zip( + self.__prop_names__.values(), +- [None for x in six.moves.xrange(len(self.__prop_names__))], ++ [None for x in range(len(self.__prop_names__))], + ) + ) + +@@ -216,16 +215,13 @@ class ProtocolBase(collections.abc.Mutab + except validators.ValidationError as e: + import sys + +- raise six.reraise( +- type(e), +- type(e)( ++ e = type(e)( + str(e) + + " \nwhile setting '{0}' in {1}".format( + prop, self.__class__.__name__ + ) +- ), +- sys.exc_info()[2], +- ) ++ ) ++ raise e.with_traceback(sys.exc_info()[2]) + + if getattr(self, "__strict__", None): + self.validate() +@@ -258,7 +254,7 @@ class ProtocolBase(collections.abc.Mutab + import itertools + + return itertools.chain( +- six.iterkeys(self._extended_properties), six.iterkeys(self._properties) ++ self._extended_properties.keys(), self._properties.keys() + ) + + def __len__(self): +@@ -330,7 +326,7 @@ class ProtocolBase(collections.abc.Mutab + ) + ) + +- for prop, val in six.iteritems(self._properties): ++ for prop, val in self._properties.items(): + if val is None: + continue + if isinstance(val, ProtocolBase): +@@ -593,7 +589,7 @@ class ClassBuilder(object): + elif isinstance(clsdata.get("type"), list): + types = [] + for i, item_detail in enumerate(clsdata["type"]): +- subdata = {k: v for k, v in six.iteritems(clsdata) if k != "type"} ++ subdata = {k: v for k, v in clsdata.items() if k != "type"} + subdata["type"] = item_detail + types.append(self._build_literal(uri + "_%s" % i, subdata)) + +Index: python_jsonschema_objects-0.5.4/python_jsonschema_objects/descriptors.py +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/python_jsonschema_objects/descriptors.py ++++ python_jsonschema_objects-0.5.4/python_jsonschema_objects/descriptors.py +@@ -60,7 +60,7 @@ class AttributeDescriptor(object): + elif util.safe_issubclass(typ, ProtocolBase): + # Force conversion- thus the val rather than validator assignment. + try: +- val = typ(**util.coerce_for_expansion(val)) ++ val = typ(**val) + val.validate() + except Exception as e: + errors.append("Failed to coerce to '{0}': {1}".format(typ, e)) +@@ -82,7 +82,6 @@ class AttributeDescriptor(object): + try: + # Handle keyword expansion according to expected types. Using + # keywords like oneOf, value can be an object, array or literal. +- val = util.coerce_for_expansion(val) + if isinstance(val, dict): + val = typ(**val) + else: +@@ -120,12 +119,11 @@ class AttributeDescriptor(object): + + elif util.safe_issubclass(info["type"], ProtocolBase): + if not isinstance(val, info["type"]): +- val = info["type"](**util.coerce_for_expansion(val)) ++ val = info["type"](**val) + + val.validate() + + elif isinstance(info["type"], TypeProxy): +- val = util.coerce_for_expansion(val) + if isinstance(val, dict): + val = info["type"](**val) + else: +Index: python_jsonschema_objects-0.5.4/python_jsonschema_objects/literals.py +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/python_jsonschema_objects/literals.py ++++ python_jsonschema_objects-0.5.4/python_jsonschema_objects/literals.py +@@ -1,7 +1,6 @@ + import functools + import operator + +-import six + + from python_jsonschema_objects import util, validators + +@@ -77,7 +76,7 @@ class LiteralValue(object): + return " %s>" % (self._value.__class__.__name__, str(self._value)) + + def __str__(self): +- if isinstance(self._value, six.string_types): ++ if isinstance(self._value, str): + return self._value + return str(self._value) + +@@ -87,7 +86,7 @@ class LiteralValue(object): + # TODO: this duplicates logic in validators.ArrayValidator.check_items; + # unify it. + for param, paramval in sorted( +- six.iteritems(info), key=lambda x: x[0].lower() != "type" ++ info.items(), key=lambda x: x[0].lower() != "type" + ): + validator = validators.registry(param) + if validator is not None: +Index: python_jsonschema_objects-0.5.4/python_jsonschema_objects/pattern_properties.py +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/python_jsonschema_objects/pattern_properties.py ++++ python_jsonschema_objects-0.5.4/python_jsonschema_objects/pattern_properties.py +@@ -2,7 +2,6 @@ import collections + import logging + import re + +-import six + + from python_jsonschema_objects import util, validators, wrapper_types + from python_jsonschema_objects.literals import MakeLiteral +@@ -39,7 +38,7 @@ class ExtensibleValidator(object): + + self._additional_type = typ + +- for pattern, typedef in six.iteritems(schemadef.get("patternProperties", {})): ++ for pattern, typedef in schemadef.get("patternProperties", {}).items(): + if "$ref" in typedef: + typ = builder.resolve_type(typedef["$ref"], name) + else: +@@ -61,13 +60,12 @@ class ExtensibleValidator(object): + return typ(val) + + if util.safe_issubclass(typ, cb.ProtocolBase): +- return typ(**util.coerce_for_expansion(val)) ++ return typ(**val) + + if util.safe_issubclass(typ, wrapper_types.ArrayWrapper): + return typ(val) + + if isinstance(typ, cb.TypeProxy): +- val = util.coerce_for_expansion(val) + if isinstance(val, dict): + val = typ(**val) + else: +Index: python_jsonschema_objects-0.5.4/python_jsonschema_objects/util.py +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/python_jsonschema_objects/util.py ++++ python_jsonschema_objects-0.5.4/python_jsonschema_objects/util.py +@@ -6,7 +6,6 @@ import copy + import json + from collections.abc import Mapping, Sequence + +-import six + + + class lazy_format(object): +@@ -36,17 +35,6 @@ def safe_issubclass(x, y): + return False + + +-def coerce_for_expansion(mapping): +- """Given a value, make sure it is usable for f(**val) expansion. +- +- In py2.7, the value must be a dictionary- thus a as_dict() method +- will be invoked if available. In py3k, the raw mapping is returned +- unmodified. +- """ +- if six.PY2 and hasattr(mapping, "as_dict"): +- return mapping.as_dict() +- return mapping +- + + class ProtocolJSONEncoder(json.JSONEncoder): + def default(self, obj): +@@ -69,13 +57,13 @@ def propmerge(into, data_from): + """Merge JSON schema requirements into a dictionary""" + newprops = copy.deepcopy(into) + +- for prop, propval in six.iteritems(data_from): ++ for prop, propval in data_from.items(): + if prop not in newprops: + newprops[prop] = propval + continue + + new_sp = newprops[prop] +- for subprop, spval in six.iteritems(propval): ++ for subprop, spval in propval.items(): + if subprop not in new_sp: + new_sp[subprop] = spval + +Index: python_jsonschema_objects-0.5.4/python_jsonschema_objects/validators.py +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/python_jsonschema_objects/validators.py ++++ python_jsonschema_objects-0.5.4/python_jsonschema_objects/validators.py +@@ -1,17 +1,17 @@ + import decimal + import logging ++import numbers + +-import six + + logger = logging.getLogger(__name__) + + SCHEMA_TYPE_MAPPING = ( + ("array", list), + ("boolean", bool), +- ("integer", six.integer_types), +- ("number", six.integer_types + (float,)), ++ ("integer", int), ++ ("number", numbers.Real), + ("null", type(None)), +- ("string", six.string_types), ++ ("string", str), + ("object", dict), + ) + """Sequence of schema type mappings to be checked in precedence order.""" +@@ -140,7 +140,7 @@ def check_integer_type(param, value, _): + + @type_registry.register(name="number") + def check_number_type(param, value, _): +- if not isinstance(value, six.integer_types + (float,)) or isinstance(value, bool): ++ if not isinstance(value, numbers.Real): + raise ValidationError("{0} is neither an integer nor a float".format(value)) + + +@@ -152,7 +152,7 @@ def check_null_type(param, value, _): + + @type_registry.register(name="string") + def check_string_type(param, value, _): +- if not isinstance(value, six.string_types): ++ if not isinstance(value, str): + raise ValidationError("{0} is not a string".format(value)) + + +Index: python_jsonschema_objects-0.5.4/python_jsonschema_objects/wrapper_types.py +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/python_jsonschema_objects/wrapper_types.py ++++ python_jsonschema_objects-0.5.4/python_jsonschema_objects/wrapper_types.py +@@ -1,7 +1,6 @@ + import collections + import logging + +-import six + + from python_jsonschema_objects import util + from python_jsonschema_objects.util import lazy_format as fmt +@@ -174,7 +173,7 @@ class ArrayWrapper(collections.abc.Mutab + typed_elems = [] + for elem, typ in zip(self.data, type_checks): + if isinstance(typ, dict): +- for param, paramval in six.iteritems(typ): ++ for param, paramval in typ.items(): + validator = registry(param) + if validator is not None: + validator(paramval, elem, typ) +@@ -188,11 +187,11 @@ class ArrayWrapper(collections.abc.Mutab + if not isinstance(elem, typ): + try: + if isinstance( +- elem, (six.string_types, six.integer_types, float) ++ elem, (str, int, float) + ): + val = typ(elem) + else: +- val = typ(**util.coerce_for_expansion(elem)) ++ val = typ(**elem) + except TypeError as e: + raise ValidationError( + "'{0}' is not a valid value for '{1}': {2}".format( +@@ -211,12 +210,12 @@ class ArrayWrapper(collections.abc.Mutab + + elif isinstance(typ, (classbuilder.TypeProxy, classbuilder.TypeRef)): + try: +- if isinstance(elem, (six.string_types, six.integer_types, float)): ++ if isinstance(elem, (str, int, float)): + val = typ(elem) + elif isinstance(elem, classbuilder.LiteralValue): + val = typ(elem._value) + else: +- val = typ(**util.coerce_for_expansion(elem)) ++ val = typ(**elem) + except TypeError as e: + raise ValidationError( + "'{0}' is not a valid value for '{1}': {2}".format(elem, typ, e) +Index: python_jsonschema_objects-0.5.4/python_jsonschema_objects.egg-info/requires.txt +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/python_jsonschema_objects.egg-info/requires.txt ++++ python_jsonschema_objects-0.5.4/python_jsonschema_objects.egg-info/requires.txt +@@ -1,4 +1,3 @@ + inflection>=0.2 + Markdown>=2.4 + jsonschema>=4.18 +-six>=1.5.2 +Index: python_jsonschema_objects-0.5.4/setup.py +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/setup.py ++++ python_jsonschema_objects-0.5.4/setup.py +@@ -42,7 +42,6 @@ if __name__ == "__main__": + "inflection>=0.2", + "Markdown>=2.4", + "jsonschema>=4.18", +- "six>=1.5.2", + ], + python_requires=">=3.8", + cmdclass=versioneer.get_cmdclass(), +Index: python_jsonschema_objects-0.5.4/test/test_pytest.py +=================================================================== +--- python_jsonschema_objects-0.5.4.orig/test/test_pytest.py ++++ python_jsonschema_objects-0.5.4/test/test_pytest.py +@@ -4,7 +4,6 @@ import warnings + + import jsonschema + import pytest +-import six + + import python_jsonschema_objects as pjs + +@@ -216,7 +215,7 @@ def test_object_builder_loads_memory_ref + + + def test_object_builder_reads_all_definitions(markdown_examples): +- for nm, ex in six.iteritems(markdown_examples): ++ for nm, ex in markdown_examples.items(): + builder = pjs.ObjectBuilder(ex, resolved=markdown_examples) + assert builder + diff --git a/python-python-jsonschema-objects.changes b/python-python-jsonschema-objects.changes new file mode 100644 index 0000000..db2d8ad --- /dev/null +++ b/python-python-jsonschema-objects.changes @@ -0,0 +1,98 @@ +------------------------------------------------------------------- +Mon Apr 28 16:49:28 UTC 2025 - Dirk Müller + +- update to 0.5.7: + * Fix an issue where the any_of flag wasn’t properly respected + in other than simple cases #297 +- update to 0.5.6: + * Fix #292 by adding intermediary class builder. + +------------------------------------------------------------------- +Wed Oct 16 08:21:55 UTC 2024 - Dirk Müller + +- update to 0.5.5: + * remove six dependencies +- drop no-six.patch (upstream) + +------------------------------------------------------------------- +Thu Jun 6 14:16:19 UTC 2024 - Markéta Machová + +- Update to 0.5.4 + * bugfix: Update the way specifications are retrieved + * tests: Add tests to validate expected behavior on some issues + * handle nested anyof, ensure that data gets passed down via object creators + * feature: Add support for the const keyword +- Add no-six.patch to get rid of six +- Drop no-longer-needed use-specification-obj.patch + +------------------------------------------------------------------- +Mon Dec 11 05:31:28 UTC 2023 - Steve Kowalik + +- Update to 0.5.1: + * Setup for handling anyOf simplifying to oneOf on import. +- Add patch use-specification-obj.patch: + * Stop passing string schemas, convert it to a Specification object + +------------------------------------------------------------------- +Wed Sep 20 02:46:59 UTC 2023 - Steve Kowalik + +- Update to 0.5.0: + * Migrate to jsonschema 4.18 + * Drop support for Python 3.7 due to lack of support under jsonschema>=4.18 + * Drop support for jsonschema<4.18 due to breaking changes in that + libraries interfaces +- Migrate to pyproject macros +- Stop using greedy globs in %files + +------------------------------------------------------------------- +Tue Jul 11 13:18:57 UTC 2023 - Markéta Machová + +- Update to 0.4.2 + * Handle removed markdown version_info + * fix nested oneOf resolution with different schema types +- Drop merged pso-markdown-version.patch +- Pin jsonschema version to < 4.18, not supported yet + +------------------------------------------------------------------- +Fri Aug 26 17:24:20 UTC 2022 - Ben Greiner + +- Add pso-markdown-version.patch + * gh#cwacek/python-jsonschema-objects#230 + +------------------------------------------------------------------- +Fri Jul 8 04:30:39 UTC 2022 - Steve Kowalik + +- Skip a failing test for now. + +------------------------------------------------------------------- +Fri Jan 21 02:56:29 UTC 2022 - Steve Kowalik + +- Update to 0.4.1: + * This release just incorporates the fix for #223 + * Default values will now always serialize, even if the default value is null. Since this change could cause unexpected changes in serialized output the minor version has been bumped. Fixes #200 + * Literals now properly support comparisons of all types (#213) + * oneOfs inside oneOfs (oneOf-ception?!) no longer fail to serialize (#214) + * #203 validatorSchemas passed in are now respected + * #208 oneOf roundtrip serializations work better + * #207 Another fix for abc deprecation + * Fixes import path for collections.abc to be compliant with Python 3.8 [#197] (h/t @adriangay) +- Remove duplicate setuptools BuildRequires. + +------------------------------------------------------------------- +Fri Mar 20 11:53:16 UTC 2020 - pgajdos@suse.com + +- version update to 0.3.12 + * Going forward, this library will no longer test on or support Python 2.7 because it's EOL + * Fixes formatting of supported schema versions (#184) + * Removes some confusing code related to ArrayWrapper initialization (#188) + * ProtocolBase objects (most objects) now support deepcopy. (#185) + +------------------------------------------------------------------- +Tue Sep 17 08:42:24 UTC 2019 - Tomáš Chvátal + +- Format with spec-cleaner + +------------------------------------------------------------------- +Mon Sep 16 06:49:20 PM UTC 2019 - John Vandenberg + +- Initial spec for v0.3.11 diff --git a/python-python-jsonschema-objects.spec b/python-python-jsonschema-objects.spec new file mode 100644 index 0000000..b14bf16 --- /dev/null +++ b/python-python-jsonschema-objects.spec @@ -0,0 +1,69 @@ +# +# spec file for package python-python-jsonschema-objects +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-python-jsonschema-objects +Version: 0.5.7 +Release: 0 +Summary: An object wrapper for JSON Schema definitions +License: MIT +URL: https://github.com/cwacek/python-jsonschema-objects +Source: https://files.pythonhosted.org/packages/source/p/python_jsonschema_objects/python_jsonschema_objects-%{version}.tar.gz +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-Markdown >= 2.4 +Requires: python-inflection >= 0.2 +Requires: python-jsonschema >= 4.18 +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module Markdown >= 2.4} +BuildRequires: %{python_module inflection >= 0.2} +BuildRequires: %{python_module jsonschema >= 4.18} +BuildRequires: %{python_module pytest-mock} +BuildRequires: %{python_module pytest} +# /SECTION +%python_subpackages + +%description +An object wrapper for JSON Schema definitions + +%prep +%autosetup -p1 -n python_jsonschema_objects-%{version} + +%build +%pyproject_wheel + +%install +%pyproject_install +%{python_expand rm -r %{buildroot}%{$python_sitelib}/python_jsonschema_objects/examples/ +%fdupes %{buildroot}%{$python_sitelib} +} + +%check +%pytest + +%files %{python_files} +%doc README.md +%license LICENSE +%{python_sitelib}/python_jsonschema_objects +%{python_sitelib}/python_jsonschema_objects-%{version}.dist-info + +%changelog diff --git a/python_jsonschema_objects-0.5.4.tar.gz b/python_jsonschema_objects-0.5.4.tar.gz new file mode 100644 index 0000000..49a8e84 --- /dev/null +++ b/python_jsonschema_objects-0.5.4.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b2f3a27efdea34d97af6f74ecc20aaf90e7f3125b4db831eff15ececc5d05215 +size 70427 diff --git a/python_jsonschema_objects-0.5.5.tar.gz b/python_jsonschema_objects-0.5.5.tar.gz new file mode 100644 index 0000000..6d37e27 --- /dev/null +++ b/python_jsonschema_objects-0.5.5.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1c83e5163261e68c39cce93a1e25b7e0d7e22806167ff0868fab2281fd3192a2 +size 70316 diff --git a/python_jsonschema_objects-0.5.7.tar.gz b/python_jsonschema_objects-0.5.7.tar.gz new file mode 100644 index 0000000..ae16502 --- /dev/null +++ b/python_jsonschema_objects-0.5.7.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0af1a9fd207a3158a73baa895256ce0ee91bb99c5f92b07fd4fac6ff6d007c90 +size 82302