public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-cramjam] f44: Update to 2.14.0 (close RHBZ#2550296)
@ 2026-11-04  9:49 Benjamin A. Beasley
  0 siblings, 0 replies; only message in thread
From: Benjamin A. Beasley @ 2026-11-04  9:49 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-cramjam
Branch : f44
Commit : 85f33014fd2ffa2916cb07190c53d5ab87cd8365
Author : Benjamin A. Beasley <code@musicinmybrain.net>
Date   : 2026-10-13T11:50:38+01:00
Stats  : +98/-58 in 4 file(s)
URL    : https://src.fedoraproject.org/rpms/python-cramjam/c/85f33014fd2ffa2916cb07190c53d5ab87cd8365?branch=f44

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 642d906..f093968 100644
--- a/python-cramjam.spec
+++ b/python-cramjam.spec
@@ -1,41 +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
-
-BuildSystem:    pyproject
-BuildOption(install): --assert-license cramjam
-
 BuildRequires:  tomcli
 BuildRequires:  cargo-rpm-macros
 
@@ -55,31 +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}
 
 
-%prep -a
+%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 -p1 -C
+
 # 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
@@ -119,19 +127,33 @@ tomcli set pyproject.toml append project.license-files LICENSE.dependencies
 %cargo_prep
 
 
-%generate_buildrequires -a
-%cargo_generate_buildrequires
+%generate_buildrequires
+%pyproject_buildrequires
+%cargo_generate_buildrequires -f pure-rust
+
+cd pure-rust
+%pyproject_buildrequires
 
 
-%build -p
+%build
 %cargo_license_summary
 %{cargo_license} > LICENSE.dependencies
+%pyproject_wheel
+
+cd pure-rust
+cp --preserve ../LICENSE ../LICENSE.dependencies .
+%pyproject_wheel
 
 
-%check -a
-# 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.
+%install
+%pyproject_install
+%pyproject_save_files --assert-license --dist-name cramjam cramjam
+%pyproject_save_files --assert-license --dist-name cramjam-pure-rust cramjam_pure_rust
+
+
+%check
+# 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}
@@ -143,7 +165,7 @@ tomcli set pyproject.toml append project.license-files LICENSE.dependencies
 # 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"
+#k="${k-}${k+ and }not test_variants_decompress_into"
 
 # Regression with miniz_oxide>0.8.5
 # https://github.com/milesgranger/cramjam/issues/211
@@ -151,12 +173,19 @@ k="${k-}${k+ and }not test_variants_decompress_into"
 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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-04  9:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-04  9:49 [rpms/python-cramjam] f44: Update to 2.14.0 (close RHBZ#2550296) Benjamin A. Beasley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox