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-04-18 10:50:39 +02:00
|
|
|
# Please, do not update to the current version, it breaks numerous other
|
|
|
|
# packages, because of unstable API.
|
2019-04-08 21:16:37 +02:00
|
|
|
Version: 2.6.0
|
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
|
2012-07-26 15:56:42 +02:00
|
|
|
Group: Development/Languages/Python
|
2019-04-08 21:16:37 +02:00
|
|
|
Url: http://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
|
2018-01-24 11:25:06 +01:00
|
|
|
BuildRequires: %{python_module mock}
|
2017-04-19 16:21:41 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-05-21 10:59:27 +02:00
|
|
|
BuildRequires: %{python_module vcversioner >= 2.16.0.0}
|
2018-01-24 11:25:06 +01:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2019-03-28 16:04:01 +01:00
|
|
|
%if %{with python2}
|
|
|
|
BuildRequires: python2-functools32
|
|
|
|
%endif
|
2019-04-08 21:16:37 +02:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(preun): update-alternatives
|
|
|
|
BuildArch: noarch
|
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-04-08 21:16:37 +02:00
|
|
|
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
# 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-04-08 21:16:37 +02:00
|
|
|
%python_exec -m unittest jsonschema.tests.test_jsonschema_test_suite
|
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
|