7f ddlZddlZddlZddlZddlZddlmZmZeje Z ej dZ de fdZde fdZde fdZdeeefdZde fd Zde fd Zde fd ZdS) N)ListOptionalz8include-system-site-packages\s*=\s*(?Ptrue|false)returnc^tjttdtjkS)znChecks if sys.base_prefix and sys.prefix match. This handles PEP 405 compliant virtual environments. base_prefix)sysprefixgetattr~/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_internal/utils/virtualenv.py_running_under_venvrs :mSZ@@ @@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:tp tS)zDTrue if we're running inside a virtual environment, False otherwise.)rrr r r running_under_virtualenvrs  F$D$F$FFr ctjtjd} t |d5}|cdddS#1swxYwYdS#t$rYdSwxYw)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) ospathjoinrr openread splitlinesOSError)pyvenv_cfg_filefs r _get_pyvenv_cfg_linesr $s gll3:|<>6 7 77r cvtrtStrtSdS)zHReturns a boolean, whether running in venv with no system site-packages.F)rr+rr4r r r virtualenv_no_globalr6^s='$&&&'))41333 5r )loggingrrer/rtypingrr getLogger__name__r$compiler&boolrrrstrr r+r4r6r r r r?sM !!!!!!!!  8 $ $&0bj?''# ATAAAA'$''''G$GGGG xS 2    t: 8D 8 8 8 8 d      r