diff options
author | Alexander Larsson <alexl@redhat.com> | 2015-11-27 08:57:51 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2015-11-27 08:57:51 +0100 |
commit | fb9431b869642eab9a0f4489370aba27d1e75e07 (patch) | |
tree | 2f427319ca1a78b612e608bb62fa65ccd74fd263 | |
parent | c660cd15246bf1aeced923427d54c98194d595ac (diff) |
python usercustomize: Use addsitedir() to add /app path
This means .pth files will be processed there, and any extra dirs
or egg files will be automatically added.
-rw-r--r-- | meta-freedesktop/recipes-devtools/python/python/usercustomize.py | 3 | ||||
-rw-r--r-- | meta-freedesktop/recipes-devtools/python/python3/usercustomize.py | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/meta-freedesktop/recipes-devtools/python/python/usercustomize.py b/meta-freedesktop/recipes-devtools/python/python/usercustomize.py index 9bb5876..97810d6 100644 --- a/meta-freedesktop/recipes-devtools/python/python/usercustomize.py +++ b/meta-freedesktop/recipes-devtools/python/python/usercustomize.py @@ -1,4 +1,5 @@ from distutils import sysconfig import sys +import site -sys.path.insert(1, sysconfig.get_python_lib(prefix="/app")) +site.addsitedir(sysconfig.get_python_lib(prefix='/app')) diff --git a/meta-freedesktop/recipes-devtools/python/python3/usercustomize.py b/meta-freedesktop/recipes-devtools/python/python3/usercustomize.py index 9bb5876..97810d6 100644 --- a/meta-freedesktop/recipes-devtools/python/python3/usercustomize.py +++ b/meta-freedesktop/recipes-devtools/python/python3/usercustomize.py @@ -1,4 +1,5 @@ from distutils import sysconfig import sys +import site -sys.path.insert(1, sysconfig.get_python_lib(prefix="/app")) +site.addsitedir(sysconfig.get_python_lib(prefix='/app')) |