Your IP : 52.15.200.26


Current Path : /opt/alt/python313/lib64/python3.13/__pycache__/
Upload File :
Current File : //opt/alt/python313/lib64/python3.13/__pycache__/_osx_support.cpython-313.pyc

�

1}gV���SrSSKrSSKrSSKr/SQrSrSrSrSSjrSSjr	S	r
SqS
rSq
SrSrS
rSqSrSrSrSrSrSrSrSrSrSrSrSrg)zShared OS X support functions.�N)�compiler_fixup�customize_config_vars�customize_compiler�get_platform_osx)
�CFLAGS�LDFLAGS�CPPFLAGS�
BASECFLAGS�	BLDSHARED�LDSHARED�CC�CXX�	PY_CFLAGS�
PY_LDFLAGS�PY_CPPFLAGS�PY_CORE_CFLAGS�PY_CORE_LDFLAGS)rrr
r�_OSX_SUPPORT_INITIAL_c���Uc[RSnUR[R5n[RRU5up4[RS:XaUS:waUS-n[RRU5(dQUHJn[RRXP5n[RRU5(dMHUs $ gU$)z�Tries to find 'executable' in the directories listed in 'path'.

A string listing directories separated by 'os.pathsep'; defaults to
os.environ['PATH'].  Returns the complete filename or None if not found.
N�PATH�win32z.exe)
�os�environ�split�pathsep�path�splitext�sys�platform�isfile�join)�
executabler�paths�base�ext�p�fs       �3/opt/alt/python313/lib64/python3.13/_osx_support.py�_find_executabler)s����|��z�z�&�!���J�J�r�z�z�"�E���� � ��,�I�D������c�V�m��&�(�
�
�7�7�>�>�*�%�%��A������Q�+�A��w�w�~�~�a� � ���	�
���c���SSKnSSKnUR5nURU5nU(aU<SUR<S3nOU<SUR<S3n[
R"U5(d-UR5RS	5R5OSsSSS5 $![a& [	S[
R"5<3S5nN�f=f!,(df   g=f)
z0Output from successful command execution or NonerNz/tmp/_osx_support.zw+bz >'z' 2>&1z 2>/dev/null >'�'�utf-8)
�
contextlib�tempfile�NamedTemporaryFile�ImportError�openr�getpid�closing�name�system�read�decode�strip)�
commandstring�capture_stderrr.r/�fp�cmds      r(�_read_outputr>7s����"��
�
(�
(�
*��

�	�	�B�	�2��%2�B�G�G�<�C�,9�2�7�7�C�C�8:�	�	�#���r�w�w�y����(�.�.�0�D�
 �	��	�"�
��I�I�K�� �"��"��
 �	�s�B/�A:C"�/-C�C�"
C0c�V�[U5=(d [SU<35=(d S$)z0Find a build tool on current path or using xcrunz/usr/bin/xcrun -find �)r)r>)�toolnames r(�_find_build_toolrBMs'���X�&�
��X� G�H�
��r*c�l�[c~Sq[SSS9n[R"SUR	55nUR5 Ub2SR
URS5RS5SS	5q[$[$!UR5 f=f![a [$f=f)
z*Return the OS X system version as a stringNr@z0/System/Library/CoreServices/SystemVersion.plistr-)�encodingz=<key>ProductUserVisibleVersion</key>\s*<string>(.*?)</string>�.��)
�_SYSTEM_VERSIONr2�re�searchr7�closer!�groupr�OSError)r'�ms  r(�_get_system_versionrOVs�������
	F��G�RY�Z�A�
��I�I�8�9:����C�����	��}�"%�(�(�1�7�7�1�:�+;�+;�C�+@��!�+D�"E����?������	���	�
���	�s�
B!�%B�B�!
B3�2B3c��[c9[5nU(a([SURS555q[$[$![a
 Sq[$f=f)zm
Return the macOS system version as a tuple

The return value is safe to use to compare
two version numbers.
c3�8# �UHn[U5v� M g7f�N��int��.0�is  r(�	<genexpr>�,_get_system_version_tuple.<locals>.<genexpr>�s���-U�>T��c�!�f�f�>T���rE�)�_SYSTEM_VERSION_TUPLErO�tupler�
ValueError��osx_versions r(�_get_system_version_tuplerausb���$�)�+���
+�(-�-U�k�>O�>O�PS�>T�-U�(U�%�!� � � ���
+�(*�%� � �
+�s�!A�A�Ac�d�[U5H!nUR[5(dMX	M# g)z-Remove original unmodified values for testingN)�list�
startswith�_INITPRE)�_config_vars�ks  r(�_remove_original_valuesrh�s'���,�
���<�<��!�!��� r*c�j�URUS5nX2:wa[U-U;aX0[U-'X U'g)z@Save modified and original unmodified value of configuration varr@N)�getre)rf�cv�newvalue�oldvalues    r(�_save_modified_valuern�s;������B�'�H���8�b�=��#D�&.�X��]�#���r*c�t�[b[$[U<S3S5nSnUR5HwnURS5(aSnMURS5(aSnM7U(dM@UR	5nUS:XaSqMZURS	5(dMrUSS
qMy [cSq[$)z<Returns the root of the default SDK for this system, or '/' Nz -c -E -v - </dev/nullTFz#include <...>zEnd of search listz/usr/include�/z.sdk/usr/includei�)�_cache_default_sysrootr>�
splitlinesrdr9�endswith)�cc�contents�
in_incdirs�lines    r(�_default_sysrootrx�s����)�%�%��"�>��E�H��J��#�#�%���?�?�+�,�,��J�
�_�_�1�
2�
2��J�
�Z��:�:�<�D��~�%�),�&����1�2�2�)-�d�s��&�&��%�!$��!�!r*c�D�[5nU(a[US:�5$S$)z=Returns True if universal builds are supported on this system��
�F)ra�boolr_s r(�_supports_universal_buildsr~�s#��,�-�K�+6�4��w�&�'�A�E�Ar*c�2�[5nU(aUS:�$S$)z9Returns True if arm64 builds are supported on this system)�rF)rar_s r(�_supports_arm64_buildsr��s��,�-�K�%0�;�'�!�;�e�;r*c�j�S[R;aU$USR5S=p[U5(d[	S5nOk[R
R
U5RS5(a8[SURSS5<S35nU(aSU;a[	S5nU(d[S	5eX:wag[H]nX@;dM
U[R;dM XR5nUS
:waUOUS-US'[XSRU55 M_ U$)
z7Find appropriate C compiler for extension module buildsr
r�clang�gccr,�'"'"'z' --versionzllvm-gcczCannot locate working compilerrz++� )rrrr)rBr�basenamerdr>�replace�SystemError�_COMPILER_CONFIG_VARSrnr!)rfrt�oldcc�datark�cv_splits      r(�_find_appropriate_compilerr��s��"�r�z�z�����d�#�)�)�+�A�.�.�B��B����g�
&��	���	�	�"�	�	(�	(��	/�	/�� "�
�
�3�	� :�=�>���J�$�&�!�'�*�B�
��/�1�	1�
�{�(�B��!�b��
�
�&:�'�+�1�1�3��$&�%�K�b�R�$�Y����$�\�s�x�x��7I�J�	(��r*c���[HmnX;dM
U[R;dM Xn[R"SSU[R
S9n[R"SSU5n[
XU5 Mo U$)z5Remove all universal build arguments from config vars�
-arch\s+\w+\sr�)�flagsz-isysroot\s*\S+)�_UNIVERSAL_CONFIG_VARSrrrI�sub�ASCIIrn)rfrkr�s   r(�_remove_universal_flagsr�se��%��
��"�B�J�J�"6� �$�E��F�F�+�S�%�r�x�x�H�E��F�F�-�s�E�:�E� ��5�9�
%��r*c�v�S[R;aU$[R"SUS5b�[R"SUSRSS5<S35nU(aR[HHnX ;dM
U[R;dM Xn[R"SS	U5n[XU5 MJ U$)
z-Remove any unsupported archs from config varsr
z-arch\s+ppcrzecho 'int main{};' | 'r,r�z6' -c -arch ppc -x c -o /dev/null /dev/null 2>/dev/nullz-arch\s+ppc\w*\sr�)	rrrIrJr6r�r�r�rn)rf�statusrkr�s    r(�_remove_unsupported_archsr�s����r�z�z����	�y�y���h�!7�8�D�����4� �(�(��i�8�
;�<���-���%�"�B�J�J�*>�(�,�E��F�F�#6��U�C�E�(��5�A�	-��r*c���S[R;aa[RSn[HDnX ;dM
SX;dMXn[R"SSU5nUS-U-n[XU5 MF U$)z2Allow override of all archs with ARCHFLAGS env var�	ARCHFLAGS�-archr�r�)rrr�rIr�rn)rf�archrkr�s    r(�_override_all_archsr�:ss��
�b�j�j� ��z�z�+�&��(�B��!�g��1A�&A�$�(�����/��e�<�����d�*��$�\�u�=�)��r*c�l�URSS5n[R"SU5nUb�URS5n[R
R
U5(dR[HHnX@;dM
U[R;dM Xn[R"SSU5n[XU5 MJ U$)z+Remove references to any SDKs not availablerr@z-isysroot\s*(\S+)rFz-isysroot\s*\S+(?:\s|$)r�)rjrIrJrLrr�existsr�rr�rn)rf�cflagsrN�sdkrkr�s      r(�_check_for_unavailable_sdkr�Ks����
�
�h��
+�F�
�	�	�&��/�A��}��g�g�a�j���w�w�~�~�c�"�"�,���%�"�B�J�J�*>�(�,�E��F�F�#=�s�E�J�E�(��5�A�-��r*c�v�S=p#[U5n[5(dS=p#OSU;n[SU55nU(dS[R;aURS5nXUS-2	M[5(dB[[[U555H!nXS:XdM
XS-S:XdMXUS-2	M# S[R;a+U(d$U[RSR5-nU(a^[U5VVs/sHupgURS	5(dMUPM! nnnU(dOUS
nXS	:XaXUS-2	OXUS-2	M]Sn	Un
[U5VVs/sHupgURS	5(dMUPM! nnnU(d9Un
[U5VVs/sHupgURS	5(dMUPM! nnnUH$nX�S	:Xa	X�S-n	 OX�[S	5Sn	 O U	(a�[RRU	5(d`[ R"R%SU	S
35 [ R"R%S5 [ R"R'5 U$![a GM�f=fs snnfs snnfs snnf)aM
This function will strip '-isysroot PATH' and '-arch ARCH' from the
compile flags if the user has specified one them in extra_compile_flags.

This is needed because '-arch ARCH' adds another architecture to the
build, without a way to remove an architecture. Furthermore GCC will
barf if multiple '-isysroot' arguments are present.
FTr�c3�T# �UHoRS5(dMUv� M  g7f)�	-isysrootN)rd)rV�args  r(rX�!compiler_fixup.<locals>.<genexpr>ys���Q�'�3�^�^�K�5P�3�3�'�s�(�	(r�rGrF�arm64r�rNz2Compiling with an SDK that doesn't seem to exist: �
z%Please check your Xcode installation
)rcr~�anyrr�indexr^r��reversed�range�lenr�	enumeraterdr�isdirr�stderr�write�flush)�compiler_so�cc_args�	stripArch�stripSysrootr��idxrW�x�indices�sysroot�argvars           r(rrfs��� %�$�I��{�#�K�%�'�'�$(�'�	�L��w�&�	��Q�'�Q�Q���K�2�:�:�-��
�#�)�)�'�2���e�A�g�
�.�	�$�
%�
%��E�#�k�"2�3�4�C���7�*�{�q�5�/A�W�/L��C��E�	�*�5��b�j�j� ��"�B�J�J�{�$;�$A�$A�$C�C����$-�k�$:�X�$:�S�Q�a�l�l�;�>W�q�$:�G�X����A�J�E��!�[�0��e�A�g�
�.� �e�A�g�
�.���G�
�F�%�g�.�L�.�S�Q�!�,�,�{�2K�q�.�G�L���� )�+� 6�T� 6���!�,�,�{�:S�1� 6��T����;�+�%���U�m�G���k�#�k�"2�"3�4�G��
��r�w�w�}�}�W�-�-��
�
���M�g�Y�VX�Y�Z��
�
���A�B��
�
�������e�
��
�� Y�� M��Us6�J�J)�6J)�7J/�J/�7J5�J5�
J&�%J&c�f�[5(d[U5 [U5 [U5 U$)a�Customize Python build configuration variables.

Called internally from sysconfig with a mutable mapping
containing name/value pairs parsed from the configured
makefile used to build this interpreter.  Returns
the mapping updated as needed to reflect the environment
in which the interpreter is running; in the case of
a Python from a binary installer, the installed
environment may be very different from the build
environment, i.e. different OS levels, different
built tools, different available CPU architectures.

This customization is performed whenever
distutils.sysconfig.get_config_vars() is first
called.  It may be used in environments where no
compilers are present, i.e. when installing pure
Python dists.  Customization of compiler paths
and detection of unavailable archs is deferred
until the first extension module build is
requested (in distutils.sysconfig.customize_compiler).

Currently called from distutils.sysconfig
)r~r�r�r��rfs r(rr�s1��2&�'�'�
	 ��-���%��|�,��r*c�H�[U5 [U5 [U5 U$)z�Customize compiler path and configuration variables.

This customization is performed when the first
extension module build is requested
in distutils.sysconfig.customize_compiler.
)r�r�r�r�s r(rr�s&���|�,��l�+���%��r*c�F�URSS5nU(aSU;aUS-
n[5=(d UnU=(d UnU(GaBUnSnUR[S-URSS55nU(a&[SUR	S5SS	55nOS
nUS:�a�SUR
5;a�S
n[R"SU5n[[[U555n[U5S:XaUSnO�US:XaSnOxUS:XaS
nOoUS:XaSnOfUS:XaSnO]US:XaSnOTUS:XaSnOK[SU<35eUS:Xa[RS:�aSnOUS;a[RS:�aS nOS!nXU4$![
a S
nN�f=f)"z Filter values for get_platform()�MACOSX_DEPLOYMENT_TARGETr@rEz.0�macosxrc3�8# �UHn[U5v� M g7frRrSrUs  r(rX�#get_platform_osx.<locals>.<genexpr>s���"N�3M�a�3�q�6�6�3M�rZrrG)r{�rzr��fatz
-arch\s+(\S+)rF)r��x86_64�
universal2)�i386�ppc)r�r��intel)r�r�r��fat3)�ppc64r��fat64)r�r�r�r��	universalz#Don't know machine value for archs=r�lr�)�PowerPC�Power_Macintoshr�r�)rjrOrer]rr^r9rI�findall�sorted�setr�r�maxsize)rf�osname�release�machine�macver�
macreleaser��archss        r(rr�s����
�
�8�"�
=�F�
�#�V�#�	�$���$�&�0�&�J�
�
!�z�F�
������!�!�(�8�"3�$0�$4�$4�X�r�$B�D���
%�"�"N�:�3C�3C�C�3H��1�3M�"N�N�
�
!�J��'�!�w�&�,�,�.�'@��G��J�J�/��8�E��&��U��,�-�E��5�z�Q����(���-�-�&���/�)����,�,�!���3�3� ���-�-�!���<�<�%�� �>C�E�G�G���
��{�{�e�#�"���
�6�
6��{�{�e�#�!�����W�%�%��a�
%�$�
�
%�s�$F�F �F rR)F)�__doc__rrIr�__all__r�r�rer)r>rBrHrOr\rarhrnrqrxr~r�r�r�r�r�r�rrrrr[r*r(�<module>r�s���$�	�	�
���A��?��#���4Q�,����<��!�& � ���"�2B�<�;�|�%�P�"�6M�`&�R�(P&r*

?>