Simplify the spec file
This commit is contained in:
+27
-23
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user