B
    ì¹`  ã               @   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}W n tk
r6   d}Y nX |dkrDdS tdƒg}tjdkr´ddl}y(|j	ddg|j
|j
dd	d
 ¡ d }W n tk
r¢   d}Y nX tƒ }d}x@| ¡ D ]4}| ¡ }| ¡  d¡r¸| |¡ | ¡ dkr¸d}q¸W |s| tdƒ¡ n@|r&| tdƒ¡ | d¡ n | tdƒjd t|ƒ¡d¡ d}	xHtj d¡tj d¡fD ],}
|
r‚|
 ¡  d¡r‚|
}	|
dk	rdP qdW |	dk	r´| tdƒj|	d¡ td |¡ƒ‚dS )z1Ensures that the environment is good for Unicode.r   )ÚgetpreferredencodingÚasciiNz¿Click 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)z.utf-8z.utf8)zc.utf8zc.utf-8Tz™Additional information: on this system no suitable UTF-8 locales were discovered. This most likely requires resolving by reconfiguring the locale system.z—This 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ÚLANGz·Click 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   Ú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+   úY/home/kop/projects/devel/pgwui/test_venv/lib/python3.7/site-packages/click/_unicodefun.pyÚ_verify_python_env   sl    








r-   )r   r   r   r   r-   r+   r+   r+   r,   Ú<module>   s   