public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/python-safetensors] f43: Switch to using pytorch_arches macro
@ 2026-07-07 11:40 Alexander F. Lent
  0 siblings, 0 replies; only message in thread
From: Alexander F. Lent @ 2026-07-07 11:40 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/python-safetensors
Branch : f43
Commit : 4ccd6f8599879492c3f4132ba6273b16199ee43d
Author : Alexander F. Lent <lx@xanderlent.com>
Date   : 2025-10-20T23:35:37-04:00
Stats  : +23/-12 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/python-safetensors/c/4ccd6f8599879492c3f4132ba6273b16199ee43d?branch=f43

Log:
Switch to using pytorch_arches macro

---
diff --git a/python-safetensors.spec b/python-safetensors.spec
index a488677..0f4a84d 100644
--- a/python-safetensors.spec
+++ b/python-safetensors.spec
@@ -17,23 +17,34 @@ SourceLicense:  Apache-2.0
 URL:            https://github.com/huggingface/safetensors
 Source:         %{url}/archive/refs/tags/v%{version}/safetensors-%{version}.tar.gz
 
+BuildRequires:  python3-devel
+BuildRequires:  cargo-rpm-macros >= 24
+BuildRequires:  tomcli
+# Test requirements
+BuildRequires:  python3dist(pytest)
+# https://github.com/huggingface/safetensors/pull/640
+BuildRequires:  python3dist(fsspec)
+
 # Exclude i686 because rust-safetensors does
-ExcludeArch:   %{ix86}
-# Right now, torch is exclusive to x86_64 and aarch64 so only build the torch extra on those arches.
-%ifarch %{x86_64} %{arm64}
+ExcludeArch:    %{ix86}
+
+# Define our own pytorch_arches macro until we have one system-wide.
+%if %{undefined pytorch_arches}
+# Match the pytorch package's current (as of F43) arch support plans.
+%if 0%{?fedora} < 45
+%global pytorch_arches %{x86_64} %{arm64}
+%else
+%global pytorch_arches %{x86_64}
+%endif
+%endif
+
+# Only include the torch extras on arches with PyTorch
+%ifarch %{pytorch_arches}
 %bcond torch 1
 %else
 %bcond torch 0
 %endif
 
-BuildRequires:	python3-devel
-BuildRequires:	cargo-rpm-macros >= 24
-BuildRequires:	tomcli
-# Test requirements
-BuildRequires:	python3dist(pytest)
-# https://github.com/huggingface/safetensors/pull/640
-BuildRequires:	python3dist(fsspec)
-
 %global _description %{expand:
 This library implements a new simple format for storing tensors safely
 (as opposed to pickle) and that is still fast (zero-copy).}
@@ -41,7 +52,7 @@ This library implements a new simple format for storing tensors safely
 %description %_description
 
 %package -n python3-safetensors
-Summary:	%{summary}
+Summary:        %{summary}
 
 %description -n python3-safetensors %_description
 

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

only message in thread, other threads:[~2026-07-07 11:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-07 11:40 [rpms/python-safetensors] f43: Switch to using pytorch_arches macro Alexander F. Lent

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