+
    Bi-"                        ^ 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HtHt ]	! ]RRR4      P                  4       t]R,          R,          R,          t ] P$                  P'                  R]4      t] P$                  P+                  ]4      t]]P.                  R&   ]P0                  P3                  ]4        ! R	 R
4      t]P:                  ! ]P<                  ! 4       R4      t]P:                  ! ]P@                  R8g  R4      ]P:                  ! ]R4       ! R R]PB                  ]4      4       4       t"]P:                  ! ]RJ R4      ]P:                  ! ]P@                  R8g  R4      ]P:                  ! ]R4       ! R R]PB                  4      4       4       4       t#]$R8X  d   ]PJ                  ! 4        R# R#   ]]3 d    Rt ELi ; i)    N)Path)
is_androidis_apple_mobile	is_wasm32z..Toolsbuildzgenerate-build-details.pygenerate_build_detailsc                   p   a  ] tR t^!t o ]R 4       t]R 4       tR tR tR t	R t
R tR tR	 tR
 tRtV tR# )FormatTestsBasec                    \         h)zAInstall details file contents. Should be overriden by subclasses.)NotImplementedErrorselfs   &./usr/lib/python3.14/test/test_build_details.pycontentsFormatTestsBase.contents"   s
     "!    c                B    \         P                  ! V P                  4      # )z5Parsed install details file data, as a Python object.)jsonloadsr   r   s   &r   dataFormatTestsBase.data'   s     zz$--((r   c                ^    V P                   pVP                  R4       F  pW#,          pK  	  V# )zHelper to fetch subsection entries.

It takes the entry name, allowing the usage of a dot to separate the
different subsection names (eg. specifying 'a.b.c' as the key will
return the value of self.data['a']['b']['c']).
.)r   split)r   namevalueparts   &&  r   keyFormatTestsBase.key,   s+     		JJsODKE $r   c                p   V P                  V P                  \        4       V P                  P                  4        Fc  w  rV P	                  VR 7      ;_uu_ 4        VR9   d   V P                  V\
        4       MVR9   d   V P                  V\        4       RRR4       Ke  	  R#   + '       g   i     Kz  ; i))r   N)schema_versionbase_prefixbase_interpreterplatform)languageimplementationabisuffixes	libpythonc_apiarbitrary_data)assertIsInstancer   dictitemssubTeststr)r   r   r   s   &  r   test_top_level_container(FormatTestsBase.test_top_level_container8   s    dii.))//+JC#&& ' '))%5 E E))%6 '& ,&&&s   <B$$B5c                P    V P                  V P                  R 4      \        4       R# )r#   N)r-   r   r1   r   s   &r   test_base_prefix FormatTestsBase.test_base_prefixC   s    dhh}5s;r   c                    V P                  \        4      ;_uu_ 4        V P                  R4       RRR4       R#   + '       g   i     R# ; i)zTest the base_interpreter entry.

