Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/virtualenv.pyo
ó
“tÆ_c @@ sè d d l m Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l m Z e r‡ d d l
m Z m Z n e j
e ƒ Z e j d ƒ Z d „ Z d „ Z d „ Z d „ Z d
„ Z d „ Z d „ Z d S(
i ( t absolute_importN( t MYPY_CHECK_RUNNING( t Listt Optionals8 include-system-site-packages\s*=\s*(?P<value>true|false)c C@ s t j t t d t j ƒ k S( sn Checks if sys.base_prefix and sys.prefix match.
This handles PEP 405 compliant virtual environments.
t base_prefix( t syst prefixt getattr( ( ( sO /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/virtualenv.pyt _running_under_venv s c C@ s
t t d ƒ S( sm Checks if sys.real_prefix is set.
This handles virtual environments created with pypa's virtualenv.
t real_prefix( t hasattrR ( ( ( sO /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/virtualenv.pyt! _running_under_regular_virtualenv s c C@ s t ƒ p t ƒ S( sG Return True if we're running inside a virtualenv, False otherwise.
( R R ( ( ( sO /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/virtualenv.pyt running_under_virtualenv( s c C@ sc t j j t j d ƒ } y2 t j | d d ƒ } | j ƒ j ƒ SWd QXWn t k
r^ d SXd S( s… Reads {sys.prefix}/pyvenv.cfg and returns its contents as list of lines
Returns None, if it could not read/access the file.
s
pyvenv.cfgt encodings utf-8N( t ost patht joinR R t iot opent readt
splitlinest IOErrort None( t pyvenv_cfg_filet f( ( sO /opt/alt/python35/lib/python3.5/site-packages/pip/_internal/utils/virtualenv.pyt _get_pyvenv_cfg_lines/ s
c C@ so t ƒ } | d k r&