+
    =iX                        ^ RI t ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHtHtHtHt ^ RIHt ^ RIHt ^ RIHtHtH t  ^ R	I!H"t" ^ RI#t$^ RI%t%^ RI&t&^ R
I'H(t( ^RI)H*t+ ]&PX                  ! 4       R 4       t-] P\                  R 4       t/] P\                  R 4       t0]&Pb                  Pe                  R4       ! R R]4      4       t3 ! R R]34      t4R# )    N)	sysconfig	build_ext)Distribution)CompileErrorDistutilsPlatformErrorDistutilsSetupErrorUnknownFileError)	Extension)missing_compiler_executable)TempdirManagercopy_xxmodule_cfixup_build_ext)StringIO)support)py39c              #     "   V P                   pVP                  4       Vn        \        P                  ! VP                  4      Vn        ^ RIHp \        P                  pVP                  4       \        n	        \        P                  Vn	        VP
                  ;_uu_ 4        Rx  RRR4       V\        n	        W2n	        \        P                  R8X  d   \        P                  ! ^4       R# R#   + '       g   i     LP; i5i)r   r   Ncygwin)instancemkdtemptmp_dirpathPathtmp_pathdistutils.commandr   site	USER_BASEsysplatformtimesleep)requestselfr   orig_user_bases   &   Jlib/python3.14/site-packages/setuptools/_distutils/tests/test_build_ext.pyuser_site_dirr&   $   s     D<<>DLIIdll+DM+^^N\\^DN..I
 
 
 $DN(
||x

1   
s   BD!C.&AD.C>	9Dc              #   ^  "   \         P                  ! V 4      ;_uu_ 4        \        W4      ;_uu_ 4       p\         P                  ! V4      ;_uu_ 4        R x  R R R 4       R R R 4       R R R 4       R #   + '       g   i     L"; i  + '       g   i     L-; i  + '       g   i     R # ; i5iN)import_helperCleanImportextension_redirectDirsOnSysPath)namer   new_paths   && r%   safe_extension_importr/   =   sd     		"	"4	(	(++x,,X66 7 , 
)	(66 ,+ 
)	(	(sK   B-BB	A3B	!B)
B-3B>B	BBB*	$	B-c              #  n  "   \         P                  ! 4       R8w  d   \        P                   R8w  d   Vx  R# \        P                  ! V4      ;_uu_ 4        \
        P                  P                  V 4      pRRR4       \        P                  P                  XP                  4      p\        P                  ! RR7      p\        P                  P                  V\        P                  P                  V4      4      p\        P                   ! VP                  V4       Vx  R#   + '       g   i     L; i5i)z
Tests will fail to tear down an extension module if it's been imported.

Before importing, copy the file to a temporary directory that won't
be cleaned up. Yield the new path.
Windowsr   Ndeleteme)prefix)r   systemr   r)   r,   	importlibutil	find_specosr   basenameorigintempfiler   joinshutilcopy)modr   specfilename	trash_dirdests   &&    r%   r+   r+   E   s      I%#,,(*B
		$	$T	*	*~~'', 
+ww,H  
3I77<<	277#3#3H#=>D
KKT"
O 
+	*s   AD5 D"6B,D5"D2	-D5r&   c                   >  a  ] tR t^Zt o R t]P                  P                  RR.4      R 4       t]	R 4       t
R tR tR tR	 tR
 tR tR tR tR tR tR t]P                  P-                  R4      ]P                  P/                  R4      R 4       4       t]P                  P-                  R4      ]P                  P/                  R4      R 4       4       t]P                  P-                  R4      ]P                  P/                  R4      R 4       4       tR tRtV tR# )TestBuildExtc                    \        V/ VB # r(   r   )r#   argskwargss   &*,r%   r   TestBuildExt.build_ext\   s    $)&))    copy_soFc                   \        4        \        V P                  4       \        P                  P                  V P                  R 4      p\        RV.4      p\        P                  R8w  d   V'       g   \        RV.R.R.R.R7      pM\        P                  R8X  d   \        P                  ! R4       Uu0 uF"  p\        P                  P                  V4      kK$  	  pp\        VR R	7      p\        P                  ! VR,          R
