true|false)cbtjttdtjk7S)znChecks if sys.base_prefix and sys.prefix match. This handles PEP 405 compliant virtual environments. base_prefix)sysprefixgetattrj/mnt/ssd/data/python-lab/DaemonControl/venv/lib/python3.12/site-packages/pip/_internal/utils/virtualenv.py_running_under_venvr s ::mSZZ@ @@r c"ttdS)zmChecks if sys.real_prefix is set. This handles virtual environments created with pypa's virtualenv. real_prefix)hasattrrr r r _running_under_legacy_virtualenvrs 3 &&r c.txs tS)zDTrue if we're running inside a virtual environment, False otherwise.)r rr r r running_under_virtualenvr s  F$D$FFr ctjjtjd} t |d5}|j jcdddS#1swYyxYw#t$rYywxYw)zReads {sys.prefix}/pyvenv.cfg and returns its contents as list of lines Returns None, if it could not read/access the file. z pyvenv.cfgzutf-8)encodingN) ospathjoinrropenread splitlinesOSError)pyvenv_cfg_filefs r _get_pyvenv_cfg_linesr%sg ggll3::|>6 77r cTtr tStr tSy)zHReturns a boolean, whether running in venv with no system site-packages.F)r r)rr2r r r virtualenv_no_globalr4_s%$&&')133 r )returnbool)r5zlist[str] | None) __future__rloggingrrer-r getLogger__name__r"compiler$r rrrr)r2r4r r r r=sb"   8 $&0bjj?'# A'G : 8 r