/usr/local/lib64/python3.6/site-packages/numpy/distutils/__pycache__
NameSizeModeActions
ccompiler.cpython-36.pyc193050644editdlrm
conv_template.cpython-36.pyc82600644editdlrm
core.cpython-36.pyc46900644editdlrm
cpuinfo.cpython-36.pyc334200644editdlrm
exec_command.cpython-36.pyc91270644editdlrm
extension.cpython-36.pyc24790644editdlrm
from_template.cpython-36.pyc72050644editdlrm
intelccompiler.cpython-36.pyc40110644editdlrm
lib2def.cpython-36.pyc33290644editdlrm
line_endings.cpython-36.pyc20720644editdlrm
log.cpython-36.pyc24140644editdlrm
mingw32ccompiler.cpython-36.pyc142970644editdlrm
misc_util.cpython-36.pyc704000644editdlrm
msvc9compiler.cpython-36.pyc21570644editdlrm
msvccompiler.cpython-36.pyc19040644editdlrm
npy_pkg_config.cpython-36.pyc122640644editdlrm
numpy_distribution.cpython-36.pyc7630644editdlrm
pathccompiler.cpython-36.pyc9000644editdlrm
setup.cpython-36.pyc6740644editdlrm
system_info.cpython-36.pyc860570644editdlrm
unixccompiler.cpython-36.pyc32210644editdlrm
_shell_utils.cpython-36.pyc31910644editdlrm
__config__.cpython-36.pyc25500644editdlrm
__init__.cpython-36.pyc14780644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/numpy/distutils/__pycache__/ccompiler.cpython-36.pyc (19305B)
3 Egj@sddlZddlZddlZddlZddlZddlZddlmZddlmZddl m Z m Z m Z m Z mZddlmZmZmZmZmZddlmZddlmZddlmZdd lmZmZdd lmZm Z m!Z!m"Z"m#Z#y ddl$Z$Wne%k rddl&Z$YnXda'e$j(Z)e*Z+d d Z,d dZ-ddZ.e-ede.dZddZ/e-ede/d[ddZ0e-ede0d\ddZ1e-ede1ffddZ2e-ede2dd Z3d!d"Z4e-ed#e4d]d$d%Z5e-ed&e5d^d(d)Z6d*dgfd+d,Z7e-ed-e7d.d/Z8e-ed0e8d_e d4<d`e d7<dae d:<dbe d=<dce d@<dde dD<ej9dk7_9ej:dGkrfdle dK<e!rfej;dLdnej9e_9e Zej?j@dXe>dYZAeAdk reBeAdPe qWdS)qN)copy) ccompiler)compiler_classgen_lib_optionsget_default_compiler new_compiler CCompiler)DistutilsExecErrorDistutilsModuleErrorDistutilsPlatformError CompileErrorUnknownFileError)customize_compiler) LooseVersion)log)filepath_from_subprocess_outputforward_bytes_to_stdout) cyg2win32 is_sequencemingw32get_num_build_jobs_commandline_dep_stringc Cs|d}tjj|sdSt|d}|j}WdQRXt|||}|d }||krVdSdj|dd } ddtj| dd D} y2tj |j } x | D]}tj |j | krdSqWWnt k rdSXd S) z Check if an objects needs to be rebuild based on its dependencies Parameters ---------- obj : str object file Returns ------- bool z.dTrNcSs$g|]}|dkr|jd r|qS) :)endswith).0xr E/usr/local/lib64/python3.6/site-packages/numpy/distutils/ccompiler.py Fsz _needs_build..)posixFr$) ospathexistsopen readlinesrjoinshlexsplitstatst_mtimeOSError) objcc_argsextra_postargspp_optsZdep_fileflinesZcmdlineZ last_cmdlinecontentsdepsZt_objr r r! _needs_build&s&      r8csfdd}t|||dS)Ncs|f||S)Nr )selfargskw)funcr r!Zsz replace_method..)setattr)klass method_namer<mr )r<r!replace_methodXs rBcCsdS)z Does nothing here, but is called by the get_version method and can be overridden by subclasses. In particular it is redefined in the `FCompiler` class where more documentation can be found. Nr )r9r r r!CCompiler_find_executablescsrCfind_executablescCs|dkr"|}t|r"djt|}tj|y&|jr@tj|ntj|tjdWnJtj k r}z|j }|j }WYdd}~Xn t k rd}d}YnXdSt|rdjt|}|jrt |tjd|rd}nd}td |||fdS) a Execute a command in a sub-process. Parameters ---------- cmd : str The command to execute. display : str or sequence of str, optional The text to add to the log file kept by `numpy.distutils`. If not given, `display` is equal to `cmd`. Returns ------- None Raises ------ DistutilsExecError If the command failed, i.e. the exit status was not 0. N )stderrsToo many open filesz2 Try rerunning setup command until build succeeds.rz)Command "%s" failed with exit status %d%s)rr*listrinfoverbose subprocess check_outputSTDOUTCalledProcessErroroutput returncoder/rresearchr )r9cmddisplayexcosmsgr r r!CCompiler_spawnqs2    rZspawnrc Cs|dkr d}g}x|D]}tjjtjj|\}}tjj|d}|tjj|d}|jdr|jdd}|d|} tjjtjj | } | ||d}||j krt d||f|rtjj|}tjj |||j } |j| qW|S)a Return the name of the object files for the given source files. Parameters ---------- source_filenames : list of str The list of paths to source files. Paths can be either relative or absolute, this is handled transparently. strip_dir : bool, optional Whether to strip the directory from the returned paths. If True, the file name prepended by `output_dir` is returned. Default is False. output_dir : str, optional If given, this path is prepended to the returned paths to the object files. Returns ------- obj_names : list of str The list of paths to the object files corresponding to the source files in `source_filenames`. Nrrz..z"unknown file type '%s' (from '%s'))r%r&splitextnormpath splitdriveisabs startswithrfindbasenameabspathZsrc_extensionsr r*Z obj_extensionappend) r9Zsource_filenamesZ strip_dir output_dirZ obj_namessrc_namebaseextidZobj_namer r r!CCompiler_object_filenamess&     rlZobject_filenamesc sNt} ttdkrtj| aWdQRX|s0gSddlm} m} m} t | rg} x.single_compileZabsoftr)rprqrr)rrsrx threading SemaphoreZnumpy.distutils.fcompilerrmrnro isinstancegetattrrer* compiler_sorrJZ_setup_compileZ _get_cc_argsrIkeys compiler_typeritemslenZmultiprocessing.poolpoolZ ThreadPoolmapclose)r9sourcesrfmacros include_dirsdebug extra_preargsr2dependsjobsrmrnrorUZfcZfcompZccompZobjectsbuildr|Zobjects_to_buildZ f77_objectsZ other_objectsr0r{riZ build_itemsrWmultiprocessingrr )r1r2r3r9r!CCompiler_compilesd+                  rcompilecstjd|jjjjffdd}|dr<|jj|drdxjD]\}}|j||qLW|drxjD]}|j |qtW|dr|j |j j |dr|j |j j |d r|jj|d r|jjd S) a Customize compiler using distutils command. Parameters ---------- cmd : class instance An instance inheriting from `distutils.cmd.Command`. ignore : sequence of str, optional List of `CCompiler` commands (without ``'set_'``) that should not be altered. Strings that are checked for are: ``('include_dirs', 'define', 'undef', 'libraries', 'library_dirs', 'rpath', 'link_objects')``. Returns ------- None zcustomize %s using %scst|ddk o|kS)N)r)attr)rTignorer r!allowsz&CCompiler_customize_cmd..allowrdefineundef libraries library_dirsrpath link_objectsN)rrJ __class____name__Zset_include_dirsrrZ define_macrorZundefine_macroZ set_librariesrZset_library_dirsrZset_runtime_library_dirsrZset_link_objectsr)r9rTrrnamevaluemacror )rTrr!CCompiler_customize_cmdps&    rZ customize_cmdc sg}d}t|jj}xdD]}||kr|j|qWx@|D]8}t||r.r) rrrrrrrrrr) rIZ executablesrrehasattrrmaxrreprr*)compilerpropsZmxrkeyvr5r )rr!_compiler_to_strings    rc Cs`y |jWntk r YnXtjjdkr\tddt|jtt|tdddS)z Print the compiler customizations to stdout. Parameters ---------- None Returns ------- None Notes ----- Printing is only done if the distutils log threshold is < 2. r\*PN) get_version Exceptionr _global_log thresholdprintrr)r9r r r!CCompiler_show_customizations     rZshow_customizationc "Cstjd|jjt||ry|jjdWnttfk rFYnXt |drd|j dkr|j s|j dj drd\}}nd\}}|j dj ||g|j d d |_ n8t |drtjd |j ft |d stjd |jjt |dr*d|j dks"d|j dks"d|j dkr*d|_ntjdkrdd l}dd l}|j}zvyTtjj|d}t|d} | jdWd QRX|j|g|dd|dgdd|_Wntk rd|_YnXWd |j|Xd S)am Do any platform-specific customization of a compiler instance. This method calls `distutils.sysconfig.customize_compiler` for platform-specific customization, as well as optionally remove a flag to suppress spurious warnings in case C++ code is being compiled. Parameters ---------- dist : object This parameter is not used for anything. need_cxx : bool, optional Whether or not C++ has to be compiled. If so (True), the ``"-Wstrict-prototypes"`` option is removed to prevent spurious warnings. Default is False. Returns ------- None Notes ----- All the default options used by distutils can be extracted with:: from distutils import sysconfig sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO') z customize %sz-Wstrict-prototypesrccrgccg++c++rNz#### %s ####### compiler_cxxzMissing compiler_cxx fix for ZclangTr#zfile.cwzint a; z-MMDz-MFz.d)rfrF)rr)rr)rrJrrrrrzAttributeError ValueErrorrrrrareplacewarnZ _auto_dependsr%rtempfileshutilmkdtempr&r*r(writerr rmtree) r9distZneed_cxxabrrZtmpdirfnr4r r r!CCompiler_customizesJ        rZ customize[-.\d]+csfdd}|S)aU Simple matching of version numbers, for use in CCompiler and FCompiler. Parameters ---------- pat : str, optional A regular expression matching version numbers. Default is ``r'[-.\d]+'``. ignore : str, optional A regular expression matching patterns to skip. Default is ``''``, in which case nothing is skipped. start : str, optional A regular expression matching the start of where to start looking for version numbers. Default is ``''``, in which case searching is started at the beginning of the version string given to `matcher`. Returns ------- matcher : callable A function that is appropriate to use as the ``.version_match`` attribute of a `CCompiler` class. `matcher` takes a single parameter, a version string. cs~|jdd}d}r0tj|}|s(dS|j}xBtj||d}|sNdSrntj|jdrn|j}q2Pq2W|jdS)NrrEr)rrRmatchendrSgroup)r9version_stringposrA)rpatstartr r!matcher?s   z%simple_version_match..matcherr )rrrrr )rrrr!simple_version_match%srFc &s:| rt|dr|jS|jy |j}Wntk r<dSX| sN|d rRdSy |j}Wn@tk ry |jWntk rdSXfdd}YnXytj|tj d}WnLtj k r}z|j }|j }WYdd}~Xn*t k rd}d}YnXt|}d}d}||kr0||}|r0t|}||_|S) a Return compiler version, or None if compiler is not available. Parameters ---------- force : bool, optional If True, force a new determination of the version, even if the compiler already has a version attribute. Default is False. ok_status : list of int, optional The list of status values returned by the version look-up process for which a version string is returned. If the status value is not in `ok_status`, None is returned. Default is ``[0]``. Returns ------- version : str or None Version string, in the format of `distutils.version.LooseVersion`. rNrcs"tj|}|sdS|jd}|S)Nr)rRrr)rrAr)rr r!rxs   z&CCompiler_get_version..matcher)rFrHrG)rrrD version_cmdrZ version_matchZversion_patternrLrMrNrOrPrQr/rr) r9forceZ ok_statusrrrPrVstatusrr )rr!CCompiler_get_versionTsD     rrcCs|jd kr|St|}|jdg|jdd|_tjjdrrd|jdkrr|jd|jdg|jd d|_n|jdg|jdd|_|S) z Return the C++ compiler. Parameters ---------- None Returns ------- cxx : class instance The C++ compiler, as a `CCompiler` instance. msvcintelwintelemwrrNaixZ ld_so_aixr\)rrr)rrrrsysplatformra linker_so)r9cxxr r r!CCompiler_cxx_compilers rZ cxx_compilerintelccompilerIntelCCompiler(Intel C Compiler for 32-bit applicationsintelIntelItaniumCCompiler7Intel C Itanium Compiler for Itanium-based applicationsinteleIntelEM64TCCompiler(Intel C Compiler for 64-bit applicationsintelemIntelCCompilerW3Intel C Compiler for 32-bit applications on WindowsrIntelEM64TCCompilerW3Intel C Compiler for 64-bit applications on Windowsr pathccompilerPathScaleCCompiler2PathScale Compiler for SiCortex-based applicationspathcclinux.*ntwin32mingw32ccompilerMingw32CCompiler>Mingw32 port of GNU C Compiler for Win32(for MSC built Python)rz+Setting mingw32 as default compiler for nt.c .Cs|dkrtjtjk}|dkr$tj}y"|dkr6t|}t|\}}}Wn8tk r~d|}|dk rr|d|}t|YnXd|}y t |Wnt k r"} zpt | }tj dt ||dd}y t |Wn8t k r} zt | }t d|WYdd} ~ XnXWYdd} ~ XnXytj|} t| |} Wn&tk rdt d ||fYnX| d||}||_tjd | |S) Nz5don't know how to compile C/C++ code on platform '%s'z with '%s' compilerznumpy.distutils.z,%s in numpy.distutils; trying from distutilsz4can't compile C/C++ code: unable to load module '%s'z4can't compile C/C++ code: unable to find class '%s' zin module '%s'znew_compiler returns %szBcan't compile C/C++ code: unable to find class '%s' in module '%s')rZ get_thresholdINFOr%rrrKeyErrorr __import__ ImportErrorstrrJr rmodulesvarsrKr) platrrKdry_runr module_name class_namelong_descriptionrYemoduler?r r r!rsJ     ,  rcCsFt||||}g}x.|D]&}t|r4|jt|q|j|qW|S)N)_distutils_gen_lib_optionsrextendrIre)rrruntime_library_dirsrrZlib_optsrjr r r!rs rmsvc9r_msvcbcppcygwincemxcunixcz distutils.r)N)rr)NNNrNNN)r)rrr)rrr)rrr)rrr)rrr)rrr)rrrrrrrrrrrrrrr)rrrrrr)rrrrr)r)NNNrr)r rrrrrr)Cr%rRrr+rvrLr distutilsrdistutils.ccompilerrrrrrdistutils.errorsr r r r r distutils.sysconfigrZdistutils.versionrZnumpy.distutilsrZnumpy.distutils.exec_commandrrZnumpy.distutils.misc_utilrrrrrr}rdummy_threadingrxLockrssetrtr8rBrCrZrlrrrrrrrrZ_default_compilersrrJZ_distutils_new_compilerr Z_ccrget_mr>r r r r!s      2   ?  -    ) #  Q  /C      (