4       \        RV.R.R.R.R7      p\        RRRV./4      pV P                  Vn        V P#                  V4      p\%        V4       V P                  Vn        V P                  Vn        \        P*                  p\,        P.                  '       g   \1        4       \        n         VP3                  4        VP5                  4        V\        n        \7        RV P                  4      ;_uu_ 4        V P9                  V4       RRR4       \        P                  R8X  d#   V'       d   \        P:                  ! R
4       R# R# R# u upi   T\        n        i ; i  + '       g   i     L^; i)z
xxmodule.cxxwin32/usr/libz)library_dirs	librariesruntime_library_dirslinuxz/usr/lib*/libz.so*c                     \        V 4      # r(   )len)lib_paths   &r%   <lambda>-TestBuildExt.test_build_ext.<locals>.<lambda>r   s    s8}rJ   )keyz/tmp/libxx_z.so/tmpxx_zr-   ext_modulesN)r   r   r   r8   r   r<   r   r   r   globiglobrealpathsortedr=   copyfiler   package_dirr   r   	build_lib
build_tempstdoutr   verboser   ensure_finalizedrunr/   _test_xxunlink)	r#   rK   xx_cxx_extr-   libz_sodistcmd
old_stdouts	   &&       r%   test_build_extTestBuildExt.test_build_ext_   s   #%%ww||DLL,74$(<<7""F","e*4 (7;zzBV7W7WtBGG$$T*7W   !.LM->?"F"(%h*0 VT=6(CD<<nnT"ZZ
!CJ	$  "GGI#CJ"466MM'" 7 <<7"wII'( (/"C8 $CJ66s   6(I9 I I*I'*I:	c                   ^ RI pR F  p\        W4      '       d   K  Q h	  VP                  ^^4      ^8X  g   Q hVP                  ^^4      ^8X  g   Q hVP                  4       P	                  4       e   Q h\
        P                  '       d   RpVP                  V8X  g   Q h\        VP                  4       VP                  4      '       g   Q h\        VP                  4       VP                  4      '       g   Q h\        P                  R8X  d   \        P                  ! RRVP                  .RR7      p^ RIpVP!                  V4       VP#                  R4       UUu. uFE  pR	V9   g
   R
V9   g   K  VP#                  4       ^,          ^R P#                  R4       F  pVNK  	  KG  	  pppV '       g$   VP!                  V4       RV9  d   RV9  g   Q hR# RV9   g   Q hR# R# u uppi )r   Nz/This is a template module just for instruction.rT   readelfz-dT)universal_newlines
RPATHRUNPATH:rO   z
/usr/lib64r[   )errorfoonewrojr^   )rM   hasattrr}   r~   demor   HAVE_DOCSTRINGS__doc__
isinstanceNullStrr   r   
subprocesscheck_output__file__pprintsplit)	rK   rM   attrdoc
so_headersr   linerpathrpathss	   &        r%   rk   TestBuildExt._test_xx   s   2D2$$$$ 3 vva|q   vvb"~###vvx}}&&&"""CC::$$$"'')RWW----"&&(BFF++++<<7"#00D"++.4J MM*% ',,T22Dd?i4&7  "ZZ\!_Qr288=E  > 2   f%!/L4NNN4N '''' #s   G!06G!c                r   \        R R/4      pV P                  V4      p\        P                  pR\        n        ^ RIHp VP                  R4      pRVR&    VP                  4        V\        n        Vf   VR MWTR&    \        VP                  4      ^ 8  g   Q hR#   T\        n        Tf   TR i YTR&   i ; i)r-   rM   sunos)_config_varsPy_ENABLE_SHAREDTN)
r   r   r   r   distutils.sysconfigr   getri   rV   rQ   )r#   rp   rq   oldr   old_vars   &     r%   test_solaris_enable_shared'TestBuildExt.test_solaris_enable_shared   s    VTN+nnT"ll4""#56+/'(	;  "CL !343:/0 3##$q((( CL !343:/0s   B B6c                F   ^ RI p\        RR/4      pV P                  V4      pVP                   UUUu. uF  w  rEqdNK	  	  ppppRV9   g   Q hRVn        \
        P                  P                  VP                  R4      p\
        P                  P                  VP                  R4      p	\
        P                  ! V4       \
        P                  ! V	4       VP                  4        WP                  9   g   Q hWP                  9   g   Q hWP                  9   g   Q hR# u upppi )r   Nr-   rM   userTlibinclude)r   r   r   user_optionsr   r8   r   r<   r   mkdirri   rQ   r   include_dirs)
r#   r   rp   rq   r-   shortlabeloptionsr   incls
   &         r%   test_user_siteTestBuildExt.test_user_site   s    VTN+nnT" 362B2BC2B.D42BC     ggll4>>51ww||DNNI6

 	 &&&&&ii'''''' Ds   Dc                   \        R R.RR7      .p\        RRRV/4      pV P                  V4      pVP                  4        \        P
                  ! \        \        34      ;_uu_ 4        VP                  4        RRR4       \        R R.RR7      .p\        RRRV/4      pV P                  V4      pVP                  4        VP                  4        R#   + '       g   i     Lb; i)	r}   xxxFoptionalr-   rM   r]   NT)	r   r   r   ri   pytestraisesr
   r   rj   r#   modulesrp   rq   s   &   r%   test_optional_extension$TestBuildExt.test_optional_extension   s     UUGe<=VT='BCnnT"]],l;<<GGI = UUGd;<VT='BCnnT"	 =<s   )CC$	c                   \        R R.RR7      .p\        RRRV/4      pV P                  V4      pVP                  4        \        P
                  ! 4       pVP                  \        P                  P                  4       F  pWSP                  9   d   K  Q h	  \        P
                  ! RR7      pVP                  \        P                  P                  4       F  pWSP                  9   d   K  Q h	  V P                  V4      pR	Vn        VP                  4        VP                  . RO8X  g   Q hV P                  V4      pR
\        P                   R2Vn        VP                  4        R
VP                  9   g   Q hRVP                  9   g   Q hV P                  V4      pR\        P                   R2Vn        VP                  4        VP                  RR.8X  g   Q h\        V4      pRVn        VP                  4        VP                  . RO8X  g   Q hV P                  V4      pRVn        VP                  4        VP                  RR.8X  g   Q hV P                  V4      pRVn        VP                  4        VP                   RR.8X  g   Q hV P                  V4      pRVn        VP                  4        VP"                  . 8X  g   Q hV P                  V4      pRVn        VP                  4        VP"                  RR.8X  g   Q hR# )r}   r   Fr   r-   rM   r]   T)plat_specificzmy_lib, other_lib lastlib
my_lib_dirother_lib_dironetwozone two,threezone,two1Nz1 22)my_lib	other_liblastlib)r   r   three)r   r   )r   r   )r   r   r   finalize_optionsr   get_python_incr   r8   r   pathsepr   rR   rQ   r   link_objectsdefineundef	swig_opts)r#   r   rp   rq   
py_includepplat_py_includes   &      r%   test_finalize_options"TestBuildExt.test_finalize_options   s    UUGe<=VT='BCnnT"--/
!!"''//2A((((( 3 $22F &&rww7A((((( 8
 nnT"3}} BBBB nnT"'

|=As/////#"2"2222 nnT""**S)	yyUEN*** o*#:::: nnT"
zzlL9999 nnT"	yyUEN*** nnT"}}"""nnT"}}c
***rJ   c           
     0   \        4       pV P                  V4      pVP                  4        \        P                  ! \
        4      ;_uu_ 4        VP                  R 4       RRR4       R
R .p\        P                  ! \
        4      ;_uu_ 4        VP                  V4       RRR4       R.p\        P                  ! \
        4      ;_uu_ 4        VP                  V4       RRR4       R.p\        P                  ! \
        4      ;_uu_ 4        VP                  V4       RRR4       RRR.RR RR/3.pVP                  V4       V^ ,          p\        V\        4      '       g   Q hVP                  R 8X  g   Q h\        VR4      '       d   Q hRRR.RR RRRRR ./3.p\        P                  ! \
        4      ;_uu_ 4        VP                  V4       RRR4       RR.V^ ,          ^,          R&   VP                  V4       V^ ,          P                  R	.8X  g   Q hV^ ,          P                  R.8X  g   Q hR#   + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL; i  + '       g   i     EL\; i  + '       g   i     L; i)r}   Nbar foo.barsourcesrR   somemacros3)r   r}   r   )zfoo-barr   )r   r   )r   r   r   )r   r   )r   )r   r   r   r   r   r	   check_extensions_listr   r   rR   r   undef_macrosdefine_macros)r#   rp   rq   extsexts   &    r%   test_check_extensions_list'TestBuildExt.test_check_extensions_listC  s+   ~nnT" ]].//%%e, 0
 &u-]].//%%d+ 0   ]].//%%d+ 0
   ]].//%%d+ 0 Yk5&%PQR!!$'1g#y))))
 }}%%%3''''
 tE6	

 ]].//%%d+ 0 !+F3Q
