# # spec file for package python-jsonpointer # # Copyright (c) 2021 SUSE LLC # # 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 https://bugs.opensuse.org/ # %if 0%{?suse_version} > 1500 %bcond_without libalternatives %else %bcond_with libalternatives %endif %{?!python_module:%define python_module() python-%{**} python3-%{**}} %global skip_python2 1 %define skip_python36 1 %define skip_python39 1 Name: python-jsonpointer Version: 2.2 Release: 1.3 Summary: Module to identify specific nodes in a JSON document License: BSD-3-Clause Group: Development/Languages/Python URL: https://github.com/stefankoegl/python-json-pointer Source: https://files.pythonhosted.org/packages/source/j/jsonpointer/jsonpointer-%{version}.tar.gz BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros >= 20210929 %if %{with libalternatives} Requires: alts BuildRequires: alts %else Requires(post): update-alternatives Requires(preun):update-alternatives %endif BuildArch: noarch %python_subpackages %description A module to identify specific nodes in a JSON document (according to draft 08). %prep %setup -q -n jsonpointer-%{version} %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %python_clone -a %{buildroot}%{_bindir}/jsonpointer %check %python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} $python tests.py %pre # If libalternatives is used: Removing old update-alternatives entries. %python_libalternatives_reset_alternative jsonpointer %post %python_install_alternative jsonpointer %preun %python_uninstall_alternative jsonpointer %files %{python_files} %doc README.md %license LICENSE.txt %python_alternative %{_bindir}/jsonpointer %{python_sitelib}/* %changelog * Mon Dec 6 2021 Dirk Müller - update to 2.2: * Add method and add classmethod tag * Add test for get_parts * Sun Aug 22 2021 Stefan Schubert - Use libalternatives instead of update-alternatives. * Mon Mar 15 2021 Dirk Müller - update to 2.1: * py 3.7-3.9 support * Avoid converting readme to rST for PyPI upload * Fix typos in messages * Use SVG versions of status icons in README.md * Thu Mar 28 2019 Jan Engelhardt - Use noun phrase in descriptions. * Thu Mar 28 2019 Tomáš Chvátal - Update to 2.0: * Fix typos in messages * Accept pointer as argument in commandline utility - Run tests * Tue Dec 4 2018 Matej Cepl - Remove superfluous devel dependency for noarch package * Tue Nov 14 2017 dmueller@suse.com - update to 1.14: * Support for python 3.6 * Tue Aug 8 2017 tbechtold@suse.com - convert to singlespec * Tue Nov 15 2016 dmueller@suse.com - update to 1.10: * Drop support for Python 3.2 * Add support for Python 3.5 * Mon Aug 15 2016 toddrme2178@gmail.com - Fix update-alternatives implementation. * Mon Jun 22 2015 tbechtold@suse.com - update to 1.9: * bump version to 1.9 * bump version to 1.8 * Fix Tests for Python 3.2 * Fix UnicodeEncodeError with non-ASCII paths, fixes #18 * Enable container-based builds on Travis-CI * Wed Feb 4 2015 tbechtold@suse.com - update to version 1.7: * bump version to 1.7 * Fix ``jsonpointer`` commandline utility (#14) * bump version to 1.6 * Fix contains unexpected false return * bump version to 1.5 * Use ABCs instead of list/dict * Convert readme from markdown to rst for PyPI * Add support for Python 3.4, pypy3, use travis_retry * Add dependencies for creating wheels - Requires(pre) coreutils to have "rm" command available (bnc#916277) * Sat Nov 8 2014 Led - fix bashism in pre script * Mon Sep 15 2014 tbechtold@suse.com - update to version 1.4: * bump version to 1.4 * [Setup] use utf-8 explicitly in setup.py, fixes #8 * Merge pull request #7 from alexsdutton/patch-1 * Calculate path properly when self.parts == []. * Added tests for round-tripping pointers from paths to parts * JsonPointer.from_parts should handle the empty path * fix doctest for Python 3 * bump version to 1.3 * add JsonPointer.path and JsonPointer.from_parts * bump version to 1.2 * add trove classifiers (fixes #6) * fix string formatting in assert statement * fix typo in setup.py * add links to README.md * add MANIFEST.in * add comments to commandline doc * add "jsonpointer" commandline utility * add missing AUTHORS * Support for set_pointer and indexing arbitrary objects via __getitem__/__setitem__ * refactor type check * add tests for JsonPointer.to_last() * remove unused param of to_last() * add test for out-of-bounds error * add test for JsonPointer.contains(other) * add test for invalid list index * add test for pointer string not starting with / * add test for comparing a pointer to another object * show pypi information in README * show coverage status in README * remove some code from coverage calculation * move coverage code from tests.py to makefile * add coveralls support to .travis.yml * add doctests for pairwise(iter) * mention supported Python versions in docs * Drop support for Python 2.5 * also target Python 3.3 and PyPy * fix unicode literal quirks in Python 3.2 * let sphinx extract version, author from source * README: add link to docs * add some documentation * ignore *.swp and files generated during packaging - Install /usr/bin/jsonpointer with update-alternatives * Mon Apr 29 2013 dmueller@suse.com - update to 1.0: * no changes * Fri Feb 22 2013 saschpe@suse.de - Initial version