o
    j                     @   s   d dl Z d dlZe jdZedu r>zd dlm  mZ W n  ey=   zd dl	m  mZ W n ey:   edw Y nw e
eddZedu rNe
eddZedu rXd dlmZ G dd deZeZdS )    Nzsetuptools.command.build_extz:'distutils' cannot be imported. Please install setuptools.Z_du_build_ext	build_ext)r   c                
       st   e Zd Zejddddddej fddd	d
dg	 Zejg d Z fddZ fddZdddZ	 fddZ
  ZS )r   )cython-cplusNzgenerate C++ source files)cython-create-listingNzwrite errors to a listing file)cython-line-directivesNzemit source line directiveszcython-include-dirs=Nz path to the Cython include files)cython-c-in-tempNz'put generated C files in temp directory)zcython-gen-pxiNz*generate .pxi file for public declarations)zcython-directives=Nzcompiler directive overrides)
cython-gdbNz$generate debug information for cygdb)zcython-compile-time-envNzcython compile time environment)r   r   r   r   r   c                    sJ   t    d| _d| _d| _d | _d | _d| _d| _d| _	d | _
d | _d S )Nr   F)superinitialize_optionscython_cpluscython_create_listingcython_line_directivescython_include_dirscython_directivescython_c_in_tempcython_gen_pxi
cython_gdbcython_compile_time_envshared_utility_qualified_nameself	__class__ [/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/Cython/Distutils/build_ext.pyr	   9   s   

zbuild_ext.initialize_optionsc                    sP   t    | jd u rg | _nt| jtr| jtj| _| jd u r&i | _d S d S N)	r   finalize_optionsr   
isinstancestrsplitospathsepr   r   r   r   r   r   F   s   



zbuild_ext.finalize_optionsFc                 C   s   t | |p
t |||S r   )getattr)r   	extensionZoption_namedefaultr   r   r   get_extension_attrP   s   zbuild_ext.get_extension_attrc           	         sV  ddl m} t| j}t|dg D ]}||vr|| qt|j|_|jt| j D ]}||vr6|| q+t| j}t	|drG|
|j | |drPd|_t	|drZ|j }nd }| |d| |d	||| |d
rq| jnd | |d| |d|| j|dd d| j|dd dd
}||f| j| jdkd|d }|j|_t | d S )Nr   )	cythonizer   r   r
   zc++no_c_in_tracebackr   r   r   r   r   r   )r#   r   )
Zuse_listing_fileZemit_linenumsZinclude_pathZcompiler_directives	build_dirZgenerate_pxiZ	gdb_debugc_line_in_tracebackZcompile_time_envr   )forcequiet)ZCython.Build.Dependenciesr%   listr   r!   appendZinclude_dirsdictr   hasattrupdater$   languager&   Z
build_tempr)   verbosesourcesr   build_extension)	r   extr%   ZincludesZinclude_dirZ
directivesr(   optionsZnew_extr   r   r   r3   S   sR   










zbuild_ext.build_extension)F)__name__
__module____qualname__
_build_extZuser_optionsZsep_byZboolean_optionsr	   r   r$   r3   __classcell__r   r   r   r   r      s&    

)sysr   modulesgetZ_build_ext_moduleZdistutils.command.build_extcommandr   ImportErrorZsetuptools.command.build_extr!   r9   Znew_build_extr   r   r   r   <module>   s*    	n