bindepend.pyc
1 o 2 �G�c� � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddl Z ddl 3 mZ ddl 4 mZ ddlmZmZ ddlmZ e �e�Ze� ZejrYddlmZ ddlZddlmZmZ d7d d 5 �Zdd� Zd d� Z e�!dd�Z"dd� Z#da$dd� Z%dd� Z&dd� Z'd8dd�Z(dd� Z)d7dd�Z*dd � Z+d9d!d"�Z,d7d#d$�Z-d%d&� Z.d'd(� Z/d)d*� Z0d+d,� Z1d-d.� Z2d/d0� Z3d1d2� Z4d3d4� Z5d5d6� Z6dS ):z1 6 Find external dependencies of binary libraries. 7 � N)�compat)�log)�dylib�utils)�winutils)�get_python_lib)�winmanifest�winresourcec C s� g }t jrtj�t� d�g}t jr|�tj�t jddd�� t j| t 8 �� t �dd�� tj� }|durEt|t�rA|�d|� n|| }|D ]}tj�|| �}tj�|�r^t|�r^| S qGdS )z� 9 Return the full path name of MOD. 10 11 * MOD is the basename of a dll or pyd. 12 * XTRAPATH is a path or list of paths to search first. 13 14 Return the full path name of MOD. Will search the full Windows search path, as well as sys.path 15 �pywin32_system32�Libz site-packages�PATH� Nr )r �is_win�os�path�joinr �is_venv�append�base_prefix�sysr �get_system_path�getenv�split�pathsep� 16 isinstance�str�insert�exists�matchDLLArch)�mod�xtrapathZ pywin32_pathsZepath�p�npth� r# ��C:\Users\Jacks.GUTTSPC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\PyInstaller\depend\bindepend.py� getfullnameof+ s. ���� 17 �r% c C s� t � }tj| dd�}|jtjd tjd gddd� t|dg �D ] }t�|j�}|� |� q t|dd�}|rU|j 18 D ]}|jdurTt�|j�}|�d �d 19 }|� |d � q9|� � |S )z� 20 Find the binary dependencies of PTH. 21 22 This implementation walks through the PE header and uses library pefile for that and supports 32/64bit Windows 23 T�� fast_load�IMAGE_DIRECTORY_ENTRY_IMPORT�IMAGE_DIRECTORY_ENTRY_EXPORT)�directories�forwarded_exports_only�import_dllnames_only�DIRECTORY_ENTRY_IMPORT�DIRECTORY_ENTRY_EXPORTN�.r z.dll)�set�pefile�PE�parse_data_directories�DIRECTORY_ENTRY�getattrr �convert_dll_name_to_str�dll�add�symbols� forwarderr �close) �pth�dlls�pe�entryZdll_strZ exportSymbols�symr: r7 r# r# r$ �_getImports_peJ s, �� 24 25 �rA c C sH g }| D ]}|\}}}t j�|�st|�d d }|�|||f� q|S )z� 26 Ensure all binary modules in zipped eggs get extracted and included with the frozen executable. 27 28 return modified table of content 29 r )r r �isfile�check_extract_from_eggr )�toc�new_toc�item�modnamer<