Compare commits

...
Sign in to create a new pull request.

33 commits

Author SHA1 Message Date
Python Maint
ed709046ea Rebuilt for Python 3.14.0rc3 bytecode 2025-09-19 13:04:31 +02:00
Python Maint
9233dbc996 Rebuilt for Python 3.14.0rc2 bytecode 2025-08-15 13:32:02 +02:00
Benjamin A. Beasley
2344e1fb46 Update to 2.11.0 (close RHBZ#2383690) 2025-07-27 22:16:45 -04:00
Fedora Release Engineering
05fe45941e Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-25 07:23:46 +00:00
Benjamin A. Beasley
a9dc08b12b No longer run tests in parallel
This seems to reduce flakiness.
2025-06-21 07:20:49 -04:00
Python Maint
c9aa2899b6 Rebuilt for Python 3.14 2025-06-03 15:51:32 +02:00
Benjamin A. Beasley
a6f9420ae8 Update to 2.11.0rc3 (close RHBZ#2369614) 2025-06-01 06:58:00 -04:00
Benjamin A. Beasley
cf3a917ff3 Updated Python 3.14 patch 2025-06-01 06:58:00 -04:00
Benjamin A. Beasley
96ae7df798 Patch for Python 3.14 (close RHBZ#2367779) 2025-05-23 07:16:32 -04:00
Benjamin A. Beasley
08f281c034 Update to 2.11.0~rc2 (close RHBZ#2361989) 2025-05-05 10:34:33 -04:00
Benjamin A. Beasley
7e7726133c Report and skip test that fails with miniz_oxide>0.8.5 2025-05-03 23:04:59 -04:00
Benjamin A. Beasley
87d59a3af7 Adjust .rpmlintrc file for updated rpmlint 2025-04-24 16:22:53 -04:00
Benjamin A. Beasley
8318941aeb Update to 2.10.0 (close RHBZ#2359237) 2025-04-12 21:19:18 -04:00
Benjamin A. Beasley
40f3d5aecb Use the provisional pyproject declarative buildsystem
- Drop EPEL10 conditionals
2025-04-08 10:02:54 -04:00
Benjamin A. Beasley
c57085d2d0 Remove workarounds for older versions of tomcli 2025-04-08 09:57:49 -04:00
Benjamin A. Beasley
26737d07f0 Expect maturin to handle license files 2025-04-08 09:49:17 -04:00
Benjamin A. Beasley
dd26b0fa97 Update PyO3 to 0.24 2025-04-08 09:45:36 -04:00
Benjamin A. Beasley
29da16297c Don’t need to manually export RUSTFLAGS
[skip changelog]
2025-03-12 09:36:45 -04:00
Benjamin A. Beasley
fbf783c04f No longer need to patch pyproject.toml to keep maturin from stripping binaries
We were failing to adjust profile.release.strip correctly anyway; it’s in Cargo.toml
2025-03-03 07:21:37 -05:00
Benjamin A. Beasley
1b551f270c Prepare for EPEL10 branching 2025-03-02 10:52:14 -05:00
Benjamin A. Beasley
f21b8048d2 Update to 2.10.0~rc1 2025-03-02 09:56:20 -05:00
Benjamin A. Beasley
ec1308384a Update to a later pre-release snapshot of 2.10.0
- Builds with rust-libcramjam 0.7
2025-02-24 19:52:29 -05:00
Benjamin A. Beasley
319eba6ebb Update to a pre-release snapshot of 2.10.0
- Disable experimental features (blosc2/isa-l)
2025-02-07 08:15:53 -05:00
Benjamin A. Beasley
c81c8fc454 Restore i686 support 2025-02-07 07:58:12 -05:00
Benjamin A. Beasley
c663726bce Ignore test failures with recent hypothesis versions, for now
- https://github.com/milesgranger/cramjam/issues/201
2025-02-07 07:58:12 -05:00
Fedora Release Engineering
7fe16cc411 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-20 08:28:05 +00:00
Benjamin A. Beasley
460c02b931 Patch for maturin 1.8.0 2025-01-03 09:32:11 -05:00
Benjamin A. Beasley
c311c75d96 Update to 2.9.1 (close RHBZ#2332068) 2024-12-13 13:43:00 -05:00
Benjamin A. Beasley
b9be4ddadd Skip blosc2 variants tests since they may segfault 2024-12-10 06:48:52 -05:00
Benjamin A. Beasley
ded4fd5129 Update to 2.9.0 (close RHBZ#2310247) 2024-10-16 10:20:17 -04:00
Benjamin A. Beasley
818d3bee3d Revert "Fix automatic provides on Python extension due to SONAME"
- The root cause is fixed in rust-1.81.0-4 and later.

This reverts commit 5d92fffdd3.
2024-10-16 07:32:01 -04:00
Benjamin A. Beasley
de7622062a Rebuilt with rust-brotli 7.0.0 2024-10-02 07:33:52 -04:00
Benjamin A. Beasley
3ebdbdac59 F41+: Drop i686 support (leaf package on that architecture)
While many packages depend on this one, we believe we have correctly
verified that all directly or indirectly dependent packages either are
noarch or already exclude i686.
2024-09-30 19:24:13 -04:00
4 changed files with 156 additions and 58 deletions

12
.gitignore vendored
View file

@ -1,3 +1,15 @@
/cramjam-2.8.1.tar.gz
/cramjam-2.8.2.tar.gz
/cramjam-2.8.3.tar.gz
/cramjam-6068e8bbb8786c9173b2f0a229032b9ed7452b79-filtered.tar.gz
/cramjam-2.8.4.tar.gz
/cramjam-2.9.0rc1.tar.gz
/cramjam-2.9.0.tar.gz
/cramjam-2.9.1.tar.gz
/cramjam-61564e7761e38e5ec55e7939ccd6a276c2c55d11-filtered.tar.gz
/cramjam-cdc7d307d0f592f89b3319a7037fd875a5371ef3-filtered.tar.gz
/cramjam-2.10.0rc1.tar.gz
/cramjam-2.10.0.tar.gz
/cramjam-2.11.0rc2.tar.gz
/cramjam-2.11.0rc3.tar.gz
/cramjam-2.11.0.tar.gz

49
get_source Executable file
View file

@ -0,0 +1,49 @@
#!/bin/sh
set -o errexit
set -o nounset
if [ "$#" != '1' ]
then
cat 1>&2 <<EOF
Usage: $0 VERSION
Downloads the requested version and creates a filtered source tarball.
EOF
exit 1
fi
VERSION="${1}"
OUTDIR="${PWD}"
TMPDIR="$(mktemp -d)"
trap "rm -rf '${TMPDIR}'" INT TERM EXIT
cd "${TMPDIR}"
REPO="https://github.com/milesgranger/cramjam"
URL="${REPO}/archive/${VERSION}/cramjam-${VERSION}.tar.gz"
echo "--> Downloading: ${URL}" 1>&2
curl -L -O "${URL}"
ARCHIVE="$(find . -mindepth 1 -maxdepth 1 -type f -name '*.tar.gz' -print -quit)"
echo "--> Extracting: $(basename "${ARCHIVE}")" 1>&2
tar -xzf "${ARCHIVE}"
echo '--> Removing benchmarks/data/ due to licensing issues' 1>&2
TARDIR="$(basename "${ARCHIVE}" '.tar.gz')"
MTIME="$(stat -c '%Y' "${TARDIR}")"
rm -rvf "${TARDIR}/benchmarks/data/"
# Make sure the original mtime is preserved even if we modified the base
# directory by removing something at the top level. (So far, we didnt.)
touch -d @"${MTIME}" "${TARDIR}"
FILTERED="$(basename "${ARCHIVE}" .tar.gz)-filtered.tar.gz"
echo "--> Re-archiving: ${FILTERED}" 1>&2
# https://www.gnu.org/software/tar/manual/html_section/Reproducibility.html
TZ=UTC LC_ALL=C tar \
--create --verbose \
--sort=name \
--format=posix \
--numeric-owner --owner=0 --group=0 \
--mode=go+u,go-w \
--pax-option='delete=atime,delete=ctime' \
"${TARDIR}/" |
gzip -9 > "${FILTERED}"
mv -v "${FILTERED}" "${OUTDIR}"
echo 'Done.' 1>&2

View file

@ -1,30 +1,51 @@
%bcond tests 1
#global commit xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
#global snapdate YYYYMMDD
Name: python-cramjam
Version: 2.8.3
Version: 2.11.0
Release: %autorelease
Summary: Thin Python bindings to de/compression algorithms in Rust
# SPDX
License: MIT
URL: https://github.com/milesgranger/cramjam
# The PyPI sdist is structured like the git repository, but with pyproject.toml
# moved to the top level from cramjam-python/ and
# manifest-path = "cramjam-python/Cargo.toml"
# added to the [tool.maturin] section. We find it easiest to just build from
# the GitHub source archive.
Source: %{url}/archive/v%{version}/cramjam-%{version}.tar.gz
BuildRequires: python3-devel
BuildRequires: tomcli
%if !%{defined 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
# ./get_source ${COMMIT} (or ${TAG})
Source1: get_source
%endif
BuildSystem: pyproject
BuildOption(install): -l cramjam
BuildRequires: tomcli >= 0.8.0
BuildRequires: cargo-rpm-macros >= 24
# The Python extension module now gets a SONAME of libcramjam.so; we
# must ensure it is not used to generate automatic Provides. See:
# Rust 1.81+ implicitly / automatically sets soname on cdylib targets
# https://bugzilla.redhat.com/show_bug.cgi?id=2314879
# https://docs.fedoraproject.org/en-US/packaging-guidelines/AutoProvidesAndRequiresFiltering/#_filtering_provides_and_requires_after_scanning
%global __provides_exclude ^libcramjam\\.so.*$
%if %{with tests}
# These (along with some unwanted dependencies like linters) are listed in the
# dev extra in pyproject.toml.
BuildRequires: %{py3_dist numpy}
BuildRequires: %{py3_dist pytest}
BuildRequires: %{py3_dist hypothesis}
%endif
%global common_description %{expand:
%{summary}.}
@ -36,7 +57,6 @@ BuildRequires: cargo-rpm-macros >= 24
Summary: %{summary}
# 0BSD OR MIT OR Apache-2.0
# Apache-2.0
# Apache-2.0 OR MIT
# BSD-3-Clause
# BSD-3-Clause AND MIT
# MIT
@ -54,66 +74,83 @@ License: %{shrink:
%description -n python3-cramjam %{common_description}
%prep
%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
tomcli set cramjam-python/pyproject.toml lists delitem --type regex \
'project.optional-dependencies.dev' '(black)\b.*'
%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.
tomcli set cramjam-python/Cargo.toml del 'features.generate-import-lib'
tomcli set Cargo.toml del 'features.generate-import-lib'
# Remove bundled rust-libcramjam and the sources for cramjam-cli, which is
# versioned and released separately. Keep only the contents of cramjam-python/
# and the LICENSE file.
find . -mindepth 1 -maxdepth 1 ! -type d ! -name LICENSE -print -delete
find . -mindepth 1 -maxdepth 1 -type d ! -name cramjam-python \
-exec rm -rv '{}' '+'
# 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'
# 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
# extension with the default features, and we only want maturin to check
# dependencies for those features.
blosc2_isal_features="$(
tomcli get Cargo.toml features -F newline-keys |
grep -E 'blosc2|ideflate|igzip|isal|izlib' |
tr '\n' ' '
)"
for feature in experimental ${blosc2_isal_features}
do
tomcli set Cargo.toml del "features.${feature}"
done
# Downstream-only: remove all the static-linking features, and make the
# dynamic-linking ones default, as we do in rust-libcramjam.
static_features="$(
tomcli get Cargo.toml features -F newline-keys |
grep -E '.-static$' |
tr '\n' ' '
)"
for sf in ${static_features}
do
tomcli set Cargo.toml del "features.${sf}"
if ! echo "${sf}" | grep -E '^use-system-' >/dev/null
then
binding="$(echo "${sf}" | sed -r 's/-static//')"
tomcli set Cargo.toml lists replace --type regex \
"features.${binding}" "${binding}-static" "${binding}-shared"
fi
done
cd cramjam-python
%cargo_prep
%generate_buildrequires
cd cramjam-python
%pyproject_buildrequires %{?with_tests:-x dev}
%generate_buildrequires -a
%cargo_generate_buildrequires
%build
export RUSTFLAGS='%{build_rustflags}'
cd cramjam-python
%build -p
%cargo_license_summary
%{cargo_license} > ../LICENSES.dependencies
%pyproject_wheel
%{cargo_license} > LICENSES.dependencies
%install
cd cramjam-python
%pyproject_install
%pyproject_save_files cramjam
%check
cd cramjam-python
%pyproject_check_import
%check -a
%if %{with tests}
%pytest -v -n auto --ignore-glob='benchmarks/*'
# 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, theres
# 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 -v
%endif
%files -n python3-cramjam -f %{pyproject_files}
%license LICENSE LICENSES.dependencies
%doc cramjam-python/README.md
%doc README.md
%changelog

View file

@ -1 +1 @@
SHA512 (cramjam-2.8.3.tar.gz) = 26e85bcc09eeef9623bf69f0659e33310c6a0152c3b89572db7e7584319790b682af65733bb863e69204ce1cea37b30de530bb7f1c686e98217f2bf52b81f9d4
SHA512 (cramjam-2.11.0.tar.gz) = d92446c0c0ef885f3544783caa1f179fd50b6a6290ada011495b7385411527f75a2544c0c8cdc36910c83c879dbac7dd130f4fe8f3dc3b885a84a45286cb3695