# # spec file for package python-jsonschema # # Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # 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 http://bugs.opensuse.org/ # %{?!python_module:%define python_module() python-%{**} python3-%{**}} %bcond_without python2 Name: python-jsonschema Version: 2.6.0 Release: 2.2 Summary: An implementation of JSON-Schema validation for Python License: MIT Group: Development/Languages/Python Url: http://github.com/Julian/jsonschema Source: https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz BuildRequires: %{python_module mock} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module vcversioner >= 2.16.0.0} BuildRequires: fdupes BuildRequires: python-rpm-macros %if %{with python2} BuildRequires: python2-functools32 %endif Requires(post): update-alternatives Requires(preun): update-alternatives BuildArch: noarch %ifpython2 Requires: python-functools32 %endif %python_subpackages %description jsonschema is an implementation of JSON Schema (currently in Draft 3) for Python (supporting 2.6+ including Python 3). %prep %setup -q -n jsonschema-%{version} %build %python_build %install %python_install %python_expand %fdupes -s %{buildroot}%{$python_sitelib} # Prepare for update-alternatives usage %python_clone -a %{buildroot}%{_bindir}/jsonschema %check %python_exec -m unittest jsonschema.tests.test_jsonschema_test_suite %post %python_install_alternative jsonschema %preun %python_uninstall_alternative jsonschema %files %{python_files} %doc COPYING README.rst %python_alternative %{_bindir}/jsonschema %{python_sitelib}/* %changelog * Wed Jan 24 2018 tchvatal@suse.com - Add condition around the python2 code to make sure we can build in python3 only enviroment * Wed Apr 19 2017 toddrme2178@gmail.com - Source url must be https. * Sat Apr 15 2017 toddrme2178@gmail.com - Fix source url. * Fri Apr 7 2017 toddrme2178@gmail.com - Update to 2.6.0 * Improved performance on CPython by adding caching around ref resolution (#203) - Implement single-spec version * Mon Oct 5 2015 mcihar@suse.cz - Adjust dependencies for Python 2.6 based SLE 11 * Mon Jun 15 2015 arun@gmx.de - update to version 2.5.1: (no changelog available) - update to version 2.5.0: * Improved performance on CPython by adding caching around ref resolution (#203) - specfile: * add python-vcversioner - drop test requirements and %%check section, which is broken - Fix update-alternatives usage * Sat Nov 8 2014 Led - fix bashism in pre script * Mon Sep 15 2014 tbechtold@suse.com - update to version 2.4.0: * Added a CLI (#134) * Added absolute path and absolute schema path to errors (#120) * Added ``relevance`` * Meta-schemas are now loaded via ``pkgutil`` * Added ``by_relevance`` and ``best_match`` (#91) * Fixed ``format`` to allow adding formats for non-strings (#125) * Fixed the ``uri`` format to reject URI references (#131) - BuildRequires python-setuptools - Install /usr/bin/jsonschema with update-alternatives support * Thu Feb 13 2014 dmueller@suse.com - remove dependency on unittest2 * Mon Oct 21 2013 dmueller@suse.com - update to 2.2.0: * Compile the host name regex (#127) * Allow arbitrary objects to be types (#129) * Support RFC 3339 datetimes in conformance with the spec * Fixed error paths for additionalItems + items (#122) * Fixed wording for min / maxProperties (#117) * Mon Jun 10 2013 dmueller@suse.com - update to 2.0.0: * Added ``create`` and ``extend`` to ``jsonschema.validators`` * Removed ``ValidatorMixin`` * Fixed array indices ref resolution (#95) * Fixed unknown scheme defragmenting and handling (#102) * Mon Apr 29 2013 dmueller@suse.com - update to 1.3.0: * Better error tracebacks (#83) * Raise exceptions in ``ErrorTree``\s for keys not in the instance (#92) * More attributes for ValidationError (#86) * Added ``ValidatorMixin.descend`` * Fixed bad ``RefResolutionError`` message (#82) * Canonicalize URIs (#70) * Sat Apr 13 2013 toddrme2178@gmail.com - Remove pre_checkin.sh since the two packages are not the same * Mon Feb 25 2013 p.drouand@gmail.com - Add python3 support Tests with python3 fails for instance * Mon Feb 25 2013 p.drouand@gmail.com - Update to version 1.0.0: + Support for Draft 4 + Support for format + Longs are ints too! + Fixed a number of issues with ``$ref`` support (#66) + Draft4Validator is now the default + ``ValidationError.path`` is now in sequential order + Added ``ValidatorMixin`` * Thu Nov 22 2012 saschpe@suse.de - Update to version 0.7: + Partial support for (JSON Pointer) $ref + Deprecations + Validator is replaced by Draft3Validator with a slightly different interface + validator(meta_validate=False) - Changes from version 0.6: + Issue #30 - Wrong behavior for the dependencies property validation + Fix a miswritten test * Fri Jul 27 2012 saschpe@suse.de - Add BuildRequires: python-unittest2 for SLE-11-SP2 * Thu Jul 26 2012 saschpe@suse.de - Initial version