2012-07-26 15:56:42 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-jsonschema
|
|
|
|
#
|
2019-01-14 16:25:05 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2012-07-26 15:56:42 +02:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-01-14 16:25:05 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2012-11-22 16:43:46 +01:00
|
|
|
#
|
2012-07-26 15:56:42 +02:00
|
|
|
|
|
|
|
|
2017-04-19 16:21:41 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2018-01-24 11:25:06 +01:00
|
|
|
%bcond_without python2
|
2012-07-26 15:56:42 +02:00
|
|
|
Name: python-jsonschema
|
2019-09-20 14:03:14 +02:00
|
|
|
# v3 incompatibility with OpenStack raised upstream at
|
|
|
|
# https://github.com/Julian/jsonschema/issues/604
|
|
|
|
Version: 3.0.2
|
2012-07-26 15:56:42 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: An implementation of JSON-Schema validation for Python
|
2012-11-22 16:43:46 +01:00
|
|
|
License: MIT
|
2019-09-20 14:03:14 +02:00
|
|
|
URL: https://github.com/Julian/jsonschema
|
2017-04-20 00:13:38 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/j/jsonschema/jsonschema-%{version}.tar.gz
|
2019-09-20 14:03:14 +02:00
|
|
|
BuildRequires: %{python_module Twisted}
|
|
|
|
BuildRequires: %{python_module attrs >= 17.4.0}
|
|
|
|
BuildRequires: %{python_module idna}
|
|
|
|
BuildRequires: %{python_module jsonpointer > 1.13}
|
2018-01-24 11:25:06 +01:00
|
|
|
BuildRequires: %{python_module mock}
|
2019-09-20 14:03:14 +02:00
|
|
|
BuildRequires: %{python_module pyrsistent >= 0.14.0}
|
|
|
|
BuildRequires: %{python_module rfc3987}
|
|
|
|
BuildRequires: %{python_module setuptools_scm}
|
2017-04-19 16:21:41 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-09-20 14:03:14 +02:00
|
|
|
BuildRequires: %{python_module six >= 1.11.0}
|
|
|
|
BuildRequires: %{python_module strict-rfc3339}
|
|
|
|
BuildRequires: %{python_module webcolors}
|
2018-01-24 11:25:06 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-09-20 14:03:14 +02:00
|
|
|
Requires: python-attrs >= 17.4.0
|
|
|
|
Requires: python-pyrsistent >= 0.14.0
|
|
|
|
Requires: python-six >= 1.11.0
|
2019-04-08 21:16:37 +02:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
|
|
|
BuildArch: noarch
|
2019-09-20 14:03:14 +02:00
|
|
|
%if %{with python2}
|
|
|
|
BuildRequires: python2-functools32
|
|
|
|
%endif
|
2018-01-24 11:25:06 +01:00
|
|
|
%ifpython2
|
|
|
|
Requires: python-functools32
|
|
|
|
%endif
|
2017-04-19 16:21:41 +02:00
|
|
|
%python_subpackages
|
2012-07-26 15:56:42 +02:00
|
|
|
|
|
|
|
%description
|
2019-04-08 21:16:37 +02:00
|
|
|
jsonschema is an implementation of JSON Schema (currently in Draft 3)
|
|
|
|
for Python (supporting 2.6+ including Python 3).
|
2012-07-26 15:56:42 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n jsonschema-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-04-19 16:21:41 +02:00
|
|
|
%python_build
|
2012-07-26 15:56:42 +02:00
|
|
|
|
|
|
|
%install
|
2017-04-19 16:21:41 +02:00
|
|
|
%python_install
|
2019-09-20 14:03:14 +02:00
|
|
|
# Remove benchmark tests
|
|
|
|
%{python_expand rm -r %{buildroot}%{$python_sitelib}/jsonschema/benchmarks %{buildroot}%{$python_sitelib}/jsonschema/tests
|
2019-10-14 15:50:18 +02:00
|
|
|
%fdupes %{buildroot}%{$python_sitelib}
|
2019-09-20 14:03:14 +02:00
|
|
|
}
|
2019-04-08 21:16:37 +02:00
|
|
|
|
|
|
|
# Prepare for update-alternatives usage
|
2017-04-19 16:21:41 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/jsonschema
|
2012-07-26 15:56:42 +02:00
|
|
|
|
|
|
|
%check
|
2019-09-20 14:03:14 +02:00
|
|
|
%python_exec setup.py test --test-suite=jsonschema.tests
|
2012-07-26 15:56:42 +02:00
|
|
|
|
2014-09-15 16:01:21 +02:00
|
|
|
%post
|
2017-04-19 16:21:41 +02:00
|
|
|
%python_install_alternative jsonschema
|
2014-09-15 16:01:21 +02:00
|
|
|
|
|
|
|
%preun
|
2017-04-19 16:21:41 +02:00
|
|
|
%python_uninstall_alternative jsonschema
|
2014-09-15 16:01:21 +02:00
|
|
|
|
2017-04-19 16:21:41 +02:00
|
|
|
%files %{python_files}
|
2019-01-14 16:25:05 +01:00
|
|
|
%license COPYING
|
|
|
|
%doc README.rst
|
2017-04-19 16:21:41 +02:00
|
|
|
%python_alternative %{_bindir}/jsonschema
|
2012-07-26 15:56:42 +02:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|