8!!$'Aw##u,,,Aw$$444i 0// 0// 0// 0//6 0/s<   H5I	II1=J5I		I	I.	1J	J	c                    \        R R.RR7      .p\        RRRV/4      pV P                  V4      pVP                  4        VP	                  4       R.8X  g   Q hR# )r}   r   Fr   r-   rM   r]   N)r   r   r   ri   get_source_filesr   s   &   r%   test_get_source_files"TestBuildExt.test_get_source_files  s[    UUGe<=VT='BCnnT"##%%000rJ   c                   \        R R.RR7      \        RR.RR7      .p\        RRRV/4      pV P                  V4      pVP                  4        \        P
                  ! R	VP                  V^ ,          P                  4      4      '       g   Q h\        P
                  ! R
VP                  V^,          P                  4      4      '       g   Q hVP                  V^ ,          4      R.8X  g   Q hVP                  V^,          4      R.8X  g   Q hR# )r}   aaaFr   u   fööuuur-   rM   r]   zfoo(_d)?\..*u   föö(_d)?\..*
PyInit_fooPyInitU_f_1gaaN)	r   r   r   ri   researchget_ext_filenamer-   get_export_symbolsr   s   &   r%   test_unicode_module_names&TestBuildExt.test_unicode_module_names  s    eeWu5gw7
 VT='BCnnT"yy#*>*>wqz*OPPPPyy*C,@,@,QRRRR%%gaj1l^CCC%%gaj16F5GGGGrJ   c                   \        R R.4      \        RR.4      .p\        RRRV/4      pV P                  V4      pVP                  4        VP	                  V^ ,          4      R.8X  g   Q hVP	                  V^,          4      R.8X  g   Q hR	# )
