This repository has been archived on 2026-01-16. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
flatpak-runtime-config/sitecustomize.py
Yaakov Selkowitz ea290aec62 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.
2023-09-04 18:02:17 -04:00

9 lines
240 B
Python

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)