<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>

ðÕYf¨:  ã               @   sÍ   d  Z  d d l Z d d l Z d d l Z d d l m Z d d l m Z d d l m	 Z	 m
 Z
 m Z d d l m Z m Z m Z m Z d d l m Z e j d k r³ d d l Z Gd	 d
 „  d
 e	 ƒ Z d S)a9  distutils.unixccompiler

Contains the UnixCCompiler class, a subclass of CCompiler that handles
the "typical" Unix-style command-line C compiler:
  * macros defined with -Dname[=value]
  * macros undefined with -Uname
  * include search directories specified with -Idir
  * libraries specified with -lllib
  * library search directories specified with -Ldir
  * compile handled by 'cc' (or similar) executable with -c option:
    compiles .c to .o
  * link static library handled by 'ar' command (possibly with 'ranlib')
  * link shared library handled by 'cc -shared'
é    N)Ú	sysconfig)Únewer)Ú	CCompilerÚgen_preprocess_optionsÚgen_lib_options)ÚDistutilsExecErrorÚCompileErrorÚLibErrorÚ	LinkError)ÚlogÚdarwinc                   s   e  Z d  Z d Z d d d d g d d g d d g d d d	 g d
 d g d d d g d d i Z e j d d … d k r† d g e d <d d d d d d g Z d Z d Z	 d Z
 d Z d Z d Z Z Z e Z e j d k rå d Z ‡  f d d  †  Z d d d d d d! d" „ Z d# d$ „  Z d d% d d& d' „ Z d d d d d d% d d d d d( d) „
 Z d* d+ „  Z d, d- „  Z d. d/ „  Z d0 d1 „  Z d% d2 d3 „ Z ‡  S)4ÚUnixCCompilerZunixÚpreprocessorNÚcompilerZccÚcompiler_soÚcompiler_cxxÚ	linker_soz-sharedÚ
linker_exeÚarchiverÚarz-crÚranlibé   r   z.cz.Cz.ccz.cxxz.cppz.mz.oz.az.soz.dylibz.tbdzlib%s%sÚcygwinz.exec                se   t  |  j |  ƒ j | | | ƒ \ } } } t j d ƒ } | rX | | k rX | j | ƒ | | | f S)z'Remove standard library path from rpathÚLIBDIR)ÚsuperÚ	__class__Ú_fix_lib_argsr   Úget_config_varÚremove)ÚselfÚ	librariesÚlibrary_dirsÚruntime_library_dirsZlibdir)r   © ú</opt/alt/python35/lib64/python3.5/distutils/unixccompiler.pyr   U   s    zUnixCCompiler._fix_lib_argsc             C   s  |  j  d  | | ƒ } | \ } } } t | | ƒ }	 |  j |	 }
 | rY |
 j d | g ƒ | ro | |
 d  d … <| r‚ |
 j | ƒ |
 j | ƒ |  j s³ | d  k s³ t | | ƒ r| rÒ |  j t j	 j
 | ƒ ƒ y |  j |
 ƒ Wn1 t k
 r} z t | ƒ ‚ WYd  d  } ~ Xn Xd  S)Nz-or   )Z_fix_compile_argsr   r   ÚextendÚappendZforcer   ÚmkpathÚosÚpathÚdirnameÚspawnr   r   )r   ÚsourceZoutput_fileZmacrosZinclude_dirsÚextra_preargsÚextra_postargsÚ
fixed_argsÚignoreÚpp_optsZpp_argsÚmsgr#   r#   r$   Ú
preprocess_   s$    $zUnixCCompiler.preprocessc       	      C   sŒ   |  j  } t j d k r. t j | | | ƒ } y& |  j | | | d | g | ƒ Wn1 t k
 r‡ } z t | ƒ ‚ WYd  d  } ~ Xn Xd  S)Nr   z-o)r   ÚsysÚplatformÚ_osx_supportÚcompiler_fixupr+   r   r   )	r   ÚobjÚsrcZextZcc_argsr.   r1   r   r2   r#   r#   r$   Ú_compiley   s    		zUnixCCompiler._compiler   c             C   sé   |  j  | | ƒ \ } } |  j | d | ƒ} |  j | | ƒ rÕ |  j t j j | ƒ ƒ |  j |  j | g | |  j	 ƒ |  j
 rå y |  j |  j
 | g ƒ Wqå t k
 rÑ } z t | ƒ ‚ WYd  d  } ~ Xqå Xn t j d | ƒ d  S)NÚ
