diff --git a/0001-Downstream-only-do-not-strip-the-compiled-Python-ext.patch b/0001-Downstream-only-do-not-strip-the-compiled-Python-ext.patch deleted file mode 100644 index e34d4cd..0000000 --- a/0001-Downstream-only-do-not-strip-the-compiled-Python-ext.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d9bd99591c52a8114d38e2a799a2f6101410eb4b Mon Sep 17 00:00:00 2001 -From: "Benjamin A. Beasley" -Date: Fri, 2 Feb 2024 12:51:24 -0500 -Subject: [PATCH] Downstream-only: do not strip the compiled Python extension - module - -We need useful debuginfo. Upstream set this intentionally, so this makes -sense to keep downstream-only. ---- - cramjam-python/pyproject.toml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cramjam-python/pyproject.toml b/cramjam-python/pyproject.toml -index 2a4aa85..16ed5b8 100644 ---- a/cramjam-python/pyproject.toml -+++ b/cramjam-python/pyproject.toml -@@ -14,7 +14,7 @@ requires = ["maturin>=0.14"] - build-backend = "maturin" - - [tool.maturin] --strip = true -+strip = false - - [project.optional-dependencies] - dev = [ --- -2.43.0 - diff --git a/python-cramjam.spec b/python-cramjam.spec index 18fdfaa..50b9815 100644 --- a/python-cramjam.spec +++ b/python-cramjam.spec @@ -15,11 +15,8 @@ URL: https://github.com/milesgranger/cramjam # the GitHub source archive. Source: %{url}/archive/v%{version}/cramjam-%{version}.tar.gz -# Do not strip the compiled Python module; we need useful debuginfo. Upstream -# set this intentionally, so this makes sense to keep downstream-only. -Patch: 0001-Downstream-only-do-not-strip-the-compiled-Python-ext.patch - BuildRequires: python3-devel +BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 %global common_description %{expand: @@ -51,12 +48,17 @@ License: %{shrink: %prep -%autosetup -n cramjam-%{version} -p1 +%autosetup -n cramjam-%{version} + +# Do not strip the compiled Python module; we need useful debuginfo. Upstream +# set this intentionally, so this makes sense to keep downstream-only. +tomcli set cramjam-python/pyproject.toml false 'tool.maturin.strip' # Downstream-only: patch out linters/formatters/etc. from the “dev” extra so we # can use it to generate test dependencies. # https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_linters -sed -r -i 's/^([[:blank:]]*)("(black)\b)/\1# \2/' cramjam-python/pyproject.toml +tomcli set cramjam-python/pyproject.toml lists delitem --type regex \ + 'project.optional-dependencies.dev' '(black)\b.*' # Remove bundled rust-libcramjam and the sources for cramjam-cli, which is # versioned and released separately. Keep only the contents of cramjam-python/