public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Benjamin A. Beasley <code@musicinmybrain.net>
To: git-commits@fedoraproject.org
Subject: [rpms/python-cramjam] epel10: Update to 2.14.0 (close RHBZ#2550296)
Date: Wed, 04 Nov 2026 12:43:38 GMT	[thread overview]
Message-ID: <179379621800.1.10460566385413245069.rpms-python-cramjam-11a673274aa7@fedoraproject.org> (raw)

A new commit has been pushed.

Repo   : rpms/python-cramjam
Branch : epel10
Commit : 11a673274aa7cdcbc51162bb4c1a8b38f115ea54
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-11-04T12:00:33+00:00
Stats  : +98/-53 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/python-cramjam/c/11a673274aa7cdcbc51162bb4c1a8b38f115ea54?branch=epel10

Log:
Update to 2.14.0 (close RHBZ#2550296)

---
diff --git a/get_source b/get_source
index f2465bf..b7d84ca 100755
--- a/get_source
+++ b/get_source
@@ -17,9 +17,18 @@ OUTDIR="${PWD}"
 TMPDIR="$(mktemp -d)"
 trap "rm -rf '${TMPDIR}'" INT TERM EXIT
 
+if printf '%s\n' "${VERSION}" | grep -F . >/dev/null
+then
+  # Guess that this is a version number
+  TAG="v${VERSION}"
+else
+  # Guess that this is a commit hash
+  TAG="${VERSION}"
+fi
+
 cd "${TMPDIR}"
 REPO="https://github.com/milesgranger/cramjam"
-URL="${REPO}/archive/${VERSION}/cramjam-${VERSION}.tar.gz"
+URL="${REPO}/archive/${TAG}/cramjam-${VERSION}.tar.gz"
 echo "--> Downloading: ${URL}" 1>&2
 curl -L -O "${URL}"
 

diff --git a/python-cramjam.rpmlintrc b/python-cramjam.rpmlintrc
index 204d347..672eb8e 100644
--- a/python-cramjam.rpmlintrc
+++ b/python-cramjam.rpmlintrc
@@ -1,2 +1,4 @@
-# “de/compression”
-addFilter(r"spelling-error.*'de'")
+# de: “de/compression”
+addFilter(r"spelling-error.*'(de|gzip|libcramjam|xz|zstd)'")
+# This Source cannot be a URL because we must filter out certain files.
+addFilter(r" invalid-url Source[0-9]+: cramjam-.*-filtered\.tar\.gz")

diff --git a/python-cramjam.spec b/python-cramjam.spec
index d5e136e..f3fb501 100644
--- a/python-cramjam.spec
+++ b/python-cramjam.spec
@@ -1,38 +1,48 @@
 %bcond tests 1
 
-#global commit xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
-#global snapdate YYYYMMDD
-
+# Note: cramjam and cramjam_pure_rust are developed together in the same git
+# repository and are released synchronously with the same version numbers.
+# Therefore, this source RPM produces both python3-cramjam and
+# python3-httpcore2.
 Name:           python-cramjam
-Version:        2.13.0
+Version:        2.14.0
 Release:        %autorelease
 Summary:        Thin Python bindings to de/compression algorithms in Rust
 
 # SPDX
 License:        MIT
+# tests/data/integration/plaintext.txt and its various compressed forms contain
+# the text of The Zen of Python, from https://peps.python.org/pep-0020/, which
+# carries the declaration “This document has been placed in the public domain.”
+SourceLicense:  %{license} AND LicenseRef-Fedora-Public-Domain
+# From %%{cargo_license_summary}:
+#
+# 0BSD OR MIT OR Apache-2.0
+# BSD-3-Clause
+# BSD-3-Clause AND MIT
+# MIT
+# MIT OR Apache-2.0
+# MIT OR Zlib OR Apache-2.0
+# bzip2-1.0.6
+%global rust_additional_licenses %{shrink:
+    BSD-3-Clause AND
+    bzip2-1.0.6 AND
+    (0BSD OR MIT OR Apache-2.0) AND
+    (MIT OR Zlib OR Apache-2.0)
+    }
+# LICENSE.dependencies contains a full license breakdown
 URL:            https://github.com/milesgranger/cramjam
 
-%if %{undefined commit}
-
-# This handles pre-release versioning:
-%global srcversion %(echo '%{version}' | tr -d '~')
-# Future PyPI sdists should not include benchmark data (some of which has
-# complicated or unclear license status). See: “Consider excluding benchmarks
-# from PyPI sdists” https://github.com/milesgranger/cramjam/issues/178
-Source:         %{pypi_source cramjam %{srcversion}}
-
-%else
-
-%global srcversion %{commit}
-# For snapshots, we must filter the source archive from GitHub using the script
-# in Source1, since some of the benchmark data has complicated or unclear
-# license status.
-Source0:        cramjam-%{commit}-filtered.tar.gz
+# We must filter the source archive from GitHub using the script in Source1,
+# since some of the benchmark data has complicated or unclear license status.
+# The PyPI sdists do not have this problem, since they exclude benchmarks and
+# benchamark data (see: “Consider excluding benchmarks from PyPI sdists,”
+# https://github.com/milesgranger/cramjam/issues/178), but we would have to
+# have two separate sources, which isn’t desirable.
+Source0:        cramjam-%{version}-filtered.tar.gz
 # ./get_source ${COMMIT} (or ${TAG})
 Source1:        get_source
 
-%endif
-
 BuildRequires:  tomcli
 BuildRequires:  cargo-rpm-macros
 
@@ -52,33 +62,32 @@ BuildRequires:  %{py3_dist hypothesis}
 
 %package -n     python3-cramjam
 Summary:        %{summary}
-# 0BSD OR MIT OR Apache-2.0
-# Apache-2.0
-# BSD-3-Clause
-# BSD-3-Clause AND MIT
-# MIT
-# MIT OR Apache-2.0
-# MIT OR Zlib OR Apache-2.0
-# bzip2-1.0.6
-License:        %{shrink:
-    MIT AND
-    Apache-2.0 AND
-    BSD-3-Clause AND
-    bzip2-1.0.6 AND
-    (0BSD OR MIT OR Apache-2.0) AND
-    (MIT OR Zlib OR Apache-2.0)
-    }
-# LICENSE.dependencies contains a full license breakdown
+License:        %{license} AND %{rust_additional_licenses}
 
 %description -n python3-cramjam %{common_description}
 
 
+%pyproject_extras_subpkg --name python3-cramjam --dist-name cramjam pure-rust
+
+
+%package -n     python3-cramjam-pure-rust
+Summary:        Pure-Rust backend for cramjam
+License:        %{license} AND %{rust_additional_licenses}
+
+%description -n python3-cramjam-pure-rust
+The pure-Rust backend for cramjam: the same API, with zstd, lz4, bzip2, xz and
+deflate/gzip/zlib from libcramjam’s pure-Rust implementations instead of the C
+libraries.
+
+
 %prep
-%autosetup -n cramjam-%{srcversion} -p1
+%autosetup -n cramjam-%{version} -p1
 
 # Downstream-only: patch out the wasm-compat feature, which is unnecessary and
-# would bring in unwanted dependencies
-tomcli set Cargo.toml del 'features.wasm32-compat'
+# would bring in unwanted dependencies; similarly, remove cramjam-js from the
+# workspace.
+tomcli set Cargo.toml del features.wasm32-compat
+tomcli set Cargo.toml lists delitem workspace.members cramjam-js
 
 # Downstream-only: patch out the "experimental" feature and all of the features
 # related to blosc2 and isa-l support. We only want to build the Python
@@ -120,7 +129,10 @@ tomcli set pyproject.toml append project.license-files LICENSE.dependencies
 
 %generate_buildrequires
 %pyproject_buildrequires
-%cargo_generate_buildrequires
+%cargo_generate_buildrequires -f pure-rust
+
+cd pure-rust
+%pyproject_buildrequires
 
 
 %build
@@ -128,33 +140,55 @@ tomcli set pyproject.toml append project.license-files LICENSE.dependencies
 %{cargo_license} > LICENSE.dependencies
 %pyproject_wheel
 
+cd pure-rust
+cp --preserve ../LICENSE ../LICENSE.dependencies .
+%pyproject_wheel
+
 
 %install
 %pyproject_install
-%pyproject_save_files -l cramjam
+%pyproject_save_files --assert-license --dist-name cramjam cramjam
+%pyproject_save_files --assert-license --dist-name cramjam-pure-rust cramjam_pure_rust
 
 
 %check
-%pyproject_check_import
+%pyproject_check_import --dist-name cramjam
+%pyproject_check_import --dist-name cramjam-pure-rust
 
-# If upstream adopts PEP 639 metadata in pyproject.toml and starts listing
-# license files explicitly, LICENSE.dependencies may be dropped from the
-# .dist-info directory. Guard against this.
+# If upstream starts listing license files explicitly, LICENSE.dependencies may
+# be dropped from the .dist-info directory. Guard against this.
 [ -n "$(find '%{buildroot}%{python3_sitearch}' -name LICENSE.dependencies)" ]
 
 %if %{with tests}
+# Test failures in test_variants_decompress_into with recent hypothesis
+# versions: https://github.com/milesgranger/cramjam/issues/201
+#
+# It is hard to be really sure what is going on here. The failures are
+# concerning, and might (or might not) reflect a serious problem. Nevertheless,
+# since the problem appears to be linked to newer hypothesis versions, there’s
+# 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"
+
 # Regression with miniz_oxide>0.8.5
 # https://github.com/milesgranger/cramjam/issues/211
 # Failed: DID NOT RAISE <class 'cramjam.DecompressionError'>
 k="${k-}${k+ and }not test_variants_raise_exception[deflate]"
 
 %pytest -k "${k-}" --ignore=benchmarks/test_bench.py --verbose
+export CRAMJAM_BACKEND=pure-rust
+%pytest -k "${k-}" --ignore=benchmarks/test_bench.py --verbose
 %endif
 
 
-%files -n python3-cramjam -f %{pyproject_files}
+%files -n python3-cramjam -f %{pyproject_files --dist-name cramjam}
 %doc README.md
 
 
+%files -n python3-cramjam-pure-rust -f %{pyproject_files %{shrink:
+     --dist-name cramjam-pure-rust}}
+%doc pure-rust/README.md
+
+
 %changelog
 %autochangelog

diff --git a/sources b/sources
index f179abf..6ca7804 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (cramjam-2.13.0.tar.gz) = c128a045b0674cbdda1a41273242df09df50db494a8cb0bf9b99f03794ee509d80c25ee21d2686f21b392b35407a598d47a54b7904156a025b62bbad5878ee10
+SHA512 (cramjam-2.14.0-filtered.tar.gz) = 4a682ab74cad66db0a0cdcbcd1c33f44477dd6fd01b2c1e02bb5b4417a106f9b8f4b6dd99d9da37aedac98e3fbb455f6577210810f6122c8b46c0d7063670078

                 reply	other threads:[~2026-11-04 12:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179379621800.1.10460566385413245069.rpms-python-cramjam-11a673274aa7@fedoraproject.org \
    --to=code@musicinmybrain.net \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox