## START: Set by rpmautospec ## (rpmautospec version 0.6.0) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 5; 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 # Generated by rust2rpm 25 # * 2 tests are skipped because prevent i686 builds %bcond_with check %global debug_package %{nil} %global crate safetensors Name: rust-safetensors Version: 0.4.1 Release: %autorelease Summary: Functions for safer PyTorch safetensors read/write operations License: Apache-2.0 URL: https://crates.io/crates/safetensors Source: %{crates_source} # Manually created patch for downstream crate metadata changes Patch: safetensors-fix-metadata.diff # LICENSE is not included in the source # PR for fix https://github.com/huggingface/safetensors/pull/416 Source1: https://github.com/huggingface/%{crate}/raw/v%{version}/LICENSE BuildRequires: cargo-rpm-macros >= 24 %global _description %{expand: Provides functions to read and write safetensors which aim to be safer than their PyTorch counterpart. The format is 8 bytes which is an unsized int, being the size of a JSON header, the JSON header refers the `dtype` the `shape` and `data_offsets` which are the offsets for the values in the rest of the file.} %description %{_description} %package devel Summary: %{summary} BuildArch: noarch %description devel %{_description} This package contains library source intended for building other packages which use the "%{crate}" crate. %files devel %license %{crate_instdir}/LICENSE %doc %{crate_instdir}/README.md %{crate_instdir}/ %package -n %{name}+default-devel Summary: %{summary} BuildArch: noarch %description -n %{name}+default-devel %{_description} This package contains library source intended for building other packages which use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml %prep %autosetup -n %{crate}-%{version} -p1 cp -p '%{SOURCE1}' . %cargo_prep %generate_buildrequires %cargo_generate_buildrequires %build %cargo_build %install %cargo_install %if %{with check} %check %cargo_test %endif %changelog ## START: Generated by rpmautospec * Fri Jan 26 2024 Fedora Release Engineering - 0.4.1-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 07 2024 Onuralp SEZER - 0.4.1-4 - Enable i686 and build for all arch * Sat Jan 06 2024 Onuralp SEZER - 0.4.1-3 - Exclude i686 * Sat Jan 06 2024 Onuralp SEZER - 0.4.1-2 - Exclude i686 because validation_overflow and test_json_attack failed * Sat Jan 06 2024 Onuralp SEZER - 0.4.1-1 - Initial import rhbz#2256631 ## END: Generated by rpmautospec