From 41e0a73ea6e361e772323a5d9130505bb89380ef Mon Sep 17 00:00:00 2001 From: Ashesh Vashi Date: Tue, 7 Mar 2017 17:10:31 +0530 Subject: [PATCH] Adding the directory containing 'config.py' in to the sys.path variable, so that - when config.py refered from outside the pgAdmin itself (i.e. during building the pip). --- web/config.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/web/config.py b/web/config.py index 448d94bca..2f6438429 100644 --- a/web/config.py +++ b/web/config.py @@ -12,6 +12,15 @@ ########################################################################## import os +import sys + + +# We need to include the root directory in sys.path to ensure that we can +# find everything we need when running in the standalone runtime. +root = os.path.dirname(os.path.realpath(__file__)) +if sys.path[0] != root: + sys.path.insert(0, root) + from pgadmin.utils import env, IS_PY2, IS_WIN, fs_short_path ##########################################################################