Uc@s`dZddd!ZddlZejZddlZddlZddlZddlZddlZej j Z ejZ ddl Z ddlZddlZddlZddlZddlZejZyddlmZWnek rdZnXdeefZdZd Zd Zd Zd Zdd ZdZdZ dZ!dS(s f2py2e - Fortran to Python C/API generator. 2nd Edition. See __usage__ below. Copyright 1999--2005 Pearu Peterson all rights reserved, Pearu Peterson Permission to use, modify, and distribute this software is given under the terms of the NumPy License. NO WARRANTY IS EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. $Date: 2005/05/06 08:31:19 $ Pearu Peterson s$Revision: 1.90 $i iN(t __version__sN/AsUsage: 1) To construct extension module sources: f2py [] [[[only:]||[skip:]] \ ] \ [: ...] 2) To compile fortran files and build extension modules: f2py -c [, , ] 3) To generate signature files: f2py -h ...< same options as in (1) > Description: This program generates a Python C/API file (module.c) that contains wrappers for given fortran functions so that they can be called from Python. With the -c option the corresponding extension modules are built. Options: --2d-numpy Use numpy.f2py tool with NumPy support. [DEFAULT] --2d-numeric Use f2py2e tool with Numeric support. --2d-numarray Use f2py2e tool with Numarray support. --g3-numpy Use 3rd generation f2py from the separate f2py package. [NOT AVAILABLE YET] -h Write signatures of the fortran routines to file and exit. You can then edit and use it instead of . If ==stdout then the signatures are printed to stdout. Names of fortran routines for which Python C/API functions will be generated. Default is all that are found in . Paths to fortran/signature files that will be scanned for in order to determine their signatures. skip: Ignore fortran functions that follow until `:'. only: Use only fortran functions that follow until `:'. : Get back to mode. -m Name of the module; f2py generates a Python/C API file module.c or extension module . Default is 'untitled'. --[no-]lower Do [not] lower the cases in . By default, --lower is assumed with -h key, and --no-lower without -h key. --build-dir All f2py generated files are created in . Default is tempfile.mktemp(). --overwrite-signature Overwrite existing signature file. --[no-]latex-doc Create (or not) module.tex. Default is --no-latex-doc. --short-latex Create 'incomplete' LaTeX document (without commands \documentclass, \tableofcontents, and \begin{document}, \end{document}). --[no-]rest-doc Create (or not) module.rst. Default is --no-rest-doc. --debug-capi Create C/API code that reports the state of the wrappers during runtime. Useful for debugging. --[no-]wrap-functions Create Fortran subroutine wrappers to Fortran 77 functions. --wrap-functions is default because it ensures maximum portability/compiler independence. --include_paths ::... Search include files from the given directories. --help-link [..] List system resources found by system_info.py. See also --link- switch below. [..] is optional list of resources names. E.g. try 'f2py --help-link lapack_opt'. --quiet Run quietly. --verbose Run with extra verbosity. -v Print f2py version ID and exit. numpy.distutils options (only effective with -c): --fcompiler= Specify Fortran compiler type by vendor --compiler= Specify C compiler type (as defined by distutils) --help-fcompiler List available Fortran compilers and exit --f77exec= Specify the path to F77 compiler --f90exec= Specify the path to F90 compiler --f77flags= Specify F77 compiler flags --f90flags= Specify F90 compiler flags --opt= Specify optimization flags --arch= Specify architecture specific optimization flags --noopt Compile without optimization --noarch Compile without arch-dependent optimization --debug Compile with debugging information Extra options (only effective with -c): --link- Link extension module with as defined by numpy.distutils/system_info.py. E.g. to link with optimized LAPACK libraries (vecLib on MacOSX, ATLAS elsewhere), use --link-lapack_opt. See also --help-link switch. -L/path/to/lib/ -l -D -U -I/path/to/include/ .o .so .a Using the following macros may be required with non-gcc Fortran compilers: -DPREPEND_FORTRAN -DNO_APPEND_FORTRAN -DUPPERCASE_FORTRAN -DUNDERSCORE_G77 When using -DF2PY_REPORT_ATEXIT, a performance report of F2PY interface is printed out at exit (platforms: Linux). When using -DF2PY_REPORT_ON_ARRAY_COPY=, a message is sent to stderr whenever F2PY interface makes a copy of an array. Integer sets the threshold for array sizes when a message should be shown. Version: %s numpy Version: %s Requires: Python 2.3 or higher. License: NumPy license (see LICENSE.txt in the NumPy source code) Copyright 1999 - 2005 Pearu Peterson all rights reserved. http://cens.ioc.ee/projects/f2py2e/cCsgggggf\}}}}}d6\}}}} } } } d} d}d}d}d}d}g}d7\}}i|d6}x|D]}|dkrq|dkrd}q|dkrd}q|d krd}d} q|d d kr|j|d q|d krd}q|d kr1d} q|dkrFd}q|dkr[d} q|dkrt| d7} q|dkrd}q|dkrd}q|dkrd}q|dkrd}q|dkrd}q|dkrd}q|dkr d|dd}|}q| rSd} |}q| r{d} |j |j t j q|dkry!t |j|j|Wqtk r}td(t||fqXq|dkr|j|q|dkr|j|qqW| r>| r>| r>tGHtjnt jj|sw| sgtd)|nt j|n|rt jj||}n|rt jj|rd|krtd*|tjn||d+<| |d,<|dkr| rd|d-2ss: Module "%s" uses nonexisting "%s" which will be ignored. (Rt buildcfuncsR%trangetlentcb_rulestbuildcallbackstkeysRR'tmaptindext dict_appendR;t buildmodule(tlisttmodulestmnamestisusedbytitutrettum((s5/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyt buildmodules s4     8)cCsuxn|jD]`\}}||kr2g||||+j+|ndS(@s Do it all in one call! iNs-cis --build-diris [-][-]link[-]cSs ||kS(N((tatflags((s5/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyRIsisF[-][-]((no[-]|)(wrap[-]functions|lower)|debug[-]capi|quiet)|[-]includecSs ||kS(N((RR((s5/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyRIssonly:sskip:RcSs ||kS(N((RR((s5/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyRIss<[-][-]((f(90)?compiler([-]exec|)|compiler)=|help[-]compiler)cSs ||kS(N((RR((s5/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyRIssN[-][-]((f(77|90)(flags|exec)|opt|arch)=|(debug|noopt|noarch|help[-]fcompiler))cSs ||kS(N((RR((s5/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyRIss --fcompiler=(t fcompilersUnknown vendor: "%s"is[-][-](verbose)cSs ||kS(N((RR((s5/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyRIss--quiettuntitleds-m(tget_f2py_modulenameRs[.]pyf([.]src|)s [.](o|a|so)s-IRs-Ls-ls-Us-Dt=sInvalid use of -D:(tget_infot include_dirs(tsetupt ExtensionREtsourcest library_dirst librariest define_macrost undef_macrost extra_objectst f2py_options(RRs9No %s resources found in system (try `f2py --help-link`) tbuilds --build-temps --build-bases--build-platlibRt config_fct build_extt ext_modulessRemoving build directory %s (sonly:sskip:(,ttempfileRRoRQt ValueErrorRRR#R'tmktemptfilterRyRzR{RRRLtnumpy.distutilsRtload_all_fcompiler_classestfcompiler_classROtlowertKeyErrortvaluestAssertionErrort!numpy.distutils.command.build_srcRRRKRttupletnumpy.distutils.system_infoRtgettnumpy.distutils.coreRRtnumpy.distutils.misc_utilRRR%texiststshutiltrmtree(,RRXtremove_build_dirt build_dirt sysinfo_flagsR,t f2py_flagst f2py_flags2tflRt flib_flagstfc_flagstdel_listRHRdRt allowed_keystnvtovtvmapt setup_flagsR4RRt pyf_filesRRRRRRtusing_numarrayt using_numerict name_valueRtnum_include_dirtnum_infoRRtext_argsRRtntextR((s5/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyt run_compiles     " "     ""        "              cCspdtjdkr>tjjdddlm}|dSdtjdkr[tnttjddS(Ns --help-linkii(tshow_alls-c(RRotremoveRRRRx(R((s5/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pytmain&s ("t__doc__RtversionRRRtpprintR_RytstderrR@RtshowR<R;RMRmRRrR%tnumpyt numpy_versiont ImportErrorR"R8RCR\RRRxRRRRR(((s5/usr/lib/python2.7/site-packages/numpy/f2py/f2py2e.pyts>                    V   +