509318396
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3
M •ZÎ  ã               @   sÒ   d dl Z d dlZddlmZ dddddgZf fd	d
„Zddd„Zddd„Zyd dlm	Z	 W n e
k
rv   dd„ Z	Y nX dd„ ZyeefZd dlZW n  ek
r´   eZd dlZY nX dd„ Zdd„ Zdd„ ZdS )é    Né   )ÚVerificationErrorÚsourcesZinclude_dirsZlibrary_dirsZextra_objectsZdependsc             K   sL   t ƒ  ddlm} | g}x|D ]}|jtjj|ƒƒ qW |f ||dœ|—ŽS )Nr   )Ú	Extension)Únamer   )Ú_hack_at_distutilsÚdistutils.corer   ÚappendÚosÚpathÚnormpath)ZsrcfilenameÚmodnamer   Úkwdsr   Z
allsourcesÚsrc© r   ú#/usr/lib64/python3.6/ffiplatform.pyÚget_extension   s    
r   c             C   sf   t ƒ  tjjƒ }zt| |||ƒ}tjj|ƒ}W dx.|jƒ D ]"\}}tjj|ƒ|kr:|tj|< q:W X |S )z-Compile a C extension module using distutils.N)	r   r
   ÚenvironÚcopyÚ_buildr   ÚabspathÚitemsÚget)ÚtmpdirÚextÚcompiler_verboseÚdebugZsaved_environZoutputfilenameÚkeyÚvaluer   r   r   Úcompile   s    
r   c             C   s  ddl m} dd l}dd l}|d|giƒ}|jƒ  |jdƒ}|d krLtjj}d|f|d< d|d< d| f|d	< d| f|d
< yR|j	j
dƒpˆd}z.|j	j|ƒ |jdƒ |jdƒ}	|	jƒ \}
W d |j	j
|ƒ X W nD |jj|jjfk
�r } ztd|jj|f ƒ‚W Y d d }~X nX |
S )Nr   )ÚDistributionZext_modulesZ	build_extÚffiplatformr   TÚforceZ	build_libZ
build_tempz%s: %s)r!   T)r   r    Zdistutils.errorsZdistutils.logZparse_config_filesZget_option_dictÚsysÚflagsr   ÚlogZset_thresholdZset_verbosityZrun_commandZget_command_objZget_outputsÚerrorsZCompileErrorZ	LinkErrorr   Ú	__class__Ú__name__)r   r   r   r   r    Z	distutilsZdistZoptionsZ	old_levelZcmd_objZsonameÚer   r   r   r       s.    


&r   )Úsamefilec             C   s   t jj| ƒt jj|ƒkS )N)r
   r   r   )Úf1Úf2r   r   r   r*   A   s    r*   c             C   sŒ   t jj| ƒs| S | }g }xn|}t jj|ƒ\}}||ks<| r@| S |j|ƒ y$t|t jƒrl|jƒ  t jj|Ž S W q t	k
r‚   Y qX qW d S )N)
r
   r   ÚisabsÚsplitr	   r*   ÚcurdirÚreverseÚjoinÚOSError)r   ÚdirÚnamesZprevdirr   r   r   r   Úmaybe_relative_pathD   s     
r5   c             C   sÚ   t | tƒr"|jdt| ƒ| f ƒ n´t | tƒrrt| jƒ ƒ}|jdt|ƒ ƒ xŠ|D ]}t||ƒ t| | |ƒ qPW ndt | tt	fƒr¬|jdt| ƒ ƒ xB| D ]}t||ƒ q˜W n*t | t
ƒrÈ|jd| f ƒ ntd| f ƒ‚d S )Nz%ds%sz%ddz%dlz%diz7the keywords to verify() contains unsupported object %r)Ú
isinstanceÚstrÚwriteÚlenÚdictÚsortedÚkeysÚ_flattenÚlistÚtupleÚint_or_longÚ	TypeError)ÚxÚfr<   r   r   r   r   r   r=   _   s     





r=   c             C   s   t jƒ }t| |ƒ |jƒ S )N)Ú	cStringIOÚStringIOr=   Úgetvalue)rB   rC   r   r   r   Úflattenr   s    
rG   c              C   s0   t jdkr,ydd l} W n tk
r*   Y nX d S )NZwin32r   )r#   ÚplatformÚ
setuptoolsÚImportError)rI   r   r   r   r   w   s
    
r   )r   N)r   N)r#   r
   Úerrorr   ZLIST_OF_FILE_NAMESr   r   r   Zos.pathr*   rJ   r5   ÚintZlongr@   rD   Ú	NameErrorÚior=   rG   r   r   r   r   r   Ú<module>   s(   

