
    ڏDj{                        d dl Z d dlZe j                  j                  d      Ze
	 d dlmc mZ  e
edd      Ze
 e
edd      Zed dlmZ  G d de      ZeZy# e$ r 	 d dl	mc mZ n# e$ r	  ed      w xY wY Ow xY w)    Nzsetuptools.command.build_extz:'distutils' cannot be imported. Please install setuptools._du_build_ext	build_ext)r   c            
            e Zd Zej                  ddddddej
                  z   fddd	d
dg	z   Zej                  g dz   Z fdZ fdZddZ	 fdZ
 x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                     t         |           d| _        d| _        d| _        d | _        d | _        d| _        d| _        d| _	        d | _
        d | _        y )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__s    ^C:\Crop_Prediction\Backend\crop-ai-system\venv\Lib\site-packages\Cython/Distutils/build_ext.pyr   zbuild_ext.initialize_options9   s]    "$%&"&'##' !% !'+$-1*    c                    t         |           | j                  g | _        nHt        | j                  t              r.| j                  j                  t        j                        | _        | j                  i | _        y y N)	r   finalize_optionsr   
isinstancestrsplitospathsepr   r   s    r   r   zbuild_ext.finalize_optionsF   sk     "##+')D$00#6((..rzz: $!!)%'D" *r   c                 8    t        | |      xs t        |||      S r   )getattr)r   	extensionoption_namedefaults       r   get_extension_attrzbuild_ext.get_extension_attrP   s    t[)UWYW-UUr   c                    ddl m} t        | j                        }t	        |dg       D ]  }||vs|j                  |        t        |j                        |_        |j                  t        | j                        z   D ]  }||vs|j                  |        t        | j                        }t        |d      r|j                  |j                         | j                  |d      rd|_        t        |d      r|j                   }nd }| j                  |d      | j                  |d	      ||| j                  |d
      r| j                  nd | j                  |d      | j                  |d      || j                  |dd       | j                  |dd       d
} ||f| j                  | j                   dk(  d|d   }|j"                  |_        t$        	| M  |       y )Nr   )	cythonizer   r   r   zc++no_c_in_tracebackr   r   r   r   r   r   )r)   r   )
use_listing_fileemit_linenumsinclude_pathcompiler_directives	build_dirgenerate_pxi	gdb_debugc_line_in_tracebackcompile_time_envr   )forcequiet)Cython.Build.Dependenciesr,   listr   r&   appendinclude_dirsdictr   hasattrupdater*   languager-   
build_tempr7   verbosesourcesr   build_extension)
r   extr,   includesinclude_dir
directivesr5   optionsnew_extr   s
            r   rD   zbuild_ext.build_extensionS   s   7 001"3(=rB 	-K(*,	-   0 01++d43D3D.EE 	-K(*,	- $001
3+,c334""37 CL3+,&)&;&;";"& $ 7 7=T U!44S:RS$#-,0,C,CCI[,\bf 33C9IJ00lC#6 $ 7 7=V`d 7 e-1-D-DSJisw-D-x
 
jj(9
=D

 oo$r   )F)__name__
__module____qualname__
_build_extuser_optionssep_byboolean_optionsr   r   r*   rD   __classcell__)r   s   @r   r   r      s    **	*	/	,	/*2C2CC	E	8	:	,	5	/#.
 
L* !00 4 O
2(V5% 5%r   )sysr#   modulesget_build_ext_moduledistutils.command.build_extcommandr   ImportErrorsetuptools.command.build_extr&   rN   new_build_ext r   r   <module>r]      s    
 	 KKOO$BC \?? &>
*K>JCk%
 k%\ }  \	\DD 	\Z[[	\ E\s)   	A B "	A,+B ,A::B ?B 