public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/spyder] f43: workaround for fontawesome-fonts-web woff2/ttf issue
@ 2026-11-07 16:06 Filipe Rosset
  0 siblings, 0 replies; only message in thread
From: Filipe Rosset @ 2026-11-07 16:06 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/spyder
Branch : f43
Commit : 9fe2716e9bd70efeb2cbddbbbd1b0e6cd77565de
Author : Filipe Rosset <rosset.filipe@gmail.com>
Date   : 2026-11-07T12:16:15-03:00
Stats  : +25/-0 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/spyder/c/9fe2716e9bd70efeb2cbddbbbd1b0e6cd77565de?branch=f43

Log:
workaround for fontawesome-fonts-web woff2/ttf issue

---
diff --git a/spyder.spec b/spyder.spec
index 54de637..219f674 100644
--- a/spyder.spec
+++ b/spyder.spec
@@ -62,6 +62,7 @@ components, such as the interactive console, in your own software.}
 %package -n python3-spyder
 Summary:    %{summary}
 
+Requires:       fontawesome-fonts-web
 Requires:       hicolor-icon-theme
 Requires:       mathjax
 Requires:       python3dist(python-lsp-black) >= 2
@@ -117,6 +118,30 @@ ln -s %{_datadir}/javascript/mathjax/ \
 # provide spyder3 as symlink to spyder binary for continuity
 ln -s spyder %{buildroot}%{_bindir}/spyder3
 
+# python3-QtAwesome symlinks its fontawesome5/6 webfonts to
+# /usr/share/fontawesome/webfonts/fa-*.ttf, but fontawesome-fonts-web 7.x
+# only ships woff2 files -> dangling symlinks -> qtawesome crashes spyder at
+# import time (FileNotFoundError on open() of the font data).
+# Those font files are owned by python3-QtAwesome, so they are not in our
+# buildroot; fix the symlinks in a scriptlet after install instead.
+# Repoint them at the woff2 files; Qt loads them fine as raw font data (the
+# .ttf extension is only used as a filename by qtawesome).
+%posttrans -n python3-spyder
+qta_fonts="$(python3 -c 'import os,qtawesome;print(os.path.dirname(qtawesome.__file__)+"/fonts")' 2>/dev/null)"
+if [ -d "$qta_fonts" ]; then
+    for ttf in "$qta_fonts"/fontawesome[56]-*-webfont-*.ttf; do
+        [ -L "$ttf" ] || continue
+        case "$(basename "$ttf")" in
+            *solid*)   target=fa-solid-900.woff2 ;;
+            *regular*) target=fa-regular-400.woff2 ;;
+            *brands*)  target=fa-brands-400.woff2 ;;
+            *) continue ;;
+        esac
+        ln -sf %{_datadir}/fontawesome/webfonts/$target "$ttf"
+    done
+fi
+exit 0
+
 
 %check
 desktop-file-validate %{buildroot}%{_datadir}/applications/spyder.desktop

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-07 16:06 [rpms/spyder] f43: workaround for fontawesome-fonts-web woff2/ttf issue Filipe Rosset

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