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-safetensors] rawhide: Update to version 0.8.0; Fixes RHBZ#2415927
Date: Wed, 08 Jul 2026 05:58:45 GMT	[thread overview]
Message-ID: <178349032587.1.11829855489664766018.rpms-python-safetensors-2428ddfc9b02@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/python-safetensors
            Branch : rawhide
            Commit : 2428ddfc9b023933bb43c963765d1af228fa34bb
            Author : Benjamin A. Beasley <code@musicinmybrain.net>
            Date   : 2026-07-08T06:29:52+01:00
            Stats  : +43/-24 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/python-safetensors/c/2428ddfc9b023933bb43c963765d1af228fa34bb?branch=rawhide

            Log:
            Update to version 0.8.0; Fixes RHBZ#2415927

- Don’t remove source files associated with unpackaged extras

---
diff --git a/.gitignore b/.gitignore
index 3556f90..d193c7d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -5,3 +5,4 @@
 /safetensors-0.6.1.tar.gz
 /safetensors-0.6.2.tar.gz
 /safetensors-0.7.0.tar.gz
+/safetensors-0.8.0.tar.gz

diff --git a/python-safetensors.spec b/python-safetensors.spec
index 7497798..a5a4ba8 100644
--- a/python-safetensors.spec
+++ b/python-safetensors.spec
@@ -1,16 +1,25 @@
 Name:           python-safetensors
-Version:        0.7.0
+Version:        0.8.0
 Release:        %autorelease
 Summary:        Python bindings for the safetensors library
 
 # Results of the Cargo License Check
 #
 # Apache-2.0
-# Apache-2.0 OR BSL-1.0
+# Apache-2.0 OR MIT
+# Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT
 # MIT
 # MIT OR Apache-2.0
 # Unlicense OR MIT
-License:        Apache-2.0 AND (Apache-2.0 OR BSL-1.0) AND MIT AND (Unlicense OR MIT)
+# Zlib
+License:        %{shrink:
+    Apache-2.0 AND
+    MIT AND
+    Zlib AND
+    (Apache-2.0 OR MIT) AND
+    (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND
+    (Unlicense OR MIT)
+    }
 SourceLicense:  Apache-2.0
 # The PyPI package lives at https://pypi.org/project/safetensors/
 # But the GitHub URL encompasses the entire project including the separately-packaged Rust crate
@@ -19,6 +28,7 @@ Source:         %{url}/archive/refs/tags/v%{version}/safetensors-%{version}.tar.
 
 BuildRequires:  python3-devel
 BuildRequires:  cargo-rpm-macros >= 24
+BuildRequires:  rust2rpm-helper
 BuildRequires:  tomcli
 # Test requirements
 BuildRequires:  python3dist(pytest)
@@ -62,6 +72,9 @@ rm -r safetensors/
 # dependency.
 tomcli set bindings/python/Cargo.toml del dependencies.safetensors.path
 tomcli set bindings/python/Cargo.toml str dependencies.safetensors.version '=%{version}'
+# Patch out foreign (e.g. MacOS-only) dependencies.
+find . -type f -name Cargo.toml -print \
+    -execdir rust2rpm-helper strip-foreign -o '{}' '{}' ';'
 # Also delete all the miscellaneous stuff from the GitHub release bundle
 rm -r attacks/ docs/ .github/ codecov.y* Dockerfile.* .dockerignore flake.* .gitignore Makefile RELEASE.md
 # Move toplevel README.md to eliminate name conflict
@@ -70,24 +83,6 @@ mv README.md README-safetensors.md
 cd bindings/python
 %cargo_prep
 cd ../..
-# The following Python sources are part of extras with dependencies not packaged in Fedora
-# If that changes, we should enable and build the extras as well as not removing the sources
-rm bindings/python/py_src/safetensors/flax.py
-rm bindings/python/py_src/safetensors/mlx.py
-rm bindings/python/py_src/safetensors/paddle.py
-rm bindings/python/py_src/safetensors/tensorflow.py
-%if %{without torch}
-rm bindings/python/py_src/safetensors/torch.py
-%endif
-# Also remove test cases that require unpackaged dependencies
-# TODO: Should probably submit an upstream bug to skip these automatically if deps are missing
-rm bindings/python/tests/test_flax_comparison.py
-rm bindings/python/tests/test_tf_comparison.py
-%if %{without torch}
-rm bindings/python/tests/test_pt_comparison.py
-rm bindings/python/tests/test_pt_model.py
-rm bindings/python/tests/test_simple.py
-%endif
 
 
 %generate_buildrequires
@@ -114,11 +109,34 @@ cd ../..
 
 %check
 cd bindings/python/
-%pyproject_check_import
+# Omit submodules that require unpackaged extras / optional dependencies
+%{pyproject_check_import %{shrink:
+    --exclude 'safetensors.flax'
+    --exclude 'safetensors.mlx'
+    --exclude 'safetensors.paddle'
+    --exclude 'safetensors.tensorflow'
+    %{?!with_torch:--exclude 'safetensors.torch'}
+    } }
 # Test both the rust part of the bindings and the Python parts
 %cargo_test
 # But only run the tests/ and not benches/ in Python
-%pytest tests/
+# Ignore tests that require unpackaged extras / optional dependencies
+# TODO: Should probably submit an upstream bug to skip these automatically if deps are missing
+%if %{without torch}
+ignore="${ignore-} --ignore=tests/test_multithreaded.py"
+ignore="${ignore-} --ignore=tests/test_pread_backend.py"
+ignore="${ignore-} --ignore=tests/test_pt_comparison.py"
+ignore="${ignore-} --ignore=tests/test_pt_model.py"
+ignore="${ignore-} --ignore=tests/test_simple.py"
+%endif
+ignore="${ignore-} --ignore=tests/test_flax_comparison.py"
+ignore="${ignore-} --ignore=tests/test_tf_comparison.py"
+%ifarch s390x
+# On s390x architecture, test_serialize_file_releases_gil fails
+# https://github.com/safetensors/safetensors/issues/812
+ignore="${ignore-} --ignore=tests/test_threadable.py"
+%endif
+%pytest ${ignore-} tests/
 cd ../..
 
 

diff --git a/sources b/sources
index 7014283..1600569 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (safetensors-0.7.0.tar.gz) = cc7cb3dd16d98952a134610737ade7ee8ed4f7399441ecd0c88054031d092d6b4d0caaaf0cba13ef3d6757782f43e785030e7f1793fb71003cbff7152fb45815
+SHA512 (safetensors-0.8.0.tar.gz) = 76fdcf0ed9a7a3c51141c9c02a4196566a6d6c3409ab37e36c6a17ca90e12455c111081053d023586ce4d2cf790af6d1d72339600b982a420455dd457c035f8b

                 reply	other threads:[~2026-07-08  5:58 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=178349032587.1.11829855489664766018.rpms-python-safetensors-2428ddfc9b02@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