Mercurial > sat_docs
comparison flatpak/sat_wrapper.py @ 142:2602c690806b
flatpak (sat_wrapper): don't use packages from $HOME in PYTHONPATH to avoid conflicts:
before this change, packages from ~/.local/lib/python2.7/site-packages when included, and
this could conflict with the ones from Flatpak, resulting in unwanted side effects (e.g.
OMEMO not available).
author | Goffi <goffi@goffi.org> |
---|---|
date | Sun, 23 Jun 2019 19:45:37 +0200 |
parents | 274af514a5cf |
children |
comparison
equal
deleted
inserted
replaced
141:15d1ddcd78cf | 142:2602c690806b |
---|---|
9 | 9 |
10 command = "##COMMAND##" | 10 command = "##COMMAND##" |
11 const_INT_PREFIX = "org.salutatoi.SAT" | 11 const_INT_PREFIX = "org.salutatoi.SAT" |
12 const_OBJ_PATH = '/org/salutatoi/SAT/bridge' | 12 const_OBJ_PATH = '/org/salutatoi/SAT/bridge' |
13 | 13 |
14 # we remove any path with "/home" from PYTHONPATH because we have | |
15 # "--filesystem=home" permission and packages in .local/lib/python2.7/site-packages may | |
16 # conflict with the ones from flatpak | |
17 clean_pythonpath = ':'.join(p for p in sys.path if p and not p.startswith('/home')) | |
18 os.environ['PYTHONPATH'] = clean_pythonpath | |
19 os.environ['PYTHONNOUSERSITE'] = '1' | |
14 | 20 |
15 try: | 21 try: |
16 sessions_bus = dbus.SessionBus() | 22 sessions_bus = dbus.SessionBus() |
17 db_object = sessions_bus.get_object(const_INT_PREFIX, | 23 db_object = sessions_bus.get_object(const_INT_PREFIX, |
18 const_OBJ_PATH) | 24 const_OBJ_PATH) |