Use the provisional pyproject declarative buildsystem

- Drop EPEL10 conditionals
This commit is contained in:
Benjamin A. Beasley 2025-04-08 09:54:10 -04:00
commit 40f3d5aecb
2 changed files with 11 additions and 17 deletions

View file

@ -1,2 +1,6 @@
# “de/compression”
addFilter(r"spelling-error.*'de'")
# At least some of these sections are implicit due to declarative buildsystem
addFilter(r" no-%(prep|build|install)-section")
# Implicit due to use of declarative build system
addFilter(r" patch-not-applied ")

View file

@ -33,11 +33,13 @@ Source1: get_source
%endif
BuildSystem: pyproject
BuildOption(install): -l cramjam
# Update PyO3 to 0.24
# https://github.com/milesgranger/cramjam/pull/207
Patch: %{url}/pull/207/commits/217c375c2a2f96e28a1b3987f0eb5c730b4b361e.patch
BuildRequires: python3-devel
BuildRequires: tomcli >= 0.8.0
BuildRequires: cargo-rpm-macros >= 24
@ -78,9 +80,7 @@ License: %{shrink:
%description -n python3-cramjam %{common_description}
%prep
%autosetup -n cramjam-%{srcversion}
%prep -a
# Downstream-only: patch out the generate-import-lib feature, which is only
# relevant on Windows, and which depends on the corresponding pyo3 feature
# which is not packaged for that reason.
@ -125,26 +125,17 @@ done
%cargo_prep
%generate_buildrequires
%pyproject_buildrequires
%generate_buildrequires -a
%cargo_generate_buildrequires
%build
%build -p
%cargo_license_summary
%{cargo_license} > LICENSES.dependencies
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files -l cramjam
%check
%pyproject_check_import
%check -a
%if %{with tests}
%if %{undefined el10}
# Test failures in test_variants_decompress_into with recent hypothesis
# versions: https://github.com/milesgranger/cramjam/issues/201
#
@ -154,7 +145,6 @@ done
# not reason to believe that the package has *new* problems. It *might* have
# newly *revealed* problems. This merits further investigation.
k="${k-}${k+ and }not test_variants_decompress_into"
%endif
%pytest -k "${k-}" --ignore=benchmarks/test_bench.py -v -n auto
%endif