misc_util.pyc
1 o 2 [��c�f � @ s^ d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl 3 Z 4 d dlZd dl mZ d dlmZ d dlZd dlmZ e� Zg Zdd� Ze�e� g d�ZG dd � d �Zd 5 d� Zdd � Zdd� Zdd� Zd�dd�Zdd� Z d�dd�Z!dd� Z"dd� Z#dd� Z$d�d d!�Z%d�d"d#�Z&d$d%� Z'e'� r�e(d d&d'd(d)d*d+d,d-d.� Z)d�d0d1�Z*nd�d2d1�Z*d3d4� Z+d5d6� Z,d7d8� Z-d9d:� Z.d;d<� Z/d=d>� Z0d?e1d@e1fdAdB�Z2dCdD� Z3dEdF� Z4dGdH� Z5dIdJ� Z6e�7dKej8�j9Z:e�7dLej8�j9Z;e�7dMej8�j9Z<e�7dNej8�j9Z=dOdP� Z>dQdR� Z?dSdT� Z@dUdV� ZAdWdX� ZBdYdZ� ZCd[d\� ZDd]d^� ZEd_d`� ZFdadb� ZGdcdd� ZHdedf� ZIdgdh� ZJdidj� ZKdkdl� ZLdmdn� ZMdodp� ZNdqdr� ZOdsdt� ZPdudv� ZQd�dwdx�ZRdydz� ZSd{d|� ZTd�d}d~�ZUG dd�� d��ZVi fd�d��ZWd�d�� ZXd�d�� ZYd�d�d��ZZd�d�d��Z[d�d�� Z\d�d�d��Z]d�d�� Z^d�d�� Z_d�d�� Z`d�d�� Zad�d�� Zbd�d�hZcd�d�� Zdd�d�� ZedS )�� N)�local)�reduce)�DistutilsErrorc C s: t d urt D ]} zt�| � W q ty Y qw d S d S �N)�_tmpdirs�shutil�rmtree�OSError)�d� r ��C:\Users\Jacks.GUTTSPC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\numpy\distutils\misc_util.py�clean_up_temporary_directory s ��r )*� Configuration�get_numpy_include_dirs�default_config_dict�dict_append� 6 appendpath�generate_config_py�get_cmd�allpath�get_mathlibs�terminal_has_colors�red_text� 7 green_text�yellow_text� blue_text� cyan_text� cyg2win32�mingw32�all_strings� has_f_sources�has_cxx_sources�filter_sources�get_dependencies�is_local_src_dir�get_ext_source_files�get_script_files�get_lib_source_files�get_data_files�dot_join� get_frame� 8 minrelpath�njoin�is_sequence� is_string�as_list�gpaths�get_language�get_build_architecture�get_info�get_pkg_info�get_num_build_jobs�sanitize_cxx_flags�exec_mod_from_locationc @ s e Zd ZdZdd� ZdS )�InstallableLiba� 9 Container to hold information on an installable library. 10 11 Parameters 12 ---------- 13 name : str 14 Name of the installed library. 15 build_info : dict 16 Dictionary holding build information. 17 target_dir : str 18 Absolute path specifying where to install the library. 19 20 See Also 21 -------- 22 Configuration.add_installed_library 23 24 Notes 25 ----- 26 The three parameters are stored as attributes with the same names. 27 28 c C s || _ || _|| _d S r )�name� 29 build_info� 30 target_dir)�selfr9 r: r; r r r �__init__F s 31 zInstallableLib.__init__N)�__name__� 32 __module__�__qualname__�__doc__r= r r r r r8 0 s r8 c C s� ddl m} z tt�d��}W n ty t�� }Y nw t|d�}t tj 33 �d|��}| � }|du r4|S t|� d�dd�t|� d�dd�t|� d �dd�f}td 34 d� |D ��rY|S tdd� |D ��S ) a� 35 Get number of parallel build jobs set by the --parallel command line 36 argument of setup.py 37 If the command did not receive a setting the environment variable 38 NPY_NUM_BUILD_JOBS is checked. If that is unset, return the number of 39 processors on the system, with a maximum of 8 (to prevent 40 overloading the system if there a lot of CPUs). 41 42 Returns 43 ------- 44 out : int 45 number of parallel jobs that can be run 46 47 r ��get_distribution� ZNPY_NUM_BUILD_JOBSN�build�parallel� build_ext� 48 build_clibc s s � | ]}|d u V qd S r r ��.0�xr r r � <genexpr>k s � z%get_num_build_jobs.<locals>.<genexpr>c s s � | ] }|d ur|V qd S r r rI r r r rL n s � )�numpy.distutils.corerC �len�osZsched_getaffinity�AttributeError�multiprocessing� cpu_count�min�int�environ�get�getattr�get_command_obj�all�max)rC rR Zenvjobs�distZcmdattrr r r r5 L s$ � 49 �r5 c C s^ ddl }|jdtdd� t| �} tt| ��D ]}| | }d|v r,|d dvr,d| | |<