summaryrefslogtreecommitdiff
path: root/python-jmespath.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-10 07:04:21 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-10 07:04:21 +0000
commite949909e6a3677df98466be453470e8f057fcb93 (patch)
tree2e6c1215c1ac587258da77eca4297cfdd87826cc /python-jmespath.spec
parent5e187aa83e7402f325af3af9f0ffc1c30bf3d413 (diff)
automatic import of python-jmespath
Diffstat (limited to 'python-jmespath.spec')
-rw-r--r--python-jmespath.spec126
1 files changed, 126 insertions, 0 deletions
diff --git a/python-jmespath.spec b/python-jmespath.spec
new file mode 100644
index 0000000..84aa8c5
--- /dev/null
+++ b/python-jmespath.spec
@@ -0,0 +1,126 @@
+%global _empty_manifest_terminate_build 0
+Name: python-jmespath
+Version: 1.0.1
+Release: 1
+Summary: JSON Matching Expressions
+License: MIT
+URL: https://github.com/jmespath/jmespath.py
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/00/2a/e867e8531cf3e36b41201936b7fa7ba7b5702dbef42922193f05c8976cd6/jmespath-1.0.1.tar.gz
+BuildArch: noarch
+
+
+%description
+JMESPath (pronounced "james 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"].
+
+%package -n python3-jmespath
+Summary: JSON Matching Expressions
+Provides: python-jmespath
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-jmespath
+JMESPath (pronounced "james 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"].
+
+%package help
+Summary: Development documents and examples for jmespath
+Provides: python3-jmespath-doc
+%description help
+JMESPath (pronounced "james 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 -n jmespath-1.0.1
+
+%build
+%py3_build
+
+%install
+%py3_install
+install -d -m755 %{buildroot}/%{_pkgdocdir}
+if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
+if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
+if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
+if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
+pushd %{buildroot}
+if [ -d usr/lib ]; then
+ find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/lib64 ]; then
+ find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/bin ]; then
+ find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+if [ -d usr/sbin ]; then
+ find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
+fi
+touch doclist.lst
+if [ -d usr/share/man ]; then
+ find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
+fi
+popd
+mv %{buildroot}/filelist.lst .
+mv %{buildroot}/doclist.lst .
+
+%files -n python3-jmespath -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.1-1
+- Package Spec generated