Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
systemsmanagement:saltstack:bundle:AlmaLinux9
saltbundlepy-jmespath
saltbundlepy-jmespath.spec
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File saltbundlepy-jmespath.spec of Package saltbundlepy-jmespath
# # 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
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor