## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %bcond tests 1 %global commit 6068e8bbb8786c9173b2f0a229032b9ed7452b79 %global snapdate 20240916 Name: python-cramjam Version: 2.8.4~rc3^%{snapdate}git%{sub %{commit} 1 7} Release: %autorelease Summary: Thin Python bindings to de/compression algorithms in Rust # SPDX License: MIT URL: https://github.com/milesgranger/cramjam %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 BuildRequires: python3-devel BuildRequires: tomcli BuildRequires: cargo-rpm-macros >= 24 %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 pytest-xdist} BuildRequires: %{py3_dist hypothesis} %endif %global common_description %{expand: %{summary}.} %description %{common_description} %package -n python3-cramjam 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 # MIT OR Apache-2.0 # MIT OR Zlib OR Apache-2.0 License: %{shrink: (0BSD OR MIT OR Apache-2.0) AND Apache-2.0 AND BSD-3-Clause AND MIT AND (MIT OR Zlib OR Apache-2.0) } # LICENSE.dependencies contains a full license breakdown %description -n python3-cramjam %{common_description} %prep %autosetup -n cramjam-%{srcversion} # 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 pyproject.toml false 'tool.maturin.strip' tomcli set pyproject.toml false 'profile.release.strip' # 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 Cargo.toml del 'features.generate-import-lib' # Remove all the static-linking features, and make the dynamic-linking ones # default, as we do in rust-libcramjam. for binding in 'xz' 'gzip' 'deflate' 'blosc2' do tomcli set Cargo.toml del "features.${binding}-static" tomcli set Cargo.toml lists replace --type regex \ "features.${binding}" "${binding}-static" "${binding}-shared" done tomcli set Cargo.toml del "features.use-system-blosc2-static" %cargo_prep %generate_buildrequires %pyproject_buildrequires %cargo_generate_buildrequires %build export RUSTFLAGS='%{build_rustflags}' %cargo_license_summary %{cargo_license} > LICENSES.dependencies %pyproject_wheel %install %pyproject_install %pyproject_save_files cramjam %check %pyproject_check_import %if %{with tests} %pytest -v -n auto --ignore-glob='benchmarks/*' %endif %files -n python3-cramjam -f %{pyproject_files} %license LICENSE LICENSES.dependencies %doc README.md %changelog ## START: Generated by rpmautospec * Tue Sep 17 2024 Benjamin A. Beasley - 2.8.4~rc3^20240916git6068e8b-1 - Update to a post-prerelease snapshot of 2.8.4~rc3 * Wed Aug 07 2024 Benjamin A. Beasley - 2.8.3-6 - Rebuilt with latest crate dependencies * Fri Jul 19 2024 Fedora Release Engineering - 2.8.3-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Sat Jun 15 2024 Benjamin A. Beasley - 2.8.3-4 - Rebuilt with rust-lz4 1.25.0 * Sat Jun 08 2024 Python Maint - 2.8.3-3 - Rebuilt for Python 3.13 * Fri May 24 2024 Benjamin A. Beasley - 2.8.3-2 - Rebuild with Rust 1.78 to fix incomplete debuginfo and backtraces * Tue Mar 26 2024 Benjamin A. Beasley - 2.8.3-1 - Update to 2.8.3 * Sun Mar 03 2024 Benjamin A. Beasley - 2.8.2-1 - Update to 2.8.2 (close RHBZ#2267466) * Wed Feb 14 2024 Benjamin A. Beasley - 2.8.1-1 - Initial package (close RHBZ#2257285) ## END: Generated by rpmautospec