mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 22:13:26 +00:00
setup_path_on_import: Don’t re-add BASE_DIR to sys.path.
BASE_DIR must already be in sys.path if we got as far as importing this. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
This commit is contained in:
committed by
Tim Abbott
parent
8fdb62a6bc
commit
e4832cc9da
@@ -1,6 +1,5 @@
|
||||
"""
|
||||
Use libraries from a virtualenv (by modifying sys.path) in production.
|
||||
Also add Zulip's root directory to sys.path
|
||||
"""
|
||||
|
||||
import os
|
||||
@@ -17,5 +16,3 @@ if sys.prefix != venv:
|
||||
exec(open(activate_this).read(), {}, activate_locals)
|
||||
if not os.path.exists(activate_locals["site_packages"]):
|
||||
raise RuntimeError(venv + " was not set up for this Python version")
|
||||
|
||||
sys.path.append(BASE_DIR)
|
||||
|
||||
Reference in New Issue
Block a user