From 099c4e855a333b2e0f30d8bd753e667a61ee6f007a33ac6e9c009c3e5f6faa5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Fri, 30 Apr 2021 11:27:04 +0000 Subject: [PATCH] Accepting request 889410 from home:jayvdb:py-submit maintained fork of python-jsonpath-rw OBS-URL: https://build.opensuse.org/request/show/889410 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpath-ng?expand=0&rev=1 --- .gitattributes | 23 +++++++++++ .gitignore | 1 + jsonpath-ng-1.5.1.tar.gz | 3 ++ python-jsonpath-ng.changes | 15 +++++++ python-jsonpath-ng.spec | 84 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 126 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 jsonpath-ng-1.5.1.tar.gz create mode 100644 python-jsonpath-ng.changes create mode 100644 python-jsonpath-ng.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/jsonpath-ng-1.5.1.tar.gz b/jsonpath-ng-1.5.1.tar.gz new file mode 100644 index 0000000..4ae37fc --- /dev/null +++ b/jsonpath-ng-1.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38a6affa5b7a62e038d4701c319803cd2931f033faaabbecc407112333158544 +size 30261 diff --git a/python-jsonpath-ng.changes b/python-jsonpath-ng.changes new file mode 100644 index 0000000..ae70254 --- /dev/null +++ b/python-jsonpath-ng.changes @@ -0,0 +1,15 @@ +------------------------------------------------------------------- +Thu Apr 29 19:50:19 UTC 2021 - John Vandenberg + +- Tidy spec +- Activate test suite + +------------------------------------------------------------------- +Sun Apr 25 13:23:04 UTC 2021 - Martin Hauke + +- Package cleanup + +------------------------------------------------------------------- +Sat May 23 07:54:17 PM UTC 2020 - John Vandenberg + +- Initial spec for v1.5.1 diff --git a/python-jsonpath-ng.spec b/python-jsonpath-ng.spec new file mode 100644 index 0000000..298e538 --- /dev/null +++ b/python-jsonpath-ng.spec @@ -0,0 +1,84 @@ +# +# spec file for package python-jsonpath-ng +# +# 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/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-jsonpath-ng +Version: 1.5.1 +Release: 0 +Summary: JSONPath for Python +License: Apache-2.0 +Group: Development/Languages/Python +URL: https://github.com/h2non/jsonpath-ng +Source: https://github.com/h2non/jsonpath-ng/archive/refs/tags/v%{version}.tar.gz#/jsonpath-ng-%{version}.tar.gz +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires: python-decorator +Requires: python-ply +Requires: python-six +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module decorator} +BuildRequires: %{python_module ply} +# +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module six} +BuildRequires: python3-oslotest +# /SECTION +%python_subpackages + +%description +A final implementation of JSONPath for Python that aims to be +standard compliant, including arithmetic and binary comparison +operators and providing clear AST for metaprogramming. + +%prep +%setup -q -n jsonpath-ng-%{version} +sed -i '1{/^#!/d}' jsonpath_ng/bin/jsonpath.py +cp tests/test_jsonpath_rw_ext.py /tmp + +%build +%python_build + +%install +%python_install +%python_clone -a %{buildroot}%{_bindir}/jsonpath_ng +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%post +%python_install_alternative jsonpath_ng + +%postun +%python_uninstall_alternative jsonpath_ng + +%check +export PYTHONPATH=${CWD} +%{python_expand cp /tmp/test_jsonpath_rw_ext.py tests/ +if [[ ! -d %{buildroot}%{$python_sitelib}/oslotest ]]; then + rm tests/test_jsonpath_rw_ext.py +fi +$python setup.py test +} + +%files %{python_files} +%license LICENSE +%doc README.rst History.md +%python_alternative %{_bindir}/jsonpath_ng +%{python_sitelib}/jsonpath_ng* + +%changelog