Accepting request 1161729 from home:glaubitz:branches:devel:languages:python

- Switch build system from setuptools to pyproject.toml
  + Add python-pip and python-wheel to BuildRequires
  + Replace %python_build with %pyproject_wheel
  + Replace %python_install with %pyproject_install
- Limit Python files matched in %files section

OBS-URL: https://build.opensuse.org/request/show/1161729
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jsondiff?expand=0&rev=22
This commit is contained in:
Robert Schweikert 2024-03-26 12:15:05 +00:00 committed by Git OBS Bridge
parent ca233bebd3
commit 1bf636c0da
2 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,12 @@
-------------------------------------------------------------------
Tue Mar 26 12:08:46 UTC 2024 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Switch build system from setuptools to pyproject.toml
+ Add python-pip and python-wheel to BuildRequires
+ Replace %python_build with %pyproject_wheel
+ Replace %python_install with %pyproject_install
- Limit Python files matched in %files section
-------------------------------------------------------------------
Tue Jun 13 12:15:54 UTC 2023 - ecsos <ecsos@opensuse.org>

View File

@ -1,7 +1,7 @@
#
# spec file for package python-jsondiff
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -27,13 +27,15 @@ Source: https://github.com/ZoomerAnalytics/jsondiff/archive/%{version}.t
# PATCH-FEATURE-UPSTREAM remove_nose.patch bsc#[0-9]+ mcepl@suse.com
# Replace nose-random plugin with ripped of version independent of nose.
Patch0: remove_nose.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun):update-alternatives
Requires(postun): update-alternatives
BuildArch: noarch
%python_subpackages
@ -44,10 +46,10 @@ Package to show differences between JSON and JSON-like structures in Python
%autosetup -p1 -n jsondiff-%{version}
%build
%python_build
%pyproject_wheel
%install
%python_install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/jdiff
%python_expand %fdupes %{buildroot}%{$python_sitelib}
@ -63,7 +65,8 @@ Package to show differences between JSON and JSON-like structures in Python
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitelib}/*
%{python_sitelib}/jsondiff
%{python_sitelib}/jsondiff-*.dist-info
%python_alternative %{_bindir}/jdiff
%changelog