U W@sVddlZddlZddlZddlmZejedddZddZ ddZ d d Z dS) N)PY2.cCs^ddl}td}d}|dk rZ|jdddrB|j}|d7}q|jj|j j @rZ|SqZqdS)Nrr__name__zclick.) __future__sys _getframe f_globalsget startswithf_backf_codeco_flagsZunicode_literalsZ compiler_flag)rZfrmidxr/_unicodefun.py_find_unicode_literals_frames  rcCs@tr tjrdSt}|dkr dSddlm}|td|ddS)Nr)warnaClick detected the use of the unicode_literals __future__ import. This is heavily discouraged because it can introduce subtle bugs in your code. You should instead use explicit u"" literals for your unicode strings. For more information see http://click.pocoo.org/python3/) stacklevel)rclickZ disable_unicode_literals_warningrwarningsrWarning)Z bad_framerrrr_check_for_unicode_literalss  rc CstrdSzddl}t|j}Wntk r<d}YnX|dkrJdSd}tjdkrddl}|j ddg|j |j d d}t }d }t |tr|dd }|D]4}|}|d r|||d krd }q|d7}|s|d7}n&|r|d7}n|ddt|7}d}tjdtjdfD]0}|rV|d rV|}|dk r8qjq8|dk r|d|7}td|dS)z=Ensures that the environment is good for unicode on Python 3.Nrasciirposixlocalez-a)stdoutstderrFreplace)z.utf-8z.utf8)zc.utf8zc.utf-8Tz zAdditional 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: export LC_ALL=C.UTF-8 export LANG=C.UTF-8zThis system lists a couple of UTF-8 supporting locales that you can pick from. The following suitable locales where discovered: %sz, LC_ALLZLANGz 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 "%s" but it is not supportedzClick will abort further execution because Python 3 was configured to use ASCII as encoding for the environment. Either run this under Python 2 or consult http://click.pocoo.org/python3/ for mitigation steps.)rrcodecslookupZgetpreferredencodingname Exceptionos subprocessPopenPIPEZ communicateset isinstancebytesdecode splitlinesstriplowerendswithaddjoinsortedenvironr RuntimeError) rZfs_encZextrar&rvZ good_localesZ has_c_utf8lineZ bad_localerrr_verify_python3_env0sl           r8) r%rr!Z_compatrmodulesrrsplitrrrr8rrrrs