public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Alexander F. Lent <lx@xanderlent.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-safetensors] f43: Switch to using pytorch_arches macro
Date: Tue, 07 Jul 2026 11:40:39 GMT	[thread overview]
Message-ID: <178342443942.1.18093876170951837497.rpms-python-safetensors-4ccd6f859987@fedoraproject.org> (raw)

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
 

                 reply	other threads:[~2026-07-07 11:40 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=178342443942.1.18093876170951837497.rpms-python-safetensors-4ccd6f859987@fedoraproject.org \
    --to=lx@xanderlent.com \
    --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