%PDF- %PDF-
| Direktori : /lib64/python3.9/site-packages/numpy/distutils/__pycache__/ |
| Current File : //lib64/python3.9/site-packages/numpy/distutils/__pycache__/misc_util.cpython-39.opt-1.pyc |
a
z[yc'] � @ s^ d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
Z
d dlZd dl
mZ d dlmZ d dlZd dlmZ e� Zg Zdd� Ze�e� g d�ZG dd � d �Zd
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*n
d�d2d1�Z*d3d4� Z+d5d6� Z,d7d8� Z-d9d:� Z.d;d<� Z/d=d>� Z0e1e1d?�d@dA�Z2dBdC� Z3dDdE� Z4dFdG� Z5dHdI� Z6e�7dJej8�j9Z:e�7dKej8�j9Z;e�7dLej8�j9Z<e�7dMej8�j9Z=dNdO� Z>dPdQ� Z?dRdS� Z@dTdU� ZAdVdW� ZBdXdY� ZCdZd[� ZDd\d]� ZEd^d_� ZFd`da� ZGdbdc� ZHddde� ZIdfdg� ZJdhdi� ZKdjdk� ZLdldm� ZMdndo� ZNdpdq� ZOdrds� ZPdtdu� ZQd�dvdw�ZRdxdy� ZSdzd{� ZTd�d|d}�ZUG d~d� 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 s8 t d ur4t D ]&} zt�| � W q ty0 Y q0 qd S �N)�_tmpdirs�shutil�rmtree�OSError)�d� r �?/usr/lib64/python3.9/site-packages/numpy/distutils/misc_util.py�clean_up_temporary_directory s r
)*�
Configuration�get_numpy_include_dirs�default_config_dict�dict_append�
appendpath�generate_config_py�get_cmd�allpath�get_mathlibs�terminal_has_colors�red_text�
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�
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�
Container to hold information on an installable library.
Parameters
----------
name : str
Name of the installed library.
build_info : dict
Dictionary holding build information.
target_dir : str
Absolute path specifying where to install the library.
See Also
--------
Configuration.add_installed_library
Notes
-----
The three parameters are stored as attributes with the same names.
c C s || _ || _|| _d S r )�name�
build_info�
target_dir)�selfr9 r: r; r r r �__init__F s zInstallableLib.__init__N)�__name__�
__module__�__qualname__�__doc__r= r r r r r8 0 s r8 c C s� ddl m} ztt�d��}W n ty8 t�� }Y n0 t|d�}t tj
�d|��}| � }|du rh|S t|�
d�dd�t|�
d�dd�t|�
d �dd�f}td
d� |D ��r�|S tdd� |D ��S dS )
a�
Get number of parallel build jobs set by the --parallel command line
argument of setup.py
If the command did not receive a setting the environment variable
NPY_NUM_BUILD_JOBS is checked. If that is unset, return the number of
processors on the system, with a maximum of 8 (to prevent
overloading the system if there a lot of CPUs).
Returns
-------
out : int
number of parallel jobs that can be run
r ��get_distribution� ZNPY_NUM_BUILD_JOBSN�buildZparallelZ build_extZ
build_clibc s s | ]}|d u V qd S r r ��.0�xr r r � <genexpr>k � z%get_num_build_jobs.<locals>.<genexpr>c s s | ]}|d ur|V qd S r r rF r r r rI n rJ )�numpy.distutils.corerC �len�os�sched_getaffinity�AttributeError�multiprocessing� cpu_count�min�int�environ�get�getattr�get_command_obj�all�max)rC rQ Zenvjobs�distZcmdattrr r r r5 L s"