From e50ff6445f6a915ed868b40511df1ee7e125a4bb Mon Sep 17 00:00:00 2001 From: 3pidemix <3pidemix@gmail.com> Date: Mon, 30 Mar 2020 14:33:52 -0400 Subject: Enable use within a venv --- scripts/install_api.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'scripts') diff --git a/scripts/install_api.py b/scripts/install_api.py index 27d158dd..438dc9a8 100644 --- a/scripts/install_api.py +++ b/scripts/install_api.py @@ -80,6 +80,8 @@ if ( len(sys.argv) > 1 and sys.argv[1].lower() == "root" ): if not os.access(install_path, os.W_OK): print("Root install specified but cannot write to {}".format(install_path)) sys.exit(1) +elif os.environ.get('VIRTUAL_ENV'): + install_path = getsitepackages()[0] else: if check_enableusersite(): install_path = getusersitepackages() -- cgit v1.3.1