output_dirzskipping %s (up-to-date))Ú_fix_object_argsÚlibrary_filenameÚ
_need_linkr'   r(   r)   r*   r+   r   Úobjectsr   r   r	   r   Údebug)r   r?   Zoutput_libnamer;   r@   Útarget_langÚoutput_filenamer2   r#   r#   r$   Úcreate_static_lib„   s    	"zUnixCCompiler.create_static_libc             C   sI  |  j  | | ƒ \ } } |  j | | | ƒ } | \ } } } t |  | | | ƒ } t | t t d  ƒ f ƒ sx t d ƒ ‚ | d  k	 r™ t j j	 | | ƒ } |  j
 | | ƒ r5| |  j | d | g } |	 rß d g | d  d … <|
 rõ |
 | d  d … <| r| j | ƒ |  j t j j | ƒ ƒ yÝ | t j k rI|  j d  d  … } n |  j d  d  … } | d k rË|  j rËd } t j j | d ƒ d k rºd } x d | | k r¹| d 7} qœW|  j | | | <t j d	 k rìt j | | ƒ } |  j | | ƒ WqEt k
 r1} z t | ƒ ‚ WYd  d  } ~ XqEXn t j d
 | ƒ d  S)Nz%'output_dir' must be a string or Nonez-oz-gr   zc++Úenvé   ú=r   zskipping %s (up-to-date))r<   r   r   Ú
isinstanceÚstrÚtypeÚ	TypeErrorr(   r)   Újoinr>   r?   r%   r'   r*   r   Z
EXECUTABLEr   r   r   Úbasenamer4   r5   r6   r7   r+   r   r
   r   r@   )r   Ztarget_descr?   rB   r;   r    r!   r"   Zexport_symbolsr@   r-   r.   Z
build_temprA   r/   Zlib_optsZld_argsZlinkerÚir2   r#   r#   r$   Úlinkž   sH    		"zUnixCCompiler.linkc             C   s   d | S)Nz-Lr#   )r   Údirr#   r#   r$   Úlibrary_dir_optionØ   s    z UnixCCompiler.library_dir_optionc             C   s   d | k p d | k S)NÚgcczg++r#   )r   Zcompiler_namer#   r#   r$   Ú_is_gccÛ   s    zUnixCCompiler._is_gccc             C   s   t  j j t j d ƒ ƒ } t j d  d … d k r< d | St j d  d … d k r] d | St j d  d … d	 k r¡ |  j | ƒ r“ d
 d | g Sd d | g St j d  d … d k sÓ t j d  d … d k rÝ d | g S|  j | ƒ rt j d ƒ d k r	d | Sd | Sn d | Sd  S)NÚCCr   r   z-Lé   Zfreebsdz-Wl,-rpath=é   zhp-uxz-Wl,+sz+sZirix646Zosf1V5z-rpathÚGNULDÚyesz-Wl,--enable-new-dtags,-Rz-Wl,-Rz-R)r(   r)   rL   r   r   r4   r5   rR   )r   rO   r   r#   r#   r$   Úruntime_library_dir_optionÞ   s     2
z(UnixCCompiler.runtime_library_dir_optionc             C   s   d | S)Nz-lr#   )r   Úlibr#   r#   r$   Úlibrary_option
  s    zUnixCCompiler.library_optionc             C   s.  |  j  | d d ƒ} |  j  | d d ƒ} |  j  | d d ƒ} |  j  | d d ƒ} t j d k r¨ t j d ƒ } t j d | ƒ }	 |	 d  k r™ d	 }
 n |	 j d
 ƒ }
 x| D]w} t j	 j
 | | ƒ } t j	 j
 | | ƒ } t j	 j
 | | ƒ } t j	 j
 | | ƒ } t j d k rÎ| j d ƒ sF| j d ƒ rÎ| j d ƒ rÎt j	 j
 |
 | d
 d  … | ƒ } t j	 j
 |
 | d
 d  … | ƒ } t j	 j
 |
 | d
 d  … | ƒ } t j	 j
 |
 | d
 d  … | ƒ } t j	 j | ƒ rä| St j	 j | ƒ rú| St j	 j | ƒ r| St j	 j | ƒ r¯ | Sq¯ Wd  S)NZlib_typeÚsharedÚdylibÚ
xcode_stubÚstaticr   ÚCFLAGSz-isysroot\s+(\S+)ú/rE   z/System/z/usr/z/usr/local/)r=   r4   r5   r   r   ÚreÚsearchÚgroupr(   r)   rK   Ú
startswithÚexists)r   ÚdirsrY   r@   Zshared_fZdylib_fZxcode_stub_fZstatic_fZcflagsÚmZsysrootrO   r[   r\   r^   r]   r#   r#   r$   Úfind_library_file  s>    	""""zUnixCCompiler.find_library_file)Ú__name__Ú
__module__Ú__qualname__Zcompiler_typeZexecutablesr4   r5   Zsrc_extensionsZobj_extensionZstatic_lib_extensionZshared_lib_extensionZdylib_lib_extensionZxcode_stub_lib_extensionZstatic_lib_formatZshared_lib_formatZdylib_lib_formatZxcode_stub_lib_formatZexe_extensionr   r3   r:   rC   rN   rP   rR   rX   rZ   rh   r#   r#   )r   r$   r   -   sF   				
	6,r   )Ú__doc__r(   r4   ra   Z	distutilsr   Zdistutils.dep_utilr   Zdistutils.ccompilerr   r   r   Zdistutils.errorsr   r   r	   r
   r   r5   r6   r   r#   r#   r#   r$   Ú<module>   s   $"