U e*B@sdZddlZddlZddlZddlmZmZmZddlZddl m Z ddl m Z ddl mZmZmZmZddlmZddlmZd d ZGd d d e ZGd ddeZdZdZdZddZedZddZddZ ddZ!dS)adistutils.cygwinccompiler Provides the CygwinCCompiler class, a subclass of UnixCCompiler that handles the Cygwin port of the GNU C compiler to Windows. It also contains the Mingw32CCompiler class which handles the mingw32 port of GCC (same as cygwin in no-cygwin mode). N)PopenPIPE check_output) UnixCCompiler) write_file)DistutilsExecErrorCCompilerError CompileErrorUnknownFileError) LooseVersion)find_executablecCstjd}|dkr|tj|d|d}|dkr8dgS|dkrFdgS|d krTd gS|d krbd gS|d krpdgStd|dS)zaInclude the appropriate MSVC runtime library if Python was built with MSVC 7.0 or later. zMSC v. Z1300Zmsvcr70Z1310Zmsvcr71Z1400Zmsvcr80Z1500Zmsvcr90Z1600Zmsvcr100zUnknown MS Compiler version %s N)sysversionfind ValueError)Zmsc_posZmsc_verrS/opt/hc_python/lib/python3.8/site-packages/setuptools/_distutils/cygwinccompiler.py get_msvcr?s rc @sReZdZdZdZdZdZdZdZdZ dZ dd d Z d d Z dddZ dddZdS)CygwinCCompilerz? Handles the Cygwin port of the GNU C compiler to Windows. cygwinz.o.az.dllzlib%s%sz%s%sz.exercCsHt||||t\}}|d||f|tk rB|d|tjdd|_ tjdd|_ d|j krt \|_ |_ |_||jd|j |j |jf|j dkr|j |_nd |_|j d krd }qd }n |j |_d }|jd |j d|j d |j d|j d|j|fdd|j kr<|j dkrsz get_versions..)tuple)commandsrrrr3s r3cCst|dg}|dS)zCTry to determine if the compiler that would be used is from cygwin.z -dumpmachinescygwin)rstripendswith)r1rrrrrls rl)"rir.rrK subprocessrrrreZdistutils.unixccompilerrdistutils.file_utilrdistutils.errorsrrr r Zdistutils.versionr distutils.spawnr rrrkr,rurwr*compilerrr3rlrrrrs,1    @1/