ok

Mini Shell

Direktori : /opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/
Upload File :
Current File : //opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/virtualenv.pyc

�
x�_c@@s�ddlmZddlZddlZddlZddlZddlZddlZddlm	Z	e	r�ddl
mZmZnej
e�Zejd�Zd�Zd�Zd�Zd	�Zd
�Zd�Zd�ZdS(
i(tabsolute_importN(tMYPY_CHECK_RUNNING(tListtOptionals8include-system-site-packages\s*=\s*(?P<value>true|false)cC@stjttdtj�kS(snChecks if sys.base_prefix and sys.prefix match.

    This handles PEP 405 compliant virtual environments.
    tbase_prefix(tsystprefixtgetattr(((sO/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/virtualenv.pyt_running_under_venvscC@s
ttd�S(smChecks if sys.real_prefix is set.

    This handles virtual environments created with pypa's virtualenv.
    treal_prefix(thasattrR(((sO/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/virtualenv.pyt!_running_under_regular_virtualenvscC@st�pt�S(sGReturn True if we're running inside a virtualenv, False otherwise.
    (RR(((sO/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/virtualenv.pytrunning_under_virtualenv(scC@sctjjtjd�}y2tj|dd��}|j�j�SWdQXWnt	k
r^dSXdS(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.cfgtencodingsutf-8N(tostpathtjoinRRtiotopentreadt
splitlinestIOErrortNone(tpyvenv_cfg_filetf((sO/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/virtualenv.pyt_get_pyvenv_cfg_lines/s
cC@sot�}|dkr&tjd�tSxB|D]:}tj|�}|dk	r-|jd�dkr-tSq-WtS(sZCheck `{sys.prefix}/pyvenv.cfg` for system site-packages inclusion

    PEP 405 specifies that when system site-packages are not supposed to be
    visible from a virtual environment, `pyvenv.cfg` must contain the following
    line:

        include-system-site-packages = false

    Additionally, log a warning if accessing the file fails.
    s�Could not access 'pyvenv.cfg' despite a virtual environment being active. Assuming global site-packages is not accessible in this environment.tvaluetfalseN(	RRtloggertwarningtTruet#_INCLUDE_SYSTEM_SITE_PACKAGES_REGEXtmatchtgrouptFalse(t	cfg_linestlineR ((sO/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/virtualenv.pyt_no_global_under_venv?s	
!cC@sFtjjtjjtj��}tjj|d�}tjj|�S(s�Check if "no-global-site-packages.txt" exists beside site.py

    This mirrors logic in pypa/virtualenv for determining whether system
    site-packages are visible in the virtual environment.
    sno-global-site-packages.txt(RRtdirnametabspathtsitet__file__Rtexists(tsite_mod_dirtno_global_site_packages_file((sO/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/virtualenv.pyt#_no_global_under_regular_virtualenv]s!	cC@s$t�rt�St�r t�StS(sMReturns a boolean, whether running in venv with no system site-packages.
    (RR%RR-R"(((sO/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/virtualenv.pytvirtualenv_no_globalks
		(t
__future__RRtloggingRtreR(Rtpip._internal.utils.typingRttypingRRt	getLoggert__name__RtcompileRRRRRR%R-R.(((sO/opt/alt/python27/lib/python2.7/site-packages/pip/_internal/utils/virtualenv.pyt<module>s&				
				

Zerion Mini Shell 1.0