관리-도구
편집 파일: system_info.cpython-37.pyc
B ��Fd#M � @ s, d Z ddlmZmZmZ ddlZddlZddlZddlZddl Z ddl m Z ddlmZ ej d dk r�ddlmZ ddlmZ nddlmZ ddlmZ dd lmZ dd lmZ ddlZddlmZ ddlmZ dd lmZmZmZ ddlm Z m!Z!m"Z" ddl#m$Z% ddl&m'Z' ddl(Zddl)Z)ddl*Z*ddl+Z+ddd�Z,e,e+�-� d Z.dd� Z/ej+dk�r�dej0�1ej2j3d�gZ4g Z5g Z6dgZ7g Z8g Z9�nPe/dddddge.�Z4g Z5dd d!d"d#d$d%gZ6dd&d'd(gZ7e/d)d*dge.�Z8d+d,d!gZ9ej0�:d-��r*e d.�Z;e;�r*ej0�<e;d �d Z=e8�>e=d-g� e9�>d/d0g� ddl?Z@dZAz�y&eBejCd1�ZAe@jDd2d3ge@jEeAd4�ZFW n eGefk �rx Y nNX eHeF�I� d �J� �K� �ZLeFjMdk�r�e8ej0�1d5eL�g7 Z8e4ej0�1d5eL�g7 Z4W deAdk �r�eA�N� X ej0�1ejOd6�e4k�r8e4�Pdej0�1ejOd6�� e6�Qej0�1ejOd7�� e7�Qej0�1ejOd8�� d9d:� e4D �Z4d;d:� e5D �Z5d<d:� e6D �Z6d=d:� e7D �Z7e"� ZRd>d?� ZSd�d@dA�ZTG dBdC� dCe�ZUG dDdE� dEeU�ZVG dFdG� dGeU�ZWG dHdI� dIeW�ZXG dJdK� dKeU�ZYG dLdM� dMeY�ZZG dNdO� dOeU�Z[G dPdQ� dQeU�Z\G dRdS� dSeU�Z]G dTdU� dUeU�Z^G dVdW� dWeU�Z_G dXdY� dYe`�ZaG dZd[� d[ea�ZbG d\d]� d]ea�ZcG d^d_� d_ec�ZdG d`da� daec�ZeG dbdc� dcec�ZfG ddde� deec�ZgG dfdg� dgec�ZhG dhdi� diec�ZiG djdk� dkec�ZjG dldm� dmea�ZkG dndo� doea�ZlG dpdq� dqel�ZmG drds� dsel�ZnG dtdu� duea�ZoG dvdw� dweo�ZpG dxdy� dyeo�ZqG dzd{� d{ep�ZrG d|d}� d}eo�ZsG d~d� deq�ZtG d�d�� d�eo�ZuG d�d�� d�eu�ZvG d�d�� d�eu�ZwG d�d�� d�ev�ZxG d�d�� d�eu�ZyG d�d�� d�ew�ZzG d�d�� d�ea�Z{G d�d�� d�ea�Z|d�Z}i Z~d�d�� ZG d�d�� d�ea�Z�G d�d�� d�ea�Z�G d�d�� d�ea�Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�ea�Z�G d�d�� d�ea�Z�G d�d�� d�ea�Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�e��Z�G d�d�� d�ea�Z�G d�d�� d�ea�Z�G d�d�� d�ea�Z�G d�d�� d�ea�Z�G d�d�� d�ea�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�ea�Z�G d�d̄ d�ea�Z�d�d΄ Z�dd�d�ddќZ�d�d�d�d�d֜Z�d�d Z�d�d�dۄZ�d�d�d݄Z�e�d�k�r(e�� dS )�ak 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 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] fftw_libs = rfftw, fftw fftw_opt_libs = rfftw_threaded, fftw_threaded # if the above aren't found, look for {s,d}fftw_libs and {s,d}fftw_opt_libs [atlas] library_dirs = /usr/lib/3dnow:/usr/lib/3dnow/atlas # for overriding the names of the atlas libraries atlas_libs = lapack, f77blas, cblas, atlas [x11] library_dirs = /usr/X11R6/lib include_dirs = /usr/X11R6/include ---------- 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�exec_command� get_pythonexe)�is_sequence� is_string�get_shared_lib_extension)�config)� get_exception� �@ )�32bit�64bitc C sD |dkrt d��|dkr| S g }x| D ]}|�|d |g� q&W |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�p� r! �N/opt/alt/python37/lib64/python3.7/site-packages/numpy/distutils/system_info.py�libpaths� s r# �win32zC:\�libs�.z/usr/local/libz/opt/libz/usr/libz/opt/local/libz/sw/libz/usr/local/includez/opt/includez/usr/includez/opt/local/include/ufsparsez/opt/local/includez/sw/includez/usr/include/suitesparsez/usr/local/srcz/opt/srcz/sw/srcz/usr/X11R6/libz/usr/X11/libz/usr/X11R6/includez/usr/X11/includez/usr/lib/X11z/usr/lib/*/libX11.soz/usr/lib/X11/includez/usr/include/X11�w�gccz-print-multiarch)�stdout�stderrz /usr/lib/�lib�include�srcc C s g | ]}t j�|�r|�qS r! )�os�path�isdir)�.0�_mr! r! r"