Sync from SUSE:ALP:Source:Standard:1.0 saltbundlepy-jmespath revision 38927aa1ef51958e3e7fd244114c93e1

This commit is contained in:
Adrian Schröter 2024-07-12 12:20:11 +02:00
commit 2cbb061ec5
4 changed files with 323 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

BIN
jmespath-1.0.1.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,190 @@
-------------------------------------------------------------------
Thu Sep 21 13:18:04 UTC 2023 - Victor Zhestkov <vzhestkov@suse.com>
- Disable %check section to reduce the number of dependencies
to build the Salt Bundle
-------------------------------------------------------------------
Sat Sep 17 15:41:47 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 1.0.1:
* Drop support for Python versions less than 3.7 (including Python 2).
- drop remove-nose.patch (upstream)
-------------------------------------------------------------------
Mon Sep 27 03:03:07 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
- Add patch remove-nose.patch:
* Remove use of nose in the tests.
-------------------------------------------------------------------
Mon May 31 08:00:06 UTC 2021 - pgajdos@suse.com
- use github tarball to use upstream tests
- %check: use %pyunittest rpm macro to test the package
- deleted sources
- test_hypothesis.py (not needed)
-------------------------------------------------------------------
Tue Jun 2 16:21:51 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 0.10.0:
* Python 2.6 and 3.3 have reached end-of-life and have been deprecated. (issue 175)
* Fix race condition when clearing cached parsed expressions. (issue 197)
-------------------------------------------------------------------
Wed Mar 11 09:37:57 UTC 2020 - Dirk Mueller <dmueller@suse.com>
- update to 0.9.5:
* * Fix syntax warnings on python 3.8
-------------------------------------------------------------------
Tue Mar 26 14:43:27 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 0.9.4:
* Fix min_by/max_by with empty lists (`issue 151)
* Fix reverse type for null type (issue 145)
-------------------------------------------------------------------
Mon Mar 18 06:06:26 UTC 2019 - John Vandenberg <jayvdb@gmail.com>
- Add extra testing with hypothesis
- Remove unnecessary dependency on python-base
- Update to v0.9.4
* Fix min_by/max_by with empty lists
* Fix reverse type for null type
-------------------------------------------------------------------
Tue Dec 4 12:49:31 UTC 2018 - Matej Cepl <mcepl@suse.com>
- Remove superfluous devel dependency for noarch package
-------------------------------------------------------------------
Thu Aug 16 10:24:41 UTC 2018 - jengelh@inai.de
- Use noun phrase for summary.
-------------------------------------------------------------------
Mon Aug 13 11:20:47 UTC 2018 - mcepl@suse.com
- Remove dependency on unittest2
- Clean up SPEC file
-------------------------------------------------------------------
Thu Nov 9 23:08:53 UTC 2017 - rjschwei@suse.com
- Update to 0.9.3:
+ Fix issue where long types in py2 and Decimal types were not
being evaluated as numbers (issue 125)
+ Handle numbers in scientific notation in to_number() function (issue 120)
+ Fix issue where custom functions would override the function
table of the builtin function class (issue 133)
-------------------------------------------------------------------
Wed Mar 29 14:15:59 UTC 2017 - jmatejek@suse.com
- properly Requires(postun) for %postun section
-------------------------------------------------------------------
Wed Mar 29 08:16:19 UTC 2017 - tbechtold@suse.com
- Only BuildRequire unittest2 for python2
-------------------------------------------------------------------
Thu Mar 16 18:43:59 UTC 2017 - rjschwei@suse.com
- Switch to single-spec build
- Update to version 0.9.2
+ Fix regression when using ordering comparators on strings (issue 124)
- From 0.9.1
+ Raise LexerError on invalid numbers (issue 98)
+ Add support for custom functions (#100) (issue 100)
+ Fix ZeroDivisionError for built-in function avg() on empty lists (#115)
(issue 115)
+ Properly handle non numerical ordering operators (#117) (issue 117)
-------------------------------------------------------------------
Mon Aug 15 14:51:56 UTC 2016 - toddrme2178@gmail.com
- Fix update-alternatives implementation.
-------------------------------------------------------------------
Mon Feb 1 11:24:14 UTC 2016 - toddrme2178@gmail.com
- Update to version 0.9.0
* Add support for new lines with tokens in an expression
* Add support for JEP 9 which introduces "and" expressions, "unary"
expressions, "not" expressions, and "paren" expressions
* Fix issue with hardcoded path in ``jp.py`` executable
(issue 90, issue 88, issue 82)
- Update to version 0.8.0
* Improve lexing performance (issue 84)
* Fix parsing error for multiselect lists (issue 86)
* Fix issue with escaping single quotes in literal strings (issue 85)
* Add support for providing your own dict cls to support
ordered dictionaries (issue 94)
* Add map() function (issue 95)
-------------------------------------------------------------------
Wed Jan 20 19:42:39 UTC 2016 - rjschwei@suse.com
- Fix build issues for SLE 11
+ More test dependencies required
-------------------------------------------------------------------
Wed Jan 20 19:08:32 UTC 2016 - rjschwei@suse.com
- Manage the jp executable with update-alternatives now that
python3-jmespath exists
- spec file improvements
-------------------------------------------------------------------
Wed May 27 17:04:07 UTC 2015 - rjschwei@suse.com
- Update to version 0.7.1:
* Rename ``bin/jp`` to ``bin/jp.py``
* Fix issue with precedence when parsing wildcard
projections
* Remove ordereddict and simplejson as py2.6 dependencies.
These were never actually used in the jmespath code base,
only in the unit tests. Unittests requirements are handled
via requirements26.txt.
-------------------------------------------------------------------
Sun Apr 26 16:57:39 UTC 2015 - benoit.monin@gmx.fr
- update to version 0.7.0:
* Add support for JEP-12, raw string literals
* Support .whl files
- additional changes from version 0.6.2:
* Implement JEP-10, slice projections
* Fix bug with filter projection parsing
* Add to_array function
* Add merge function
* Fix error messages for function argument type errors
- point source URL to pypi
-------------------------------------------------------------------
Thu Mar 26 21:40:43 UTC 2015 - aboe76@gmail.com
- Updated to version 0.6.1
+ No Upstream Changelog
-------------------------------------------------------------------
Sun Jan 18 13:13:01 UTC 2015 - rschweikert@suse.com
- Update to version 0.5.0
+ No upstream changelog
+ Update in support for fix of bnc#905354
-------------------------------------------------------------------
Thu Oct 23 23:55:43 UTC 2014 - rschweikert@suse.com
- Update to version 0.4.1
+ No upstream changelog
-------------------------------------------------------------------
Sat Jan 18 11:35:01 UTC 2014 - rschweikert@suse.com
- Initial build

107
saltbundlepy-jmespath.spec Normal file
View File

@ -0,0 +1,107 @@
#
# spec file for package saltbundlepy-jmespath
#
# Copyright (c) 2023 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/
#
%{?!saltbundlepy_module:%define saltbundlepy_module() saltbundlepy-%{**}}
%define pythons saltbundlepy
Name: saltbundlepy-jmespath
Version: 1.0.1
Release: 0
Summary: Python module for declarative JSON document element extraction
License: MIT
Group: Development/Libraries/Python
URL: https://github.com/jmespath/jmespath.py
Source: https://github.com/jmespath/jmespath.py/archive/refs/tags/%{version}.tar.gz#/jmespath-%{version}.tar.gz
BuildRequires: %{saltbundlepy_module base >= 3.10}
BuildRequires: %{saltbundlepy_module setuptools}
%if %{with test}
BuildRequires: %{saltbundlepy_module ply >= 3.4}
BuildRequires: %{saltbundlepy_module pytest}
BuildRequires: %{saltbundlepy_module simplejson}
%endif
BuildRequires: fdupes
BuildRequires: saltbundlepy-rpm-macros
Requires: saltbundlepy-ply >= 3.4
Requires: saltbundlepy-simplejson
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
%description
JMESPath (pronounced "jaymz path") allows you to declaratively specify how
to extract elements from a JSON document.
For example, given this document:
{"foo": {"bar": "baz"}}
The jmespath expression foo.bar will return "baz".
JMESPath also supports:
Referencing elements in a list. Given the data:
{"foo": {"bar": ["one", "two"]}}
The expression: foo.bar[0] will return "one". You can also reference all
the items in a list using the * syntax:
{"foo": {"bar": [{"name": "one"}, {"name": "two"}]}}
The expression: foo.bar[*].name will return ["one", "two"]. Negative
indexing is also supported (-1 refers to the last element in the list).
Given the data above, the expression foo.bar[-1].name will return ["two"].
The * can also be used for hash types:
{"foo": {"bar": {"name": "one"}, "baz": {"name": "two"}}}
The expression: foo.*.name will return ["one", "two"].
%prep
%autosetup -p1 -n jmespath.py-%{version}
%build
%python_build
%install
%python_install
mv %{buildroot}%{_bindir}/jp.py %{buildroot}%{_bindir}/jp
%python_clone -a %{buildroot}%{_bindir}/jp
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with test}
%check
# hangs on python 3.8 with pytest
%pyunittest discover -v
%endif
%post
%python_install_alternative jp
%postun
%python_uninstall_alternative jp
%files %{python_files}
%license LICENSE.txt
%doc README.rst
%{python_sitelib}/*
%python_alternative %{_bindir}/jp
%changelog