From cf47133f7b6371a83b880f2ab9845148c9a5b034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 29 Dec 2021 11:03:41 +0100 Subject: [PATCH] Various little cleanups in the spec - drop %{srcname} definition, expand the name in the spec - do not BR pyproject-rpm-macros explicitly - drop obsoleted %{?python_provide:...} construct - add -p1 to %autosetup as the most reasonable value for git patches - BuildRequire runtime dependencies even without tests - don't install the LICENSE file with %license manually, it is already installed in .dist-info - don't install the PKG-INFO file with %doc, it is not documentation No need to build, hence not bumping the release. --- python-more-itertools.spec | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/python-more-itertools.spec b/python-more-itertools.spec index 6bdad6c..96240b6 100644 --- a/python-more-itertools.spec +++ b/python-more-itertools.spec @@ -1,17 +1,15 @@ %bcond_without tests -%global srcname more-itertools -Name: python-%{srcname} +Name: python-more-itertools Version: 8.12.0 Release: 1%{?dist} Summary: More routines for operating on Python iterables, beyond itertools License: MIT URL: https://github.com/erikrose/more-itertools -Source0: %{pypi_source} +Source0: %{pypi_source more-itertools} BuildArch: noarch BuildRequires: python3-devel -BuildRequires: pyproject-rpm-macros %global _description %{expand: Python's itertools library is a gem - you can compose elegant solutions for @@ -21,17 +19,16 @@ Python iterables.} %description %_description -%package -n python3-%{srcname} +%package -n python3-more-itertools Summary: %{summary} -%{?python_provide:%python_provide python3-%{srcname}} -%description -n python3-%{srcname} %_description +%description -n python3-more-itertools %_description %prep -%autosetup -n %{srcname}-%{version} +%autosetup -p1 -n more-itertools-%{version} %generate_buildrequires -%pyproject_buildrequires %{?with_tests:-r -t} +%pyproject_buildrequires -r %{?with_tests: -t} %build %pyproject_wheel @@ -45,9 +42,8 @@ Summary: %{summary} %tox %endif -%files -n python3-%{srcname} -f %pyproject_files -%license LICENSE -%doc README.rst PKG-INFO +%files -n python3-more-itertools -f %pyproject_files +%doc README.rst %changelog * Fri Dec 24 2021 Paul Wouters - 8.12.0-1