From 3f70d0620ab4f6c43f4abc336fa185e690a26792 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 7 Jun 2023 21:30:18 +0000 Subject: [PATCH 1/7] Remove obsolete %python_provide. This macro is deprecated and not necessary to begin with. These Provides are generated automatically. --- python-pathspec.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/python-pathspec.spec b/python-pathspec.spec index 4282247..0b36216 100644 --- a/python-pathspec.spec +++ b/python-pathspec.spec @@ -18,7 +18,6 @@ is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files. %package -n python3-pathspec Summary: %{summary} -%{?python_provide:%python_provide python3-pathspec} %description -n python3-pathspec Path Specification (pathspec) is a utility library for pattern matching of file From b39ea2e6b9e4655db4482bcb246738c4fb292f84 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 7 Jun 2023 21:31:34 +0000 Subject: [PATCH 2/7] Adopt new licensing guidelines (SPDX) --- python-pathspec.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pathspec.spec b/python-pathspec.spec index 0b36216..2daeff7 100644 --- a/python-pathspec.spec +++ b/python-pathspec.spec @@ -3,7 +3,7 @@ Version: 0.11.1 Release: 1%{?dist} Summary: Utility library for gitignore style pattern matching of file paths -License: MPLv2.0 +License: MPL-2.0 URL: https://github.com/cpburnz/python-path-specification Source0: https://files.pythonhosted.org/packages/source/p/pathspec/pathspec-%{version}.tar.gz From 5c9b86e0f781d4def2360b590fe8c2fa4393a2ec Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 7 Jun 2023 21:32:43 +0000 Subject: [PATCH 3/7] Replace deprecated setup.py test with %pytest --- python-pathspec.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-pathspec.spec b/python-pathspec.spec index 2daeff7..1e3cb23 100644 --- a/python-pathspec.spec +++ b/python-pathspec.spec @@ -10,6 +10,7 @@ Source0: https://files.pythonhosted.org/packages/source/p/pathspec/pathsp BuildArch: noarch BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3-pytest %description Path Specification (pathspec) is a utility library for pattern matching of file @@ -36,7 +37,7 @@ is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files. %check -%{__python3} setup.py test +%pytest %files -n python3-pathspec %doc README.rst From b9118b192b6f24601c7f3412ab59a45df1fd90a3 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 7 Jun 2023 21:33:27 +0000 Subject: [PATCH 4/7] Use two lines between specfile sections This is conventional and makes the specfile more readable. --- python-pathspec.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python-pathspec.spec b/python-pathspec.spec index 1e3cb23..e33fd6d 100644 --- a/python-pathspec.spec +++ b/python-pathspec.spec @@ -12,11 +12,13 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pytest + %description Path Specification (pathspec) is a utility library for pattern matching of file paths. So far this only includes Git's wildmatch pattern matching which itself is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files. + %package -n python3-pathspec Summary: %{summary} @@ -29,9 +31,11 @@ is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files. %prep %autosetup -n pathspec-%{version} + %build %py3_build + %install %py3_install @@ -39,12 +43,14 @@ is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files. %check %pytest + %files -n python3-pathspec %doc README.rst %license LICENSE %{python3_sitelib}/pathspec %{python3_sitelib}/pathspec-%{version}-py%{python3_version}.egg-info + %changelog * Fri Mar 24 2023 Dan Radez - 0.11.1-1 - update to 0.11.1 rhbz#2178386 From 6672bb2e7a8f0441791ea87bde29b11410a492f7 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 7 Jun 2023 21:36:17 +0000 Subject: [PATCH 5/7] Use %pypi_source instead of manually constructing URL --- python-pathspec.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pathspec.spec b/python-pathspec.spec index e33fd6d..b2a3b8f 100644 --- a/python-pathspec.spec +++ b/python-pathspec.spec @@ -5,7 +5,7 @@ Summary: Utility library for gitignore style pattern matching of file pat License: MPL-2.0 URL: https://github.com/cpburnz/python-path-specification -Source0: https://files.pythonhosted.org/packages/source/p/pathspec/pathspec-%{version}.tar.gz +Source0: %{pypi_source pathspec} BuildArch: noarch BuildRequires: python3-devel From edae475603b260ffe33e4f5aa75335eeb7d75c67 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 7 Jun 2023 21:35:12 +0000 Subject: [PATCH 6/7] Use pyproject-rpm-macros This replaces %py3_build and %py3_install that rely on deprecated setuptools functionality. --- python-pathspec.spec | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/python-pathspec.spec b/python-pathspec.spec index b2a3b8f..9d5deb2 100644 --- a/python-pathspec.spec +++ b/python-pathspec.spec @@ -9,7 +9,6 @@ Source0: %{pypi_source pathspec} BuildArch: noarch BuildRequires: python3-devel -BuildRequires: python3-setuptools BuildRequires: python3-pytest @@ -32,23 +31,26 @@ is derived from Rsync's wildmatch. Git uses wildmatch for its gitignore files. %autosetup -n pathspec-%{version} +%generate_buildrequires +%pyproject_buildrequires + + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files pathspec %check %pytest -%files -n python3-pathspec +%files -n python3-pathspec -f %{pyproject_files} %doc README.rst %license LICENSE -%{python3_sitelib}/pathspec -%{python3_sitelib}/pathspec-%{version}-py%{python3_version}.egg-info %changelog From 5ab31141cc5e12999b2a1cbb644d02a39458cac9 Mon Sep 17 00:00:00 2001 From: Maxwell G Date: Wed, 7 Jun 2023 22:04:59 +0000 Subject: [PATCH 7/7] Don't manually enumerate Sources --- python-pathspec.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-pathspec.spec b/python-pathspec.spec index 9d5deb2..fb15312 100644 --- a/python-pathspec.spec +++ b/python-pathspec.spec @@ -5,7 +5,7 @@ Summary: Utility library for gitignore style pattern matching of file pat License: MPL-2.0 URL: https://github.com/cpburnz/python-path-specification -Source0: %{pypi_source pathspec} +Source: %{pypi_source pathspec} BuildArch: noarch BuildRequires: python3-devel