+
    h7                        ^ 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 ^ RIt^RIHt ]P                  P!                  R4      t ! R R]	P$                  4      t ! R	 R
]P(                  4      t ! R R4      tR# )    N)DistutilsPlatformError)support)get_platform)msvcznot hasattr(msvc, "winreg")c            	       b  a  ] tR t^t o R t]P                  P                  ]P                  ! 4       P                  R4      '       * RR7      ]P                  P                  RRRR]	! 4       3.4      R 4       4       t]R 4       t]]P                  P                  R	R4      R
 4       4       tRtV tR# )Testmsvccompilerc                    R  pVP                  \        RV4       \        P                  ! \        4      ;_uu_ 4        \        P
                  ! R4       RRR4       R#   + '       g   i     R# ; i)c                     R# )N)NN )	plat_specs   &S/usr/lib/python3/dist-packages/setuptools/_distutils/compilers/C/tests/test_msvc.py_find_vcvarsall:Testmsvccompiler.test_no_compiler.<locals>._find_vcvarsall   s        r   zwont find this versionN)setattrr   pytestraisesr   _get_vc_env)selfmonkeypatchr   s   && r   test_no_compiler!Testmsvccompiler.test_no_compiler   sL    	 	D"3_E]]122( 3222s   AA/	winz-Only run test for non-mingw Windows platforms)reasonzplat_name, expectedNc                   a \         P                  ! 4       pV3R lpVP                  \         RV4       VP                  V4       R# )zC
Ensure a specified target platform is passed to _get_vcvars_spec.
c                    < VS8X  g   Q hR # Nr   )host_platformplatformexpecteds   &&r   _get_vcvars_specPTestmsvccompiler.test_cross_platform_compilation_paths.<locals>._get_vcvars_spec2   s    x'''r   r!   N)r   Compilerr   
initialize)r   r   	plat_namer    compilerr!   s   &&&f  r   %test_cross_platform_compilation_paths6Testmsvccompiler.test_cross_platform_compilation_paths    s9      ==?	( 	D"46FGI&r   c                   R pRp\         P                  P                  RR4      pV\         P                  V&    \        P                  ! R4      pVP                  4       V9   g   Q hW$VP                  4       ,          8X  g   Q h \         P                  P                  V4       V'       d   V\         P                  R&   R# R#   \         P                  P                  T4       T'       d   T\         P                  R&   i i ; i)u   ṰḖṤṪ┅ṼẨṜu	   ₃⁴₅DISTUTILS_USE_SDKNx86)osenvironpopr   r   lower)r   test_var
test_valueold_distutils_use_sdkenvs   &    r   test_get_vc_env_unicode(Testmsvccompiler.test_get_vc_env_unicode8   s    - 
 !#

/BD I)

8	H""5)C>>#s***X^^%5!6666JJNN8$$2G

./ % JJNN8$$2G

./ %s   A
C =C?verc                    \        \        R V 24      pR^R^/V,          pV! 4       w  rEV'       g   \        P                  ! RV R24       WC8  g   Q h\        P
                  P                  V4      '       g   Q hR# )_find_vc    zVS z is not installedN)getattrr   r   skipr,   pathisdir)r   r6   lookupexpected_versionversionr=   s   &&    r   test_get_vcTestmsvccompiler.test_get_vcI   sr    
 #/0 "dB/4KK#cU"345***ww}}T""""r   r   )	win-arm64rD   )	win-amd64rE   )r9   r:   )__name__
__module____qualname____firstlineno__r   r   markskipif	sysconfigr   
startswithparametrizer'   needs_winregr4   rB   __static_attributes____classdictcell____classdict__s   @r   r   r      s      [[""$//66>   [[&&<>"	

'	
' H H  [[UL1	# 2 	#r   r   c                   <   a a ] tR t^Wt oRtV 3R ltR tRtVtV ;t	# )CheckThreadNc                ~   <  \         SV `  4        R #   \         d    \        P                  ! 4       T n         R # i ; ir   )superrun	Exceptionsysexc_info)r   	__class__s   &r   rX   CheckThread.runZ   s-    	+GKM 	+LLNDM	+s    %<<c                $    V P                   '       * # r   r[   )r   s   &r   __bool__CheckThread.__bool__`   s    ==  r   r_   )
rF   rG   rH   rI   r[   rX   r`   rP   rQ   __classcell__)r\   rS   s   @@r   rU   rU   W   s     H+! !r   rU   c                   ,   a  ] tR t^dt o R tR tRtV tR# )	TestSpawnc                \   \         P                  ! 4       pRVn        Rp\        P                  RV.p\        ^d4       Uu. uF  p\        VP                  V.R7      NK  	  ppV F  pVP                  4        K  	  V F  pVP                  4        K  	  \        V4      '       g   Q hR# u upi )z;
Concurrent calls to spawn should have consistent results.
r    z2import os; assert os.environ["PATH"] == "expected"z-c)targetargsN)r   r#   _pathsrZ   
executablerangerU   spawnstartjoinall)r   r&   	inner_cmdcommandnthreadsthreads   &      r   test_concurrent_safeTestSpawn.test_concurrent_safee   s     ==?$H	>>43 INc

HR1Kx~~WI>
 	 
 FLLN FKKM 7|||
s   !B)c                ^   ^ RI Hp \        P                  ! 4       pRVn        R p\
        P                  P                  VP                  RV4      ;_uu_ 4        VP                  R.4       RRR4       \        P                  P                  R4      R8w  g   Q hR#   + '       g   i     L8; i)za
If CCompiler.spawn has been monkey-patched without support
for an env, it should still execute.
)	ccompilerr    c                B    \         P                  R,          R8X  g   Q hR# )z A spawn without an env argument.PATHr    N)r,   r-   )r   cmds   &&r   CCompiler_spawn@TestSpawn.test_concurrent_safe_fallback.<locals>.CCompiler_spawn   s    ::f%333r   rk   zn/aNry   )	distutilsrw   r   r#   rh   mockpatchobject	CCompilerrk   r,   r-   get)r   rw   r&   r{   s   &   r   test_concurrent_safe_fallback'TestSpawn.test_concurrent_safe_fallbackw   sz    
 	(==?$	4 ZZy22G_MMNNE7# N zz~~f%333 NMs   BB,	r   N)rF   rG   rH   rI   rt   r   rP   rQ   rR   s   @r   rd   rd   d   s     $4 4r   rd   )r,   rZ   rL   	threadingunittest.mockr~   distutils.errorsr   distutils.testsr   distutils.utilr   r    r   rJ   rK   rO   TempdirManagerr   ThreadrU   rd   r   r   r   <module>r      si    	 
    3 # '  {{!!"?@C#w-- C#L
!)"" 
!$4 $4r   