Your IP : 216.73.217.15


Current Path : /opt/alt/python37/lib/python3.7/site-packages/setuptools_git/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib/python3.7/site-packages/setuptools_git/__pycache__/utils.cpython-37.pyc

B

\�S(�	@s>ddlZddlZddlZddlZddlZddlZejdkrLddlmZ	e
ZnddlmZ	dddddd	d
ddg	Z
ydd
lmZWn$ek
r�Gdd�de�ZYnXyddlmZWnek
r�dd�ZYnXyddlmZWnek
r�dd�ZYnXdd�Zddd�Zdd�Zdd	�Zdd
�Zdd�Zdd�ZdS)�N)�)�quote�
check_call�check_output�rmtree�b�posix�fsdecode�	hfs_quote�compose�	decompose)�CalledProcessErrorc@s"eZdZdZddd�Zdd�ZdS)r
a
        This exception is raised when a process run by check_call() or
        check_output() returns a non-zero exit status.

        The exit status will be stored in the returncode attribute;
        check_output() will also store the output in the output attribute.
        NcCs||_||_||_dS)N)�
returncode�cmd�output)�selfrrr�r�E/opt/alt/python37/lib/python3.7/site-packages/setuptools_git/utils.py�__init__szCalledProcessError.__init__cCsd|j|jfS)Nz-Command '%s' returned non-zero exit status %d)rr)rrrr�__str__#szCalledProcessError.__str__)N)�__name__�
__module__�__qualname__�__doc__rrrrrrr
s
r
)rcOsBddlm}|||�}|�d�}|dkr0|d}|r>t||��|S)Nr)�call�args)�
subprocessr�getr
)�	popenargs�kwargsr�retcoderrrrr+s


)rc	Oszddlm}ddlm}d|kr(td��||d|i|��}|��\}}|��}|rv|�d�}|dkrl|d}t||��|S)Nr)�PIPE)�Popen�stdoutz3stdout argument not allowed, it will be overridden.r)rr!r"�
ValueError�communicate�pollrr
)	rrr!r"�processrZ
unused_errr rrrrr:s

cCs2tjdkr"dd�}t�|d|�nt�|d�dS)N�win32cSst�|tj�||�dS)N)�os�chmod�stat�S_IWRITE)�func�path�excinforrr�onerrorNszrmtree.<locals>.onerrorF)�sys�platform�shutilr)r.r0rrrrLs
�utf-8cCstjdkr|�|�S|S)N)r)r1�version_info�encode)�s�encodingrrrrWs

cCstjdkr|�tjtj�S|S)Nr()r1r2�replacer)�sep�	posixpath)r.rrrr^s
cCs<tjdkr8t|t�s8tjdkr$d}nd}|�t��|�S|S)N)rr(�strict�surrogateescape)r1r5�
isinstance�strr2�decode�getfilesystemencoding)r.�errorsrrrr	es


cCsVt|t�rtd��y|�d�Wn0tk
rPt|�}tjdkrL|�d�}YnX|S)Nzbytes are requiredzutf-8)r�ascii)	r>�unicode�	TypeErrorr@�UnicodeDecodeError�	url_quoter1r5r6)r.rrrr
qs

cCsTt|t�rt�d|�Sy$|�d�}t�d|�}|�d�}Wntk
rNYnX|S)NZNFCzutf-8)r>rD�unicodedata�	normalizer@r6�UnicodeError)r.rrrr~s

cCsTt|t�rt�d|�Sy$|�d�}t�d|�}|�d�}Wntk
rNYnX|S)NZNFDzutf-8)r>rDrHrIr@r6rJ)r.rrrr�s

)r4)r1r)r+r3rHr;r5�urllib.parserrGr?rD�urllib�__all__rr
�ImportError�	Exceptionrrrrrr	r
rrrrrr�<module>s<