public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/flatpak-runtime-config] f45: Provide sitecustomize instead of usercustomize
@ 2026-09-10 21:21 Yaakov Selkowitz
  0 siblings, 0 replies; only message in thread
From: Yaakov Selkowitz @ 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 : ea290aec62ef6325b2278b0e3dbb023b64d72210
            Author : Yaakov Selkowitz <yselkowi@redhat.com>
            Date   : 2023-09-04T18:02:17-04:00
            Stats  : +14/-11 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/flatpak-runtime-config/c/ea290aec62ef6325b2278b0e3dbb023b64d72210?branch=f45

            Log:
            Provide sitecustomize instead of usercustomize

/app/lib*/pythonX.Y/site-packages should be treated as a distro site
directory, not a user site one. The difference being that sitecustomize
is still respected with scripts using the `python3 -s` shebang, as in
distro-built scripts.

---
diff --git a/flatpak-runtime-config.spec b/flatpak-runtime-config.spec
index 4b07882..e0b9f40 100644
--- a/flatpak-runtime-config.spec
+++ b/flatpak-runtime-config.spec
@@ -4,10 +4,10 @@
 
 Name:           flatpak-runtime-config
 Version:        39
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Configuration files that live inside the flatpak runtime
 Source1:        50-flatpak.conf
-Source2:        usercustomize.py
+Source2:        sitecustomize.py
 Source3:        defaults.json.in
 Source4:        org.fedoraproject.Platform.appdata.xml
 Source5:        org.fedoraproject.Sdk.appdata.xml
@@ -100,6 +100,9 @@ HOME=/root /usr/bin/fc-cache -s
 %{_sysconfdir}/ld.so.conf.d/app.conf
 
 %changelog
+* Mon Sep 04 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 39-3
+- Provide sitecustomize instead of usercustomize
+
 * Tue Aug 22 2023 Owen Taylor <otaylor@redhat.com> - 39-2
 - Bump for rebuild
 

diff --git a/sitecustomize.py b/sitecustomize.py
new file mode 100644
index 0000000..cbca172
--- /dev/null
+++ b/sitecustomize.py
@@ -0,0 +1,9 @@
+import site
+import sysconfig
+
+purelib = sysconfig.get_path('purelib', vars=dict(base='/app'))
+platlib = sysconfig.get_path('platlib', vars=dict(platbase='/app'))
+site.addsitedir(purelib)
+if platlib != purelib:
+    site.addsitedir(platlib)
+

diff --git a/usercustomize.py b/usercustomize.py
deleted file mode 100644
index cbca172..0000000
--- a/usercustomize.py
+++ /dev/null
@@ -1,9 +0,0 @@
-import site
-import sysconfig
-
-purelib = sysconfig.get_path('purelib', vars=dict(base='/app'))
-platlib = sysconfig.get_path('platlib', vars=dict(platbase='/app'))
-site.addsitedir(purelib)
-if platlib != purelib:
-    site.addsitedir(platlib)
-

^ 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: Provide sitecustomize instead of usercustomize Yaakov Selkowitz

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