OwlCyberSecurity - MANAGER
Edit File: system_info.cpython-38.pyc
U �p�]�� � @ s� d Z ddlmZmZmZ ddlZddlZddlZddlZddl Z ddl Z ddlZddlmZ ddl mZ ejd dk r�ddlmZ ddlmZ nddlmZ ddlmZ dd lmZ dd lmZ ddlZddlmZ ddlmZ dd lmZmZm Z ddl!m"Z"m#Z#m$Z$ ddl%m&Z' ddl(m)Z) ddl*m+Z+ ddl*m,Z, ddl-Zddl.Z.ddl/Z/ddl0Z0ddd�Z1e1e0�2� d Z3dd� Z4dd� Z5ej0dk�r�dej6�7ej8j9d�ga:g Z;g a<dgZ=g Z>g Z?ddgZ@d gZAd!d"� e@D �Z@d#d"� eAD �ZAd$d%� ZBejd&k�r�e/�Cd'�ZDeD�rnej6�EeD�ZFe0�2� d(k�r(d)ZGnd*ZGej6�7eFd+�ZHej6�7eHeGd, �ej6�7eHeGd- �fD ]ZIeBeI� �q^e/�Cd.�ZJeJ�r�ej6�EeJ�ZKeBej6�7eKd/d0�� eBej6�7eKd0�� �n6e5d1d2d3d4d5ge3�a:g Z;d6d7d8d9d:d;d<ga<dd=d>d?gZ=e5d@dAd3ge3�Z>dBdCd8gZ?ej6�LdD��rPedE�ZMeM�rPej6�NeMd �d ZOe>�PeOdDg� e?�PdFdGg� eQejRdH���ZSze jTdIdJge jUeSdK�ZVW n eWefk �r� Y nNX eXeV�Y� d �Z� �[� �Z\eVj]dk�r�e>ej6�7dLe\�g7 Z>t:ej6�7dLe\�g7 a:W 5 Q R X ej6�7ej^d �t:k�rDt:�_dej6�7ej^d �� t<�`ej6�7ej^d�� e=�`ej6�7ej^dM�� dNd"� t:D �a:dOd"� e;D �Z;dPd"� t<D �a<dQd"� e=D �Z=e$� ZadRdS� Zbd�dTdU�ZcG dVdW� dWe�ZdG dXdY� dYe�ZeG dZd[� d[ed�ZfG d\d]� d]ed�ZgG d^d_� d_ed�ZhG d`da� daeh�ZiG dbdc� dced�ZjG ddde� deed�ZkG dfdg� dgek�ZlG dhdi� died�ZmG djdk� dked�ZnG dldm� dmed�ZoG dndo� doed�ZpG dpdq� dqed�ZqG drds� dser�ZsG dtdu� dues�ZtG dvdw� dwes�ZuG dxdy� dyeu�ZvG dzd{� d{eu�ZwG d|d}� d}eu�ZxG d~d� deu�ZyG d�d�� d�eu�ZzG d�d�� d�eu�Z{G d�d�� d�eu�Z|G d�d�� d�es�Z}G d�d�� d�es�Z~G d�d�� d�e~�ZG d�d�� d�e~�Z�G d�d�� d�es�Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�es�Z�G d�d�� d�es�Z�d�Z�i Z�d�d�� Z�G d�d�� d�es�Z�G d�d�� d�es�Z�G d�d�� d�es�Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�es�Z�G d�d�� d�es�Z�G d�d�� d�es�Z�G d�d d�es�Z�G d�dĄ d�es�Z�G d�dƄ d�e��Z�G d�dȄ d�e��Z�G d�dʄ d�e��Z�G d�d̄ d�es�Z�G d�d΄ d�es�Z�G d�dЄ d�es�Z�G d�d҄ d�es�Z�G d�dԄ d�es�Z�G d�dք d�e��Z�G d�d d�e��Z�G d�dڄ d�e��Z�G d�d܄ d�e��Z�G d�dބ d�e��Z�G d�d� d�e��Z�G d�d� d�e��Z�G d�d� d�e��Z�G d�d� d�e��Z�G d�d� d�e��Z�G d�d� d�es�Z�G d�d� d�es�Z�d�d� Z�dd�d�dd�Z�d�d�d�d�d��Z�d�d�� Z��d d�d��Z��dd�d��Z�e�d�k� r�e�� dS ( aD This file defines a set of system_info classes for getting information about various resources (libraries, library directories, include directories, etc.) in the system. Currently, the following classes are available: atlas_info atlas_threads_info atlas_blas_info atlas_blas_threads_info lapack_atlas_info lapack_atlas_threads_info atlas_3_10_info atlas_3_10_threads_info atlas_3_10_blas_info, atlas_3_10_blas_threads_info, lapack_atlas_3_10_info lapack_atlas_3_10_threads_info flame_info blas_info lapack_info openblas_info blis_info blas_opt_info # usage recommended lapack_opt_info # usage recommended fftw_info,dfftw_info,sfftw_info fftw_threads_info,dfftw_threads_info,sfftw_threads_info djbfft_info x11_info lapack_src_info blas_src_info numpy_info numarray_info numpy_info boost_python_info agg2_info wx_info gdk_pixbuf_xlib_2_info gdk_pixbuf_2_info gdk_x11_2_info gtkp_x11_2_info gtkp_2_info xft_info freetype2_info umfpack_info Usage: info_dict = get_info(<name>) where <name> is a string 'atlas','x11','fftw','lapack','blas', 'lapack_src', 'blas_src', etc. For a complete list of allowed names, see the definition of get_info() function below. Returned info_dict is a dictionary which is compatible with distutils.setup keyword arguments. If info_dict == {}, then the asked resource is not available (system_info could not find it). Several *_info classes specify an environment variable to specify the locations of software. When setting the corresponding environment variable to 'None' then the software will be ignored, even when it is available in system. Global parameters: system_info.search_static_first - search static libraries (.a) in precedence to shared ones (.so, .sl) if enabled. system_info.verbosity - output the results to stdout if enabled. The file 'site.cfg' is looked for in 1) Directory of main setup.py file being run. 2) Home directory of user running the setup.py file as ~/.numpy-site.cfg 3) System wide directory (location of this file...) The first one found is used to get system configuration options The format is that used by ConfigParser (i.e., Windows .INI style). The section ALL has options that are the default for each section. The available sections are fftw, atlas, and x11. Appropriate defaults are used if nothing is specified. The order of finding the locations of resources is the following: 1. environment variable 2. section in site.cfg 3. ALL section in site.cfg Only the first complete match is returned. Example: ---------- [ALL] library_dirs = /usr/lib:/usr/local/lib:/opt/lib include_dirs = /usr/include:/usr/local/include:/opt/include src_dirs = /usr/local/src:/opt/src # search static libraries (.a) in preference to shared ones (.so) search_static_first = 0 [fftw] libraries = rfftw, fftw [atlas] library_dirs = /usr/lib/3dnow:/usr/lib/3dnow/atlas # for overriding the names of the atlas libraries libraries = lapack, f77blas, cblas, atlas [x11] library_dirs = /usr/X11R6/lib include_dirs = /usr/X11R6/include ---------- Note that the ``libraries`` key is the default setting for libraries. Authors: Pearu Peterson <pearu@cens.ioc.ee>, February 2002 David M. Cooke <cookedm@physics.mcmaster.ca>, April 2002 Copyright 2002 Pearu Peterson all rights reserved, Pearu Peterson <pearu@cens.ioc.ee> Permission to use, modify, and distribute this software is given under the terms of the NumPy (BSD style) license. See LICENSE.txt that came with this distribution for specifics. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. � )�division�absolute_import�print_functionN)�glob)�reduce� )� NoOptionError)�RawConfigParser)�DistutilsError)�Distribution)�log)�get_platform)�find_executable�filepath_from_subprocess_output� get_pythonexe)�is_sequence� is_string�get_shared_lib_extension)�config)� get_exception)�customized_ccompiler)�_shell_utils� �@ )�32bitZ64bitc C s. | � dd�} | � dd�} | � dd�} d�| �S )zS Convert a python string into a literal suitable for inclusion into C code �\z\\�"z\"� z\nz"{}")�replace�format)�s� r! �=/usr/lib/python3/dist-packages/numpy/distutils/system_info.py�_c_string_literal� s r# c C s@ |dkrt d��|dkr| S g }| D ]}|�|d |g� q$|S )a� Return a list of library paths valid on 32 or 64 bit systems. Inputs: paths : sequence A sequence of strings (typically paths) bits : int An integer, the only valid values are 32 or 64. A ValueError exception is raised otherwise. Examples: Consider a list of directories >>> paths = ['/usr/X11R6/lib','/usr/X11/lib','/usr/lib'] For a 32-bit platform, this is already valid: >>> np.distutils.system_info.libpaths(paths,32) ['/usr/X11R6/lib', '/usr/X11/lib', '/usr/lib'] On 64 bits, we prepend the '64' postfix >>> np.distutils.system_info.libpaths(paths,64) ['/usr/X11R6/lib64', '/usr/X11R6/lib', '/usr/X11/lib64', '/usr/X11/lib', '/usr/lib64', '/usr/lib'] )r r z+Invalid bit size in libpaths: 32 or 64 onlyr �64)� ValueError�extend)�paths�bits�out�pr! r! r"