Improve spec-file formatting and style

- Modernize a few details (as far as is possible in EPEL8)
This commit is contained in:
Benjamin A. Beasley
2025-05-07 09:38:09 -04:00
parent 3408d6b45f
commit 6b4b457452
+29 -27
View File
@@ -1,54 +1,56 @@
%global srcname re_assert
%global pkgname re-assert
Name: python-%{pkgname}
Version: 1.1.0
Release: %autorelease
Summary: Show where your regex match assertion failed!
Name: python-re-assert
Version: 1.1.0
Release: %autorelease
Summary: Show where your regex match assertion failed
# SPDX
License: MIT
URL: https://github.com/asottile/re-assert
# The PyPI sdist lacks the tests, so we must use the GitHub archive
Source0: %{url}/archive/v%{version}/re-assert-%{version}.tar.gz
License: MIT
URL: https://github.com/asottile/re-assert
Source0: %{url}/archive/v%{version}/re-assert-%{version}.tar.gz
BuildArch: noarch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3dist(setuptools)
BuildRequires: python3-devel
BuildRequires: %{py3_dist setuptools}
# For tests
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(regex)
BuildRequires: %{py3_dist pytest}
BuildRequires: %{py3_dist regex}
%global _description %{expand:
Show where your regex match assertion failed!}
%global common_description %{expand:
%{summary}!}
%description %{_description}
%description %{common_description}
%package -n python3-%{pkgname}
%package -n python3-re-assert
Summary: %summary
%py_provides python3-%{pkgname}
%description -n python3-%{pkgname} %{_description}
%py_provides python3-re-assert
%description -n python3-re-assert %{common_description}
%prep
%autosetup -n %{pkgname}-%{version}
%autosetup -n re-assert-%{version}
%build
%py3_build
%install
%py3_install
%check
%pytest
%files -n python3-%{pkgname}
%files -n python3-re-assert
%license LICENSE
%{python3_sitelib}/re_assert.py
%{python3_sitelib}/__pycache__/re_assert.*.pyc
%{python3_sitelib}/%{srcname}-*.egg-info/
%pycached %{python3_sitelib}/re_assert.py
%{python3_sitelib}/re_assert-%{version}-py%{python3_version}.egg-info/
%changelog