diff --git a/jsonpatch-1.32.tar.gz b/jsonpatch-1.32.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..6f1fa906a841794290e7d57efeb98e6b66d1b23f Binary files /dev/null and b/jsonpatch-1.32.tar.gz differ diff --git a/python-jsonpatch.spec b/python-jsonpatch.spec new file mode 100644 index 0000000000000000000000000000000000000000..6cf5032631656309b5d35a3c5c43c25b65de9936 --- /dev/null +++ b/python-jsonpatch.spec @@ -0,0 +1,59 @@ +%define anolis_release 1 +%global pypi_name jsonpatch + +Name: python-%{pypi_name} +Version: 1.32 +Release: %{anolis_release}%{dist} +Summary: Applying JSON Patches in Python + +License: BSD +URL: https://github.com/stefankoegl/python-json-patch +Source0: https://pypi.io/packages/source/j/jsonpatch/%{pypi_name}-%{version}.tar.gz + +BuildArch: noarch + +%description +Library to apply JSON Patches according to RFC 6902 - Python 2 build. + +%package -n python3-%{pypi_name} +Summary: Applying JSON Patches in Python 3 + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-jsonpointer +Requires: python3-jsonpointer + +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +Library to apply JSON Patches according to RFC 6902 - Python 3 build. + +%prep +%setup -qn python-json-patch-%{version} + +%build +%py3_build + +%install +%py3_install +# remove jsondiff binary conflicting with python-jsondiff +rm %{buildroot}%{_bindir}/jsondiff +mv %{buildroot}%{_bindir}/jsonpatch %{buildroot}%{_bindir}/jsonpatch-%{python3_version} +ln -s ./jsonpatch-%{python3_version} %{buildroot}%{_bindir}/jsonpatch-3 +ln -s ./jsonpatch-%{python3_version} %{buildroot}%{_bindir}/jsonpatch + +%check +%{__python3} tests.py + +%files -n python3-%{pypi_name} +%doc README.md +%license COPYING +%{_bindir}/jsonpatch +%{_bindir}/jsonpatch-3* +%{python3_sitelib}/%{pypi_name}.py* +%{python3_sitelib}/__pycache__/* +%{python3_sitelib}/%{pypi_name}-%{version}-py%{python3_version}.egg-info + +%changelog +* Tue Apr 19 2022 Zhongling He 1.32-1 +- Init package from upstream v1.32