Simplify the spec file

This commit is contained in:
Benjamin A. Beasley
2025-05-06 22:33:12 -04:00
parent 67f9a5e2d7
commit ccc49b5b15
+27 -23
View File
@@ -1,50 +1,54 @@
%global srcname re-assert
%global slugname re_assert
%global forgeurl https://github.com/asottile/re-assert
%global common_description %{expand:
Show where your regex match assertion failed!}
%bcond_without tests
Name: python-%{srcname}
Name: python-re-assert
Version: 1.1.0
%forgemeta
Release: %autorelease
Summary: Show where your regex match assertion failed!
URL: %{forgeurl}
Source: %{forgesource}
Patch: 0001_adding_pytest_to_the_testing_dependencies.patch
Summary: Show where your regex match assertion failed
# SPDX
License: MIT
URL: https://github.com/asottile/re-assert
Source: %{url}/archive/v%{version}/re-assert-%{version}.tar.gz
Patch: 0001_adding_pytest_to_the_testing_dependencies.patch
BuildArch: noarch
BuildRequires: python3-devel
%global common_description %{expand:
%{summary}!}
%description %{common_description}
%package -n python3-%{srcname}
%package -n python3-re-assert
Summary: %{summary}
%description -n python3-%{srcname} %{common_description}
%description -n python3-re-assert %{common_description}
%prep
%forgeautosetup -p1
%autosetup -n re-assert-%{version} -p1
%generate_buildrequires
%pyproject_buildrequires %{?with_tests:-x test}
%pyproject_buildrequires -x test
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files -l %{slugname}
%pyproject_save_files -l re_assert
%if %{with tests}
%check
%pytest
%endif
%files -n python3-%{srcname} -f %{pyproject_files}
%files -n python3-re-assert -f %{pyproject_files}
%changelog
%autochangelog