diff options
| author | 3pidemix <3pidemix@gmail.com> | 2020-03-30 14:33:52 -0400 |
|---|---|---|
| committer | Jordan <jordan@psifertex.com> | 2020-03-30 15:52:46 -0400 |
| commit | e50ff6445f6a915ed868b40511df1ee7e125a4bb (patch) | |
| tree | 8544a1720976cc3fd80e9fb2872b255f6342b6a9 /scripts/install_api.py | |
| parent | ff22c89fa6ac1f67fd6ee22cf7f23242856bc161 (diff) | |
Enable use within a venv
Diffstat (limited to 'scripts/install_api.py')
| -rw-r--r-- | scripts/install_api.py | 2 |
1 files changed, 2 insertions, 0 deletions
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() |