zfoo.__init__r   u   föö.__init__r   r-   rM   r]   r   r   N)r   r   r   ri   r   r   s   &   r%   test_export_symbols__init__(TestBuildExt.test_export_symbols__init__  s     nug.&0
 VT='BCnnT"%%gaj1l^CCC%%gaj16F5GGGGrJ   c                    \        4       pV P                  V4      pR Vn        VP                  4        VP	                  4        VP                  R 8X  g   Q hR# )unixN)r   r   compilerri   rj   )r#   rp   rq   s   &  r%   test_compiler_option!TestBuildExt.test_compiler_option  sG     ~nnT"	||v%%%rJ   c                   \        4        V P                  4       p\        P                  P	                  VR 4      pV P                  VR4       \        RV.RR7      p\        RRRV./4      pV P                  V4      p\        V4       VP                  4        \        VP                  4       4      ^8X  g   Q h\        P                  P	                  V P                  R4      Vn        \        P                  P	                  V P                  R	4      Vn        \        P                  P!                  V P                  4       4      p\        P"                  ! 4       p\        P$                  ! V4        R
Vn        VP)                  4        VP                  4       ^ ,          p\        P$                  ! V4       \        P                  P+                  V4      '       g   Q h\,        P.                  ! R4      p	VP1                  V	4      '       g   Q h\        P                  P3                  V4      p
W8X  g   Q hRVn        RVn        VP)                  4        VP                  4       ^ ,          p\        P                  P+                  V4      '       g   Q hVP1                  V	4      '       g   Q h\        P                  P3                  V4      p
WP                  8X  g   Q hVP7                  R4      pRR/Vn        VP;                  R4      p\        P                  P=                  V4      ^ ,          pWP                  8X  g   Q hR
Vn        \        P                  P!                  V P                  4       4      p\        P"                  ! 4       p\        P$                  ! V4        VP;                  R4      p\        P$                  ! V4       \        P                  P=                  V4      ^ ,          p\        P                  P=                  V4      R,          pVR8X  g   Q hR#   \        P$                  ! T4       i ; i  \        P$                  ! T4       i ; i)zfoo.czvoid PyInit_foo(void) {}
r}   Fr   r-   rM   r]   buildtemptT
EXT_SUFFIXNbuild_pyr   r   r^   )r   r   r8   r   r<   
write_filer   r   r   r   ri   rV   get_outputsr   re   rf   ra   getcwdchdirinplacerj   existsr   get_config_varendswithdirnamer   get_finalized_commandrd   get_ext_fullpathr   )r#   r   c_filer   rp   rq   other_tmp_dirold_wdso_file
ext_suffixso_dirr   r   lastdirs   &             r%   test_get_outputsTestBuildExt.test_get_outputs  s   #%,,.gw/ <=x%8VT=3%@AnnT"3??$%***T\\7;dllG< ((8
	CKGGIoo'*GHHVww~~g&&&&--l;

