public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/flatpak-runtime-config] f45: Fix search paths for /app-installed python modules (#2112499)
@ 2026-09-10 21:21 Kalev Lember
0 siblings, 0 replies; only message in thread
From: Kalev Lember @ 2026-09-10 21:21 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/flatpak-runtime-config
Branch : f45
Commit : 2a984132dcf6d65665a45a8ce4d17fcbfeb30615
Author : Kalev Lember <klember@redhat.com>
Date : 2022-08-04T11:16:08+02:00
Stats : +15/-6 in 1 file(s)
URL : https://src.fedoraproject.org/rpms/flatpak-runtime-config/c/2a984132dcf6d65665a45a8ce4d17fcbfeb30615?branch=f45
Log:
Fix search paths for /app-installed python modules (#2112499)
This works around Python prefix changes in F36 that broke our
usercustomize.py, leading to python module search paths changing to
/app/local/lib.
As a work around, do the path mangling in the spec file and avoid doing
it at runtime.
https://bugzilla.redhat.com/show_bug.cgi?id=2112499
---
diff --git a/flatpak-runtime-config.spec b/flatpak-runtime-config.spec
index 0dd0b39..527340a 100644
--- a/flatpak-runtime-config.spec
+++ b/flatpak-runtime-config.spec
@@ -1,9 +1,8 @@
Name: flatpak-runtime-config
Version: 36
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Configuration files that live inside the flatpak runtime
Source1: 50-flatpak.conf
-Source2: usercustomize.py
Source3: org.fedoraproject.Platform.appdata.xml
Source4: org.fedoraproject.Sdk.appdata.xml
Source5: defaults.json.in
@@ -32,10 +31,17 @@ mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d
install -t $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d -p -m 0644 %{SOURCE1}
# usercustomize.py to set up Python paths
-for d in %{python3_sitelib} ; do
- mkdir -p $RPM_BUILD_ROOT/$d
- install -t $RPM_BUILD_ROOT/$d -m 0644 %{SOURCE2}
-done
+mkdir -p $RPM_BUILD_ROOT%{python3_sitelib}
+cat > $RPM_BUILD_ROOT%{python3_sitelib}/usercustomize.py <<EOF
+import site
+
+%define _prefix /app
+site.addsitedir("%{python3_sitelib}")
+%if "%{python3_sitelib}" != "%{python3_sitearch}"
+site.addsitedir("%{python3_sitearch}")
+%endif
+%undefine _prefix
+EOF
# Install appdata for both the Platform and the Sdk
mkdir -p $RPM_BUILD_ROOT%{_datadir}/metainfo
@@ -85,6 +91,9 @@ HOME=/root /usr/bin/fc-cache -s
%{_sysconfdir}/ld.so.conf.d/app.conf
%changelog
+* Thu Aug 04 2022 Kalev Lember <klember@redhat.com> - 36-2
+- Fix search paths for /app-installed python modules (#2112499)
+
* Mon May 02 2022 Tomas Popela <tpopela@redhat.com> - 36-1
- appdata: Add F36 versions
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-10 21:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-10 21:21 [rpms/flatpak-runtime-config] f45: Fix search paths for /app-installed python modules (#2112499) Kalev Lember
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox