Commit 7101034b authored by Seppo Yli-Olli's avatar Seppo Yli-Olli

Turned out this fixes Python2 too

parent 61d8ccfb
Pipeline #62073703 passed with stages
in 131 minutes and 47 seconds
......@@ -6,11 +6,11 @@ depends:
- |
install -m 644 -D "%{install-root}%{indep-libdir}/python2.7/"
install -m 644 -D "%{install-root}%{indep-libdir}/python2.7/"
python2 -m compileall "%{install-root}%{indep-libdir}/python2.7/"
python2 -O -m compileall "%{install-root}%{indep-libdir}/python2.7/"
python2 -OO -m compileall "%{install-root}%{indep-libdir}/python2.7/"
- kind: local
path: files/
path: files/
import sys
import site
import os
import sysconfig
old_user_site = os.path.abspath(site.USER_SITE)
site.USER_SITE = None
site.USER_BASE = os.environ.setdefault("PYTHONUSERBASE", "/var/data/python")
sysconfig._CONFIG_VARS = None
site.USER_SITE = site.getusersitepackages()
old_index = sys.path.index(old_user_site)
sys.path.insert(old_index, os.path.abspath(site.USER_SITE))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment