2013-02-22 15:01:49 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-jsonpointer
|
|
|
|
#
|
2023-04-21 16:37:17 +02:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2013-02-22 15:01:49 +01: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.
|
|
|
|
|
2018-12-04 14:36:10 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2013-04-29 15:39:48 +02:00
|
|
|
#
|
2013-02-22 15:01:49 +01:00
|
|
|
|
|
|
|
|
2021-11-06 11:27:39 +01:00
|
|
|
%if 0%{?suse_version} > 1500
|
|
|
|
%bcond_without libalternatives
|
|
|
|
%else
|
|
|
|
%bcond_with libalternatives
|
|
|
|
%endif
|
|
|
|
|
2023-04-21 16:37:17 +02:00
|
|
|
%{?sle15_python_module_pythons}
|
2013-02-22 15:01:49 +01:00
|
|
|
Name: python-jsonpointer
|
2023-11-27 20:29:28 +01:00
|
|
|
Version: 2.4
|
2013-02-22 15:01:49 +01:00
|
|
|
Release: 0
|
2019-03-29 10:21:23 +01:00
|
|
|
Summary: Module to identify specific nodes in a JSON document
|
2013-04-29 15:39:48 +02:00
|
|
|
License: BSD-3-Clause
|
2013-02-22 15:01:49 +01:00
|
|
|
Group: Development/Languages/Python
|
2019-03-28 15:41:15 +01:00
|
|
|
URL: https://github.com/stefankoegl/python-json-pointer
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz
|
2017-08-08 08:33:14 +02:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2019-03-28 15:41:15 +01:00
|
|
|
BuildRequires: fdupes
|
2021-11-06 11:27:39 +01:00
|
|
|
BuildRequires: python-rpm-macros >= 20210929
|
|
|
|
%if %{with libalternatives}
|
|
|
|
Requires: alts
|
|
|
|
BuildRequires: alts
|
|
|
|
%else
|
2016-08-15 17:52:22 +02:00
|
|
|
Requires(post): update-alternatives
|
2021-12-06 19:02:16 +01:00
|
|
|
Requires(preun):update-alternatives
|
2021-11-06 11:27:39 +01:00
|
|
|
%endif
|
2013-02-22 15:01:49 +01:00
|
|
|
BuildArch: noarch
|
2017-08-08 08:33:14 +02:00
|
|
|
%python_subpackages
|
2013-02-22 15:01:49 +01:00
|
|
|
|
|
|
|
%description
|
2019-03-29 10:21:23 +01:00
|
|
|
A module to identify specific nodes in a JSON document (according to draft 08).
|
2013-02-22 15:01:49 +01:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q -n jsonpointer-%{version}
|
|
|
|
|
|
|
|
%build
|
2017-08-08 08:33:14 +02:00
|
|
|
%python_build
|
2013-02-22 15:01:49 +01:00
|
|
|
|
|
|
|
%install
|
2017-08-08 08:33:14 +02:00
|
|
|
%python_install
|
2019-03-28 15:41:15 +01:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2017-08-08 08:33:14 +02:00
|
|
|
%python_clone -a %{buildroot}%{_bindir}/jsonpointer
|
2014-09-15 16:01:37 +02:00
|
|
|
|
2019-03-28 15:41:15 +01:00
|
|
|
%check
|
|
|
|
%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python tests.py
|
|
|
|
|
2021-11-06 11:27:39 +01:00
|
|
|
%pre
|
|
|
|
# If libalternatives is used: Removing old update-alternatives entries.
|
|
|
|
%python_libalternatives_reset_alternative jsonpointer
|
|
|
|
|
2014-09-15 16:01:37 +02:00
|
|
|
%post
|
2017-08-08 08:33:14 +02:00
|
|
|
%python_install_alternative jsonpointer
|
2014-09-15 16:01:37 +02:00
|
|
|
|
|
|
|
%preun
|
2017-08-08 08:33:14 +02:00
|
|
|
%python_uninstall_alternative jsonpointer
|
2013-02-22 15:01:49 +01:00
|
|
|
|
2017-08-08 08:33:14 +02:00
|
|
|
%files %{python_files}
|
2019-03-28 15:41:15 +01:00
|
|
|
%doc README.md
|
|
|
|
%license LICENSE.txt
|
2017-08-08 08:33:14 +02:00
|
|
|
%python_alternative %{_bindir}/jsonpointer
|
2013-02-22 15:01:49 +01:00
|
|
|
%{python_sitelib}/*
|
|
|
|
|
|
|
|
%changelog
|