⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.164
Server IP:
97.74.87.16
Server:
Linux 16.87.74.97.host.secureserver.net 5.14.0-503.38.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 18 08:52:10 EDT 2025 x86_64
Server Software:
Apache
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
lib64
/
python3.9
/
__pycache__
/
View File Name :
_osx_support.cpython-39.pyc
a �����DOg U����������������������@���s����d�Z�ddlZddlZddlZg�d�ZdZdZdZd.dd�Zd/d d�Z dd ��Z dadd��Zda dd��Zdd��Zdd��Zdadd��Zdd��Zdd��Zdd��Zdd��Zd d!��Zd"d#��Zd$d%��Zd&d'��Zd(d)��Zd*d+��Zd,d-��ZdS�)0zShared OS X support functions.�����N)�compiler_fixup�customize_config_vars�customize_compiler�get_platform_osx) �CFLAGSZLDFLAGSZCPPFLAGSZ BASECFLAGS� BLDSHARED�LDSHARED�CC�CXXZ PY_CFLAGSZ PY_LDFLAGSZPY_CPPFLAGSZPY_CORE_CFLAGSZPY_CORE_LDFLAGS)r���r���r ���r ���Z_OSX_SUPPORT_INITIAL_c�����������������C���s����|du�rt�jd�}|�t�j�}t�j�|��\}}tjdkrH|dkrH|�d�}�t�j�|��s�|D�]&}t�j� ||��}t�j�|�rX|��S�qXdS�|�S�dS�)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�f��r����$/usr/lib64/python3.9/_osx_support.py�_find_executable���s���� r���Fc�����������������C���s����ddl�}zddl}|���}W�n&�tyB���tdt���f�d�}Y�n0�|�|��R}|rdd|�|jf�}nd|�|jf�}t� |�s�|� ���d����ndW��d����S�1�s�0����Y��dS�)z0Output from successful command execution or Noner���Nz/tmp/_osx_support.%szw+bz %s >'%s' 2>&1z%s 2>/dev/null >'%s'zutf-8) � contextlib�tempfile�NamedTemporaryFile�ImportError�openr ����getpid�closing�name�system�read�decode�strip)Z commandstringZcapture_stderrr ���r!����fp�cmdr���r���r����_read_output7���s������ r.���c�����������������C���s���t�|��ptd|�f��pdS�)z0Find a build tool on current path or using xcrunz/usr/bin/xcrun -find %s��)r���r.���)Ztoolnamer���r���r����_find_build_toolM���s ������r0���c������������������C���s~���t�du�rzda�ztd�}�W�n�ty*���Y�nP0�zt�d|�����}W�|�����n |�����0�|durzd�|�d�� d�dd���a�t�S�)z*Return the OS X system version as a stringNr/���z0/System/Library/CoreServices/SystemVersion.plistz=<key>ProductUserVisibleVersion</key>\s*<string>(.*?)</string>�.��������) �_SYSTEM_VERSIONr$����OSError�re�searchr)����closer����groupr���)r����mr���r���r����_get_system_versionV���s���� �r;���c������������������C���sJ���t�du�rFt��}�|�rFztdd��|��d�D���a�W�n�tyD���da�Y�n0�t�S�)z} Return the macOS system version as a tuple The return value is safe to use to compare two version numbers. Nc�����������������s���s���|�]}t�|�V��qd�S��N��int��.0�ir���r���r���� <genexpr>���������z,_get_system_version_tuple.<locals>.<genexpr>r1���r���)�_SYSTEM_VERSION_TUPLEr;����tupler���� ValueError�Zosx_versionr���r���r����_get_system_version_tupleu���s���� rH���c�����������������C���s"���t�|��D�]}|�t�r|�|=�qdS�)z-Remove original unmodified values for testingN)�list� startswith�_INITPRE)�_config_vars�kr���r���r����_remove_original_values����s���� rN���c�����������������C���s8���|���|d�}||kr,t|�|�vr,||�t|�<�||�|<�dS�)z@Save modified and original unmodified value of configuration varr/���N)�getrK���)rL����cvZnewvalueZoldvaluer���r���r����_save_modified_value����s����rQ���c�����������������C���s����t�durt�S�td|�f�d�}d}|���D�]T}|�d�r<d}q(|�d�rLd}q(|r(|���}|dkrfda�q(|�d �r(|dd ��a�q(t�du�r�da�t�S�)z= Returns the root of the default SDK for this system, or '/' Nz%s -c -E -v - </dev/nullTFz#include <...>zEnd of search listz/usr/include�/z.sdk/usr/includei�)�_cache_default_sysrootr.���� splitlinesrJ���r+����endswith)�cc�contentsZ in_incdirs�liner���r���r����_default_sysroot����s$���� rY���c������������������C���s���t���}�|�rt|�dk�S�dS�)z=Returns True if universal builds are supported on this system�� �������F)rH����boolrG���r���r���r����_supports_universal_builds����s����r^���c������������������C���s���t���}�|�r|�dkS�dS�)z9Returns True if arm64 builds are supported on this system)����r���F)rH���rG���r���r���r����_supports_arm64_builds����s����r`���c�����������������C���s����dt�jv�r|�S�|�d����d��}}t|�s4td�}n<t�j�|��d�rptd|� dd�f��}|rpd|v�rptd�}|s|t d ��||kr�tD�]L}||�v�r�|t�jvr�|�|����}|d kr�|n|d�|d<�t|�|d� |���q�|�S�) z7Find appropriate C compiler for extension module buildsr ���r���ZclangZgccz'%s' --version�'�'"'"'zllvm-gcczCannot locate working compilerr ���z++� )r ���r���r���r���r0���r����basenamerJ���r.����replace�SystemError�_COMPILER_CONFIG_VARSrQ���r���)rL���rV���Zoldcc�datarP���Zcv_splitr���r���r����_find_appropriate_compiler����s,���� ��ri���c�����������������C���sV���t�D�]L}||�v�r|tjvr|�|�}tjdd|tjd�}t�dd|�}t|�||��q|�S�)z5Remove all universal build arguments from config vars� -arch\s+\w+\src���)�flagsz-isysroot\s*\S+)�_UNIVERSAL_CONFIG_VARSr ���r���r6����sub�ASCIIrQ���)rL���rP���rk���r���r���r����_remove_universal_flags��s����ro���c�����������������C���s����dt�jv�r|�S�t�d|�d��dur�t��d|�d��dd�f��}|r�tD�]8}||�v�rF|t�jvrF|�|�}t�dd |�}t|�||��qF|�S�) z-Remove any unsupported archs from config varsr ���z-arch\s+ppcr���NzNecho 'int main{};' | '%s' -c -arch ppc -x c -o /dev/null /dev/null 2>/dev/nullra���rb���z-arch\s+ppc\w*\src���) r ���r���r6���r7���r(���re���rl���rm���rQ���)rL����statusrP���rk���r���r���r����_remove_unsupported_archs��s���� �� rq���c�����������������C���sd���dt�jv�r`t�jd�}tD�]F}||�v�rd|�|�v�r|�|�}t�dd|�}|d�|�}t|�||��q|�S�)z2Allow override of all archs with ARCHFLAGS env var� ARCHFLAGS�-archrj���rc���)r ���r���rl���r6���rm���rQ���)rL���ZarchrP���rk���r���r���r����_override_all_archs:��s���� rt���c�����������������C���sx���|���dd�}t�d|�}|durt|�d�}tj�|�sttD�]8}||�v�r:|tjvr:|�|�}t� dd|�}t |�||��q:|�S�)z+Remove references to any SDKs not availabler���r/���z-isysroot\s*(\S+)Nr2���z-isysroot\s*\S+(?:\s|$)rc���)rO���r6���r7���r9���r ���r����existsrl���r���rm���rQ���)rL����cflagsr:���ZsdkrP���rk���r���r���r����_check_for_unavailable_sdkK��s���� rw���c����������� ������C���s���d�}}t�|��}�t��s d�}}nd|v�}tdd��|D���}|sHdtjv�r�z|��d�}|�||d��=�W�qH�tyz���Y�q�Y�qH0�qHnFt��s�tt t |����D�].}|�|�dkr�|�|d��d kr�|�||d��=�q�dtjv�r�|s�|�tjd�����}�|�r>d d��t|��D��}|�s�q>|d�}|�|�d k�r.|�||d��=�q�|�||d��=�q�d}|}dd��t|�D��}|�st|�}dd��t|��D��}|D�]B}||�d k�r�||d��}��q�n||�t d �d��}��q��qx|�r�tj �|��s�ddlm} �| �d|��| �d��|�S�)ae�� 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. FTrs���c�����������������s���s���|�]}|��d��r|V��qdS�)� -isysrootN�rJ���)r@����argr���r���r���rB���y��rC���z!compiler_fixup.<locals>.<genexpr>rr���r3���r2����arm64c�����������������S���s���g�|�]\}}|��d��r|�qS��rx���ry����r@���rA����xr���r���r���� <listcomp>���rC���z"compiler_fixup.<locals>.<listcomp>r���rx���Nc�����������������S���s���g�|�]\}}|��d��r|�qS�r|���ry���r}���r���r���r���r������rC���c�����������������S���s���g�|�]\}}|��d��r|�qS�r|���ry���r}���r���r���r���r������rC���)�logz4Compiling with an SDK that doesn't seem to exist: %sz$Please check your Xcode installation)rI���r^����anyr ���r����indexrF���r`����reversed�range�lenr���� enumerater����isdirZ distutilsr�����warn) Zcompiler_soZcc_argsZ stripArchZstripSysrootr�����idx�indicesZsysrootZargvarr����r���r���r���r���f��sZ���� � r���c�����������������C���s"���t���st|���t|���t|���|�S�)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^���ro���rt���rw����rL���r���r���r���r������s ����r���c�����������������C���s���t�|���t|���t|���|�S�)z�Customize compiler path and configuration variables. This customization is performed when the first extension module build is requested in distutils.sysconfig.customize_compiler. )ri���rq���rt���r����r���r���r���r������s���� r���c�����������������C���s���|���dd�}t��p|}|p|}|�r�|}d}|���td�|���dd��}|r�z$tdd��|�d�dd ��D���}W�q��ty����d }Y�q�0�nd }|dk�rDd|���v��rDd }t�d|�}tt t |���}t|�dkr�|d�}nj|dkr�d}n\|dkr�d }nN|dk�rd}n>|dk�rd}n.|dk�r$d}n|dk�r4d}ntd|f���n<|dk�r`tj dk�r�d}n |dv��r�tj dk�r|d }nd!}|||fS�)"z Filter values for get_platform()ZMACOSX_DEPLOYMENT_TARGETr/���Zmacosxr���c�����������������s���s���|�]}t�|�V��qd�S�r<���r=���r?���r���r���r���rB�����rC���z#get_platform_osx.<locals>.<genexpr>r1���r���r3���)r[���r���rZ���rs���Zfatz -arch\s+(\S+)r2���)r{����x86_64Z universal2)�i386�ppc)r����r����Zintel)r����r����r����Zfat3)�ppc64r����Zfat64)r����r����r����r����� universalz%Don't know machine value for archs=%rr����l��������r����)ZPowerPCZPower_Macintoshr����r����)rO���r;���rK���rE���r���rF���r+���r6����findall�sorted�setr����r����maxsize)rL���Zosname�release�machineZmacverZ macreleaserv���Zarchsr���r���r���r������sX���� �$ � r���)N)F)�__doc__r ���r6���r����__all__rl���rg���rK���r���r.���r0���r4���r;���rD���rH���rN���rQ���rS���rY���r^���r`���ri���ro���rq���rt���rw���r���r���r���r���r���r���r���r����<module>���s:��� >(Q)