# # spec file for package python-jsonschema # # Copyright (c) 2015 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/ # Name: python-jsonschema Version: 2.5.1 Release: 3.1 Summary: An implementation of JSON-Schema validation for Python License: MIT Group: Development/Languages/Python Url: http://github.com/Julian/jsonschema Source: http://pypi.python.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz BuildRequires: python-devel BuildRequires: python-setuptools %if 0%{?suse_version} && 0%{?suse_version} <= 1110 BuildRequires: python-argparse BuildRequires: python-repoze.lru %else BuildRequires: python-functools32 %endif BuildRequires: python-vcversioner # Test build requirements BuildRequires: python-mock %if 0%{?suse_version} && 0%{?suse_version} <= 1110 Requires: python-argparse Requires: python-repoze.lru %else Requires: python-functools32 %endif Requires(post): update-alternatives Requires(postun): update-alternatives BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?suse_version} && 0%{?suse_version} <= 1110 BuildRequires: python-unittest2 %{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %else BuildArch: noarch %endif %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 setup.py build %install python setup.py install --prefix=%{_prefix} --root=%{buildroot} # Prepare for update-alternatives usage mkdir -p %{buildroot}%{_sysconfdir}/alternatives mv %{buildroot}%{_bindir}/jsonschema %{buildroot}%{_bindir}/jsonschema-%{py_ver} ln -s -f %{_sysconfdir}/alternatives/jsonschema %{buildroot}%{_bindir}/jsonschema # create a dummy target for /etc/alternatives/jsonschema touch %{buildroot}%{_sysconfdir}/alternatives/jsonschema %if 0%{?suse_version} > 1110 %check python -m unittest jsonschema.tests.test_jsonschema_test_suite %endif %post %_sbindir/update-alternatives \ --install %{_bindir}/jsonschema jsonschema %{_bindir}/jsonschema-%{py_ver} 30 %preun if [ $1 -eq 0 ] ; then %_sbindir/update-alternatives --remove jsonschema %{_bindir}/jsonschema-%{py_ver} fi %files %defattr(-,root,root,-) %doc COPYING README.rst %{_bindir}/jsonschema %{_bindir}/jsonschema-%{py_ver} %ghost %{_sysconfdir}/alternatives/jsonschema %{python_sitelib}/* %changelog * 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