From 40f3d5aecbb78a6726840cf2b4edd46c5fcd8e7b Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 8 Apr 2025 09:54:10 -0400 Subject: [PATCH] Use the provisional pyproject declarative buildsystem - Drop EPEL10 conditionals --- python-cramjam.rpmlintrc | 4 ++++ python-cramjam.spec | 24 +++++++----------------- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/python-cramjam.rpmlintrc b/python-cramjam.rpmlintrc index 204d347..855b921 100644 --- a/python-cramjam.rpmlintrc +++ b/python-cramjam.rpmlintrc @@ -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 ") diff --git a/python-cramjam.spec b/python-cramjam.spec index 37949c3..1df323c 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -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