impulsare /
config
| 1 | 1 | import os |
|
| 2 | 1 | from distutils.sysconfig import get_config_vars |
|
| 3 | |||
| 4 | |||
| 5 | 1 | def get_venv_basedir(): |
|
| 6 | """Returns the base directory of the virtualenv, useful to read configuration and plugins""" |
||
| 7 | |||
| 8 | 1 | try: |
|
| 9 | 1 | import virtualenv |
|
|
0 ignored issues
–
show
Unused Code
introduced
by
Loading history...
|
|||
| 10 | raise EnvironmentError("You must be in a virtual environment") |
||
| 11 | 1 | except Exception: |
|
| 12 | return os.path.abspath(get_config_vars()['exec_prefix'] + '/../') |
||
| 13 |