++++)&&&	//#A&ww~~g&&&&
++++)&&& ,,Z8 "E{##E*ww}}T"1%}}$$$ ((8
	''.DHHVww}}T"1%''--%b)%I HHV@ HHVs   /.P P2 P/2Q
c                   \         P                  ! R 4      p\        4       pV P                  V4      pRVn        RR/VP
                  n        RR.VP
                  n        \        P                  ! 4       p\        P                  P                  VRRRV,           4      pVP                  R4      pWV8X  g   Q hRVn        \        P                  P                  VR	4      Vn        \        P                  P                  VR	RRV,           4      pVP                  R4      pWV8X  g   Q hVP                  R
4      p/ Vn        RR.VP
                  n        VP                  R4      p\        P                  P                  VR	RRRV,           4      pWV8X  g   Q hRVn        VP                  R4      p\        P                  P                  VRRRV,           4      pWV8X  g   Q hR# )r   Tr   srclxmlz	lxml.htmletreez
lxml.etreeFtmpdirr   twistedztwisted.runner.portmaprunnerportmapN)r   r   r   r   r   distributionrd   packagesr8   r   r   r<   r  re   r   )r#   r   rp   rq   curdirwantedr   r   s   &       r%   test_ext_fullpathTestBuildExt.test_ext_fullpath  s   &&|4
 ~nnT"(*E{$%+[$9!feVWs]C##L1~~ VX6fh#F##L1~~ ,,Z8!%.0H$I!##$<=fh	8YQT_U~~ ##$<=fi9s?K~~rJ   zplatform.system() != "Darwin"save_envc                *    V P                  R R4       R# )z==N)_try_compile_deployment_targetr#   s   &r%   test_deployment_target_default+TestBuildExt.test_deployment_target_default  s     	++D$7rJ   c                    \         P                  ! \        4      ;_uu_ 4        V P                  R R4       RRR4       R#   + '       g   i     R# ; i)>z10.1N)r   r   r   r  r  s   &r%   test_deployment_target_too_low+TestBuildExt.test_deployment_target_too_low  s3    
 ]]122//V< 3222s   A  A	c                    \         P                  ! R 4      pV'       dk   VP                  R4       Uu. uF  p\        V4      NK  	  ppVR;;,          ^,          uu&   RP	                  R V 4       4      pV P                  RV4       R# R# u upi )MACOSX_DEPLOYMENT_TARGET.c              3   8   "   T F  p\        V4      x  K  	  R # 5ir(   )str).0is   & r%   	<genexpr>@TestBuildExt.test_deployment_target_higher_ok.<locals>.<genexpr>*  s      ;AQs   <Nr^   )r   r   r   intr<   r  )r#   	deptargetxs   &  r%    test_deployment_target_higher_ok-TestBuildExt.test_deployment_target_higher_ok  su     ,,-GH	)2)=>)=AQ)=I>bMQM ; ;;I//Y? >s   Bc                B   Vf8   \         P                  P                  R4      '       d   \         P                  R MV\         P                  R&   \        P                  P                  R\        P                  ! RV R24      /V P                  4       \        P                  ! R4      p\        \        \        VP                  R4      R,          4      4      pVR,          R8  d   RpM\        V4      ^8  d   R	pMR
pVP                   ! V!  p\#        RV P                  R,          .RV 2.R7      p\%        RRRV./4      pV P&                  Vn        V P+                  V4      pV P&                  Vn        V P&                  Vn         \0        P2                  p\4        P6                  '       g   \9        4       \0        n         VP;                  4        VP=                  4        V\0        n        R #   T\0        n        i ; i  \>         d    T PA                  R4        R # i ; i)Nr$  zdeptargetmodule.czt                    #include <AvailabilityMacros.h>

                    int dummy;

                    #if TARGET z MAC_OS_X_VERSION_MIN_REQUIRED
                    #else
                    #error "Unexpected target"
                    #endif

                    r%  :r      N:Nr3  Nz{:02}{:01}0z{:02}{:02}00z	{:02}0000r.  z	-DTARGET=)extra_compile_argsr-   r]   z*Wrong deployment target during compilation)
   r5  )!r8   environr   jaracor   r   textwrapdedentr   r   r   tuplemapr-  r   rV   formatr   r   r   rd   r   re   rf   r   rg   r   rh   r   ri   rj   r   fail)r#   operatortargettmpldeptarget_extrp   rq   rr   s   &&&     r%   r  +TestBuildExt._try_compile_deployment_target-  s   >zz~~899JJ9:5;BJJ12#X__ : 
 !)z *
6 
& MM	
$ ))*DEs3S 1# 678 ":  D 6{a% #f%!]]001"+F8 45

 V[--QR<<nnT"	DJ???%Z
($$&	'
Z
 	DIIBC	Ds*   9G>  G. !G> .G;;G> >HH N)__name__
__module____qualname____firstlineno__r   r   markparametrizers   staticmethodrk   r   r   r   r   r   r   r   r   r   r	  r  skipifusefixturesr  r!  r0  r  __static_attributes____classdictcell__)__classdict__s   @r%   rE   rE   Z   sF    * [[Y01) 11)f "( "(J),(8 F+P:5x1HH	&= ~#J [[78[[Z(8 ) 98 [[78[[Z(= ) 9= [[78[[Z(
@ ) 9
@@D @DrJ   rE   c                   2   a a ] tR tRt oV 3R ltRtVtV ;t# )TestParallelBuildExtip  c                6   < \         SV `  ! V/ VB pR Vn        V# )T)superr   parallel)r#   rG   rH   r   	__class__s   &*, r%   r   TestParallelBuildExt.build_extq  s%    G%t6v6	!	rJ   rC  )rD  rE  rF  rG  r   rM  rN  __classcell__)rU  rO  s   @@r%   rQ  rQ  p  s      rJ   rQ  )5
contextlibr_   r5   os.pathr8   r   r   r=   r   r   r   r;   r8  r    	distutilsr   distutils.command.build_extr   distutils.corer   distutils.errorsr   r   r	   r
   distutils.extensionr   distutils.testsr   distutils.tests.supportr   r   r   ior   jaraco.pathr7  r   r   testr   compatr   r)   fixturer&   contextmanagerr/   r+   rH  rL  rE   rQ  rC  rJ   r%   <module>rg     s         	    
     1 '  * 7 T T      )  0    ( )RD> RD *RDj< rJ   