The generic test wants the key to be missing. If your implementation
provides a value for it, you should override this test.
r$   N)assertRaisesKeyErrorr   r   s   &r   test_base_interpreter%FormatTestsBase.test_base_interpreterF   s1     x((HH'( )(((s	   :A	c                n    V P                  V P                  R 4      \        P                  ! 4       4       R# )r%   N)assertEqualr   	sysconfigget_platformr   s   &r   test_platformFormatTestsBase.test_platformO   s$    *-y/E/E/GHr   c                $   \         P                  \         P                  ,           R ,           pV P                  R4      pV P	                  \        V4      \        V4      4       V P                  \        P                  P                  V4      4       R# )r   zlanguage.versionN)
stringdigitsascii_lettersr   assertLessEqualset
assertTruesysversion
startswith)r   allowed_charactersr   s   &  r   test_language_version%FormatTestsBase.test_language_versionR   s`    #]]V-A-AACG+,SZ-?)@A..u56r   c                   V P                  R 4      pV P                  \        V4      \        P                  P
                  4       VP                  4        FS  w  r#V P                  VR7      ;_uu_ 4        \        \        P                  V4      pV P                  W44       RRR4       KU  	  R#   + '       g   i     Kj  ; i)zlanguage.version_infor   N)	r   r=   lenrI   version_infon_fieldsr/   r0   getattr)r   r   	part_name
part_valuesys_version_values   &    r   test_language_version_info*FormatTestsBase.test_language_version_infoY   s    01US%5%5%>%>?%*[[]!I9--$+C,<,<i$H!  ? .- &3---s   4,B..B?c           
        \         P                  P                  pV P                  R 4      P	                  4        EF  w  r#V P                  VR7      ;_uu_ 4        VR8X  d   V P                  \        V4      \        V4      4       VP	                  4        F|  w  rEV P                  \        \         P                  P                  \        4      4       \        \         P                  P                  V4       \        W4      pV P                  We4       K~  	  M*V P                  \        \         P                  V4      V4       RRR4       EK  	  R#   + '       g   i     EK(  ; i)r'   rP   rJ   N)rI   r'   rJ   r   r/   r0   r=   rQ   assertFalse
isinstancer.   rT   )r   impl_verr   r   rU   rV   sys_implementation_values   &      r   test_implementation#FormatTestsBase.test_implementationb   s    %%--((#34::<JC3'')#$$SZX?16-	((C4F4F4N4NPT)UV 2 2 : :IF3:83O0(()AN	 2? $$WS-?-?%EuM (' ='''s   C'EE" N)__name__
__module____qualname____firstlineno__propertyr   r   r   r2   r5   r:   r@   rM   rX   r_   __static_attributes____classdictcell____classdict__s   @r   r   r   !   s\     " " ) )
	7<)I7@N Nr   r   z-This test can only run in an installed Pythonposixz+Feature only implemented on POSIX right nowz+Feature not available on WebAssembly buildsc                      a  ] tR t^wt o Rt]R 4       t]R 4       t]R 4       t	]]
P                  ! ];'       g    ]R4      R 4       4       t]]
P                  ! ];'       g    ]R4      R 4       4       tR	tV tR
# )CPythonBuildDetailsTestsz3Test CPython's install details file implementation.c                   \         P                  ! 4       '       d   \         P                  ! R 4      p\        P                  P                  VR4      p\        VRR7      ;_uu_ 4       p\        P                  P                  WP                  4       4      pRRR4       M\         P                  ! R4      p\        P                  P                  XR4      #   + '       g   i     L0; i)projectbasezpybuilddir.txtutf-8encodingNstdlibzbuild-details.json)	r>   is_python_buildget_config_varospathjoinopenreadget_path)r   
projectdir
pybuilddirfdirnames   &    r   location!CPythonBuildDetailsTests.location|   s    $$&&"11-@Jj2BCJj733q'',,z668< 43  ((2Gww||G%9::	 43s   '.CC$	c                    \        V P                  R RR7      ;_uu_ 4       pVP                  4       uuRRR4       #   + '       g   i     R# ; i)rrp   rq   N)ry   r   rz   )r   r~   s   & r   r   !CPythonBuildDetailsTests.contents   s/    $--w771668 8777s	   <A	c                v    V P                  \        P                  P                  V P                  4      4       R # )N)rH   rv   rw   isfiler   r   s   &r   test_location&CPythonBuildDetailsTests.test_location   s    t}}56r   zQAndroid and iOS run tests via a custom testbed method that changes sys.executablec                4   V P                  R 4      p\        P                  ! 4       '       d   V P                  R4       V P	                  \
        P                  P                  V4      \
        P                  P                  \        P                  4      4       R# )r$   Installation is relocatedN)
r   r>   _installation_is_relocatedskipTestr=   rv   rw   realpathrI   
executable)r   r   s   & r   r:   .CPythonBuildDetailsTests.test_base_interpreter   sc     +, //11MM56))%0"''2B2B3>>2RSr   zOAndroid and iOS run tests via a custom testbed method that doesn't ship headersc           
         V P                  R 4      p\        P                  ! 4       '       d   V P                  R4       V P	                  \
        P                  P                  \
        P                  P                  VR,          R4      4      4       \        P                  ! R4      pV P	                  \
        P                  P                  \
        P                  P                  VR,          RV R24      4      4       R# )	r+   r   headerszPython.hVERSIONpkgconfig_pathzpython-z.pcN)
r   r>   r   r   rH   rv   rw   existsrx   ru   )r   r   rJ   s   &  r   
test_c_api#CPythonBuildDetailsTests.test_c_api   s     ! //11MM56rww||E)4Dj'QRS**95rww||E:J4KwW^V__bMc'defr   ra   N)rb   rc   rd   re   __doc__rf   r   r   needs_installed_pythonr   unittestskipIfr   r   r:   r   rg   rh   ri   s   @r   rm   rm   w   s      >; ;   7 7
 __%%o[T	 
T __%%oY	g	 
	gr   rm   z'Failed to import generate-build-detailsc                   F   a  ] tR t^t o ]R 4       t]R 4       tR tRtV t	R# )BuildDetailsRelativePathsTestsc                    \         P                  R R7      p\        P                  ! \        P                  ! V4      4      # )z1.0)r"   )r	   generate_datar   r   dumpsr   r   s   & r   build_details_absolute_paths;BuildDetailsRelativePathsTests.build_details_absolute_paths   s-    %3353Izz$**T*++r   c                L    V P                   p\        P                  VR R7       V# )N)config_path)r   r	   make_paths_relativer   s   & r   build_details_relative_paths;BuildDetailsRelativePathsTests.build_details_relative_paths   s%    00224T2Jr   c                &   V P                   pV P                  pV P                  VR ,          VR ,          4       VR ,          pRpV F~  pV P                  WQ9   WR9   4       WQ9  d   K!  \        P                  P                  W2V,          4      p\        P                  P                  V4      pV P                  W,          V4       K  	  RpV F  w  rV P                  W9   W9   4       W9  d   K#  V P                  WQV,          9   WRV,          9   4       WQV,          9  d   KV  \        P                  P                  W2V,          V,          4      p\        P                  P                  V4      pV P                  W,          V,          V4       K  	  R# )r#   N)r$   ))r*   dynamic)r*   dynamic_stableabi)r*   static)r+   r   )r+   r   )r   r   r=   rv   rw   rx   normpath)	r   data_abs_pathdata_rel_pathr#   top_level_keysr   abs_rel_pathsecond_level_keysr   s	   &        r   test_round_trip.BuildDetailsRelativePathsTests.test_round_trip   s[   9999}5&}5	7 $M2.!CS133GH'77<<35GHL77++L9L]/> "
 +IDT2D4IJ(S$$77 $$779--77<<45H5MNL77++L9L]05|D +r   ra   N)
rb   rc   rd   re   rf   r   r   r   rg   rh   ri   s   @r   r   r      s9      , ,  
&E &Er   r   __main__)&	importlibr   rv   os.pathrI   r>   rC   r   pathlibr   test.supportr   r   r   __file__resolve	BASE_PATHMODULE_PATHutilspec_from_file_locationspecmodule_from_specr	   modulesloaderexec_moduleFileNotFoundErrorImportErrorr   r   rt   r   r   TestCaserm   r   rb   mainra   r   r   <module>r      s     	  
     ? ?	
 
') 
 '!G+.II	">>11 +D '^^<<TB,BCKK()KK23
MN MN` "3  
G#%RS	IJ5gx00/ 5g K T5gp 
d"- 
G#%RS	IJ2EX%6%6 2E K T	2Ej zMMO _ 	;' "!"s   "A!G   GG