15
0
Files
python-jsonpath-ng/python-jsonpath-ng.spec
Markéta Machová 034d4ddfc7 Accepting request 1111494 from home:pgajdos:python
- version update to 1.6.0
  1.6.0 / 2023-09-13
  *  Enclose field names containing literals in quotes
  *  Add note about extensions
  *  Remove documentation status link
  *  Update supported versions in setup.py
  *  Add LICENSE file
  *  Code cleanup
  *  Remove dependency on six
  *  Update build status badge
  *  (origin/github-actions, github-actions) Remove testscenarios dependency
  *  Remove pytest version constraints
  *  Add testing with GitHub actions
  *  Escape back slashes in tests to avoid DeprecationWarning.
  *  Use raw strings for regular expressions to avoid DeprecationWarning.
  *  refactor(package): remove dependency for decorator
  *  Merge pull request #128 from michaelmior/hashable
  *  (origin/hashable, hashable) Make path instances hashable
  *  Merge pull request #122 from snopoke/snopoke-patch-1
  *  Add more detail to filter docs.
  *  remove incorrect parenthesis in filter examples
  *  Merge pull request #119 from snopoke/patch-1
  *  add 'sub' line with function param names
  *  readme formatting fixes
  *  chore(history): update
  *  Update __init__.py
  1.5.3 / 2021-07-05
  * Update __init__.py
  * Update setup.py
  * Merge pull request #72 from kaapstorm/find_or_create

OBS-URL: https://build.opensuse.org/request/show/1111494
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsonpath-ng?expand=0&rev=4
2023-09-18 15:34:25 +00:00

84 lines
2.4 KiB
RPMSpec

#
# spec file for package python-jsonpath-ng
#
# 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/
#
Name: python-jsonpath-ng
Version: 1.6.0
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
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
# SECTION test requirements
BuildRequires: %{python_module ply}
#
BuildRequires: %{python_module pytest}
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 -m pytest
}
%files %{python_files}
%license LICENSE
%doc README.rst History.md
%python_alternative %{_bindir}/jsonpath_ng
%{python_sitelib}/jsonpath_ng*
%changelog