From a51c3e91f7acdb058989908ef7061cb15244a93b Mon Sep 17 00:00:00 2001 From: mgb01105731 Date: Mon, 27 Feb 2023 11:26:53 +0800 Subject: [PATCH] optimise dependency --- python-jsonpatch.spec | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/python-jsonpatch.spec b/python-jsonpatch.spec index 6cf5032..cd34437 100644 --- a/python-jsonpatch.spec +++ b/python-jsonpatch.spec @@ -1,4 +1,4 @@ -%define anolis_release 1 +%define anolis_release 2 %global pypi_name jsonpatch Name: python-%{pypi_name} @@ -19,7 +19,6 @@ Library to apply JSON Patches according to RFC 6902 - Python 2 build. Summary: Applying JSON Patches in Python 3 BuildRequires: python3-devel -BuildRequires: python3-setuptools BuildRequires: python3-jsonpointer Requires: python3-jsonpointer @@ -28,14 +27,24 @@ Requires: python3-jsonpointer %description -n python3-%{pypi_name} Library to apply JSON Patches according to RFC 6902 - Python 3 build. +%package -n python3-%{pypi_name}-doc +Summary: doc files for python3-%{pypi_name} +Requires: python3-%{pypi_name} = %{version}-%{release} + +%description -n python3-%{pypi_name}-doc +doc files for python3-%{pypi_name} + %prep %setup -qn python-json-patch-%{version} +%generate_buildrequires +%pyproject_buildrequires + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install # remove jsondiff binary conflicting with python-jsondiff rm %{buildroot}%{_bindir}/jsondiff mv %{buildroot}%{_bindir}/jsonpatch %{buildroot}%{_bindir}/jsonpatch-%{python3_version} @@ -46,14 +55,19 @@ ln -s ./jsonpatch-%{python3_version} %{buildroot}%{_bindir}/jsonpatch %{__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 +%{python3_sitelib}/%{pypi_name}-%{version}.dist-info/ + +%files -n python3-%{pypi_name}-doc +%doc README.md -%changelog +%changelog +* Mon Feb 27 2023 mgb01105731 - 1.32-2 +- optimise dependency + * Tue Apr 19 2022 Zhongling He 1.32-1 - Init package from upstream v1.32 -- Gitee