File: //proc/3141915/root/lib/google-cloud-sdk/lib/__pycache__/gcloud.cpython-312.pyc
�
��� � � � d Z ddlmZ ddlmZ ddlmZ ddlZddlZddlZej j e
� Zej j ed� Z
eej vrej j de� ej j e
� rej j de
� d� Zd� Zd � Zd
Zej( j+ d� rdnd
Zd� Zej0 d� � Zd� Zedk( r e� yy)zgcloud command line tool.� )�absolute_import)�division)�unicode_literalsN�third_partyc � � dt j vryddl} t | � y# t $ r ddl}|j | � Y yw xY w)a� Reloads the google module to prefer our vendored copy.
When python is not invoked with the -S option, it can preload google module
via .pth file setting its __path__. After this happens, our vendored google
package may not in the __path__. After our vendored dependency directory is
put at the first place in the sys.path, google module should be reloaded,
so that our vendored copy can be preferred.
�googleNr )�sys�modulesr �reload� NameError� importlib)r r
s �
lib/gcloud.py�_fix_google_moduler ) sB � � �S�[�[� �
���
�6�N�� � ��
���V���s �% �A�Ac � � dt j v rIg }g }| D ]- }d|v rd|vr|j |� �|j |� �/ |j |� |S | S )al If site packages are enabled reorder them.
Make sure bundled_python site-packages appear first in the sys.path.
Args:
sys_path: list current sys path
Returns:
modified syspath if CLOUDSDK_PYTHON_SITEPACKAGES is on, prefer bundled
python site packages over all other. Note the returns syspath has the same
elements but a different order.
�CLOUDSDK_PYTHON_SITEPACKAGESz
site-packageszplatform/bundledpythonunix)�os�environ�append�extend)�sys_path�new_path�other_site_packages�paths r �reorder_sys_pathr <