3
e                 @   s.   d dl Z d dlZd dlmZ ddddZdS )    N)gettext)returnc              C   s  yddl m}  tj|  j}W n tk
r6   d}Y nX |dkrDdS tdg}tjdkrddl}y(|j	ddg|j
|j
dd	d
j d }W n tk
r   d}Y nX t }d}x@|j D ]4}|j }|j jdr|j| |j dkrd}qW |s|jtd n@|r&|jtd |jd n |jtdjdjt|d d}	xHtjjdtjjdfD ],}
|
r|
j jdr|
}	|
dk	rdP qdW |	dk	r|jtdj|	d tdj|dS ) z1Ensures that the environment is good for Unicode.r   )getpreferredencodingasciiNzClick will abort further execution because Python was configured to use ASCII as encoding for the environment. Consult https://click.palletsprojects.com/unicode-support/ for mitigation steps.posixlocalez-areplace)stdoutstderrencodingerrors F.utf-8.utf8c.utf8c.utf-8TzAdditional information: on this system no suitable UTF-8 locales were discovered. This most likely requires resolving by reconfiguring the locale system.zThis system supports the C.UTF-8 locale which is recommended. You might be able to resolve your issue by exporting the following environment variables:z1    export LC_ALL=C.UTF-8
    export LANG=C.UTF-8zThis system lists some UTF-8 supporting locales that you can pick from. The following suitable locales were discovered: {locales}z, )ZlocalesLC_ALLLANGzClick discovered that you exported a UTF-8 locale but the locale system could not pick up from it because it does not exist. The exported locale is {locale!r} but it is not supported.)r   z

)r   r   )r   r   )r   r   )r   r   codecslookupname	Exception_os
subprocessPopenPIPEcommunicateOSErrorset
splitlinesstriplowerendswithaddappendformatjoinsortedenvirongetRuntimeError)r   Zfs_encextrar   rvZgood_localesZ
has_c_utf8liner   Z
bad_localeZ
env_locale r/   2/tmp/pip-build-3irwxpxt/click/click/_unicodefun.py_verify_python_env   sl    








r1   )r   r   r   r   r1   r/   r/   r/   r0   <module>   s   