https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/numpy/f2py/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/numpy/f2py/__pycache__/f2py2e.cpython-310.pyc
o

6��a_�@sdZddlZddlZddlZddlZddlmZddlmZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lmZddlm
Z
ejZejZejjZejZe	jZde�d
e�d�Zdd�Zdd�Zdd�Zdd�Zdd�Zd!dd�Zdd�Zdd�Zdd �ZdS)"a�

f2py2e - Fortran to Python C/API generator. 2nd Edition.
         See __usage__ below.

Copyright 1999--2011 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 License.

NO WARRANTY IS EXPRESSED OR IMPLIED.  USE AT YOUR OWN RISK.
$Date: 2005/05/06 08:31:19 $
Pearu Peterson

�N�)�crackfortran)�rules)�cb_rules)�auxfuncs)�cfuncs)�f90mod_rules)�__version__)�	capi_mapsa�Usage:

1) To construct extension module sources:

      f2py [<options>] <fortran files> [[[only:]||[skip:]] \
                                        <fortran functions> ] \
                                       [: <fortran files> ...]

2) To compile fortran files and build extension modules:

      f2py -c [<options>, <build_flib options>, <extra options>] <fortran files>

3) To generate signature files:

      f2py -h <filename.pyf> ...< same options as in (1) >

Description: This program generates a Python C/API file (<modulename>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 <filename>    Write signatures of the fortran routines to file <filename>
                   and exit. You can then edit <filename> and use it instead
                   of <fortran files>. If <filename>==stdout then the
                   signatures are printed to stdout.
  <fortran functions>  Names of fortran routines for which Python C/API
                   functions will be generated. Default is all that are found
                   in <fortran files>.
  <fortran files>  Paths to fortran/signature files that will be scanned for
                   <fortran functions> in order to determine their signatures.
  skip:            Ignore fortran functions that follow until `:'.
  only:            Use only fortran functions that follow until `:'.
  :                Get back to <fortran files> mode.

  -m <modulename>  Name of the module; f2py generates a Python/C API
                   file <modulename>module.c or extension module <modulename>.
                   Default is 'untitled'.

  --[no-]lower     Do [not] lower the cases in <fortran files>. By default,
                   --lower is assumed with -h key, and --no-lower without -h key.

  --build-dir <dirname>  All f2py generated files are created in <dirname>.
                   Default is tempfile.mkdtemp().

  --overwrite-signature  Overwrite existing signature file.

  --[no-]latex-doc Create (or not) <modulename>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) <modulename>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 <path1>:<path2>:...   Search include files from the given
                   directories.

  --help-link [..] List system resources found by system_info.py. See also
                   --link-<resource> switch below. [..] is optional list
                   of resources names. E.g. try 'f2py --help-link lapack_opt'.

  --f2cmap <filename>  Load Fortran-to-Python KIND specification from the given
                   file. Default: .f2py_f2cmap in current directory.

  --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-<resource>    Link extension module with <resource> 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<libname>
  -D<define> -U<name>
  -I/path/to/include/
  <filename>.o <filename>.so <filename>.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=<int>, a message is
  sent to stderr whenever F2PY interface makes a copy of an
  array. Integer <int> sets the threshold for array sizes when
  a message should be shown.

Version:     z
numpy Version: z�
Requires:    Python 3.5 or higher.
License:     NumPy license (see LICENSE.txt in the NumPy source code)
Copyright 1999 - 2011 Pearu Peterson all rights reserved.
http://cens.ioc.ee/projects/f2py2e/cCs
ggggf\}}}}d\	}}}}}	}
}}}
d}d}d}d}d}d}g}d\}}|ddd�}|D�]�}|dkr7q/|d	kr>d}q/|d
krEd}q/|dkrLd}q/|dd�d
kr^|�|dd��q/|dkred}q/|dkrld}	q/|dkrsd}q/|dkrzd}q/|dkr�|d7}q/|dkr�d}q/|dkr�d}q/|dkr�d}q/|dkr�d}q/|dkr�d}q/|dkr�d}q/|dkr�d|d<q/|dkr�d}q/|dkr�d}q/|dkr�d}
q/|dkr�d|d<q/|d kr�d}q/|d!kr�d}q/|dd"�d#kr�tt�t��q/|d$kr�d}q/|dd�d%k�rtjd&�|d'd��d(|dd�tj|d'd�<q/|dd)�d*v�r/td+�d}
q/|dd)�d,v�r;d}
q/|dd-k�rOt	d.t
|��t��q/|�rWd}|}q/|�r_d}|}q/|	�rgd}	|}q/|
�rvd}
|�|�t
j��q/|�r�d}||d/<q/|�r�d}||d0<q/|
�r�d}
||d1<q/|dk�r�zt|��Wd�n	1�s�wY|�|�Wq/t�y�}zt	d2t|�|f�WYd}~q/d}~ww|dk�r�|�|�q/|dk�r�|�|�q/|�s�|�s�|�s�tt�t��t
j�|��s|�s
td3|�t
�|�|�rt
j�||�}|�r2t
j�|��r2d|v�r2t	d4|�t��||d5<||d6<|dk�rG|�sGd|d7<n||d7<|�rR||d8<|�rY||d9<|�r`||d:<|�rg||d;<||d<<||d=<||d><||d?<||d@<|�d1d�||fS)AN)	rrrrrrrrrr���r�.)NN)�	buildpath�coutput�f2py_wrapper_output��only:�skip:�:�z--debug-z--lower�--build-dirz
--no-lower�--quietz	--verbosez--latex-docz--no-latex-docz
--rest-docz
--no-rest-docz--wrap-functionsz--no-wrap-functionsz
--short-latex�
shortlatexz	--coutputz--f2py-wrapper-output�--f2cmapz--overwrite-signaturezh-overwritez-h�-m�z-vz--show-compilersz-include�userincludes�	z	#include ��--include_pathszHf2py option --include_paths is deprecated, use --include-paths instead.
�--include-paths�-zUnknown option %s
rr�f2cmap_filez!IOError: %s. Skipping file "%s".
zCreating build directory %szFSignature file "%s" exists!!! Use --overwrite-signature to overwrite.
�debug�verbose�do-lower�module�	signsfile�	onlyfuncs�	skipfuncs�
dolatexdoc�	dorestdoc�	wrapfuncsr
�
include_paths)�append�print�f2py_version�sys�exitr�outneedsr�outmess�errmess�repr�extend�split�os�pathsep�open�IOError�str�	__usage__�path�isdir�mkdir�join�isfile�
setdefault)�	inputline�filesr(r'r"�f�f2�f3�f5�f6�f7�f8�f9�f10r#�dolcr)r*r+r
r,r&�
modulename�options�l�detail�rT�3/usr/lib/python3/dist-packages/numpy/f2py/f2py2e.py�
scaninputline�s.�




 �





�
���


�
�
rVcCst|t_|dt_|dt_d|vr|dt_d|vr|dt_d|vr(|dt_|dtjdd�<|dt_	t�|�}d|vryt
d	|d�t�|�}|dd
d�dkr]tj
�|�nt|dd��
}|�|�Wd�n1stwY|d
dur�|D]
}d|d|d
<q�n|D]}|d
|d
<q�|ddur�|D]
}d|d|d<q�|S|D]}|d|d<q�|S)Nr"r#r%r(r'r,r$r&zSaving signatures to file "%s"
i�����stdout�wrz
%smodule.c�namerz%s-f2pywrappers.f)rrQrr"r#�
f77modulenamer(r'r,�dolowercaser3�
crack2fortranr0rW�writer:)rErQ�postlist�pyfrF�modrTrTrU�callcrackfortranBsB







���rac
Cs�t��td�ggi}}}tt|��D]F}d||dvr(t�||�qd||vrL||d��D]}||vr@g||<||�||d�q6|�||�|�||d�qi}tt|��D]d}|||vr�td||d�	dd�|||D��f�qeg}d||vr�||d��D]}||vr�||vr�|�||�
|��q�td	|||f�q�i|||<t|||t�
|||��qe|S)
NzBuilding modules...
�__user__rY�usez+	Skipping module "%s" which is used by %s.
�,cS�g|]}d|�qS�z"%s"rT��.0�srTrTrU�
<listcomp>y�z buildmodules.<locals>.<listcomp>z:	Module "%s" uses nonexisting "%s" which will be ignored.
)r�buildcfuncsr3�range�lenr�buildcallbacks�keysr-rA�index�dict_appendr�buildmodule)�lst�modules�mnames�isusedby�i�u�ret�umrTrTrU�buildmodulesfs< 
�� r|cCsP|��D]!\}}||vrg||<t|t�r|||||<q||�|�qdS�N)�items�
isinstance�listr-)�d_out�d_in�k�vrTrTrUrr�s
�rrc
Cst��tj�tj�tj��}tj�|dd�}tj�|dd�}t	|�\}}|t
_t�
|d�t||�}i}tt|��D]&}d||vrb||d��D]}	|	|vrVg||	<||	�||d�qLq<tt|��D]4}||ddkr�d	||dvr�||d|vr�td
||dd�dd
�|||dD��f�qid|vr�|ddkr�td�tdtj�tjd�|df�dStt|��D]}||ddkr�d|vr�td�tdt||d���q�|dt
_|t_|dt
_t|�}
|
��D]}t|
|||d��q�|
S)aJ
    Equivalent to running::

        f2py <args>

    where ``<args>=string.join(<list>,' ')``, but in Python.  Unless
    ``-h`` is used, this function returns a dictionary containing
    information on generated modules and their dependencies on source
    files.  For example, the command ``f2py -m scalar scalar.f`` can be
    executed from Python as follows

    You cannot build extension modules with this function, that is,
    using ``-c`` is not allowed. Use ``compile`` command instead

    Examples
    --------
    .. include:: run_main_session.dat
        :literal:

    �srczfortranobject.hzfortranobject.cr!rcrY�blockz
python modulerbz<Skipping Makefile build for module "%s" which is used by %s
rdcSrerfrTrgrTrTrUrj�rkzrun_main.<locals>.<listcomp>r&r#rzKStopping. Edit the signature file and then run f2py on the signature file: z%s %s
rNzJTip: If your original code is Fortran source then you must use -m option.
z2All blocks must be python module blocks but got %sr"r+)�csrc�h)r�reset_global_f2py_varsr8r>�dirname�abspathr�__file__rArVrrQr
�load_f2cmap_filerarmrnrpr-r3�basenamer0�argvr4�	TypeErrorr5�debugoptionsrr+r|rr)�comline_list�f2pydir�fobjhsrc�fobjcsrcrErQr^rwrxryrz�mnrTrTrU�run_main�sb
� (�������

r�c	Csvgg}}t�|d|d�j}|rt|�}nd}dd�|D�D]}||�r1|�||d��q!|�|�q!||fS)z,
    Filter files by prefix and suffix.
    z.*z\ZrcSsg|]}|���qSrT)�strip)rh�xrTrTrUrj�rkz filter_files.<locals>.<listcomp>N)�re�compile�matchrnr-)	�prefix�suffixrE�
remove_prefix�filtered�restr��ind�filerTrTrU�filter_files�s

r�cCstj�tj�|j��}|Sr})r8r>r�r�)r%�prTrTrU�
get_prefix�sr�c$
s�ddl}tj�d�}tj|=d}ztj�d�}Wnty#d}Ynw|dur:tj|d}tj|d=tj|=nd}|��}t�d���fdd�tjdd�D��
�
fd	d�tjD�t_�
rgd
d��
D��
t�d���fdd�tjdd�D���fd
d�tjD�t_g�d}tjdd�D]}|dvr�d}n|dkr�d}|s�|dkr���|�q��r��ddkr���d���	���fdd�tjD�t_t�d���fdd�tjdd�D���fdd�tjD�t_t�d���fdd�tjdd�D���fdd�tjD�t_	g}�D]g}d}|dt
|��|k�roddlm}	|	�
�t|	j���}
|t
|�d���}}||
v�rbi}
z|
|}Wnt�y_||
��v�r]td|t
|�d��Ynw|}��|�}d|�|<�q	�q	|D]}��|�}�|=�qst
��dk�s�Jt����t�d���fdd�tjdd�D��	�	fdd�tjD�t_d�v�r��	�d�d }tjdd�}d!D],}|tjv�r�tj�|�}��	tj||d��tj|d=tj|=tjdd�}�q�d"tjv�rtj�d"�}tj|d}tj|d=tj|=tjdd�}n!dd#lm}td$d%|�\}}||}|D]}||�}|�r0n�q%td$d&|�\}}td'd$|dd(�\}}td)d$|dd(�\}}td*d$|dd(�\}}td+d$|dd(�\}}td,d$|dd(�\}}tt
|��D]+}||�d-d�}t
|�dk�r�|�d�t
|�dk�r�t|�||<�qrtd.|��qrdd/lm}i}|�r�|�	|�d0g��dd1lm }m!}||||||||�d2�	}�
�r�dd3l"m#} �
D]}!||!�}|�s�t$d4t|!��| |fi|���q�|d?i|��}"tjdg�	t_tj�	d5d6|d7|d8d9d:g���rtj�	d;g����r"tj�	d<g��||"gd=�|�rCt%j&�'|��rEddl(}#t$d>|�|#�)|�dSdSdS)@z 
    Do it all in one call!
    rN�-crrz--link-c�g|]	}��|�r|�qSrT�r��rh�_m)�_reg1rTrUrj�zrun_compile.<locals>.<listcomp>c�g|]}|�vr|�qSrTrTr�)�
sysinfo_flagsrTrUrj�cSsg|]}|dd��qS)�NrT)rhrFrTrTrUrjr�z:--((no-|)(wrap-functions|lower)|debug-capi|quiet)|-includecr�rTr�r�)�_reg2rTrUrj
r�cr�rTrTr�)�
f2py_flagsrTrUrjr�)rrrrcr�rTrTr�)�f2py_flags2rTrUrjr�z4--((f(90)?compiler(-exec|)|compiler)=|help-compiler)cr�rTr�r�)�_reg3rTrUrjr�cr�rTrTr�)�
flib_flagsrTrUrjr�zH--((f(77|90)(flags|exec)|opt|arch)=|(debug|noopt|noarch|help-fcompiler))cr�rTr�r�)�_reg4rTrUrj r�cr�rTrTr�)�fc_flagsrTrUrj!r�z--fcompiler=)�	fcompilerzUnknown vendor: "%s"rz--(verbose)cr�rTr�r�)�_reg5rTrUrj=r�cr�rTrTr�)�setup_flagsrTrUrj>r�r�untitled)rrrr)�get_f2py_modulenamerz[.]pyf([.]src|)z[.](o|a|so|dylib)z-I)r�z-Lz-lz-Uz-D�=zInvalid use of -D:)�get_info�include_dirs)�setup�	Extension)	rY�sourcesr��library_dirs�	libraries�
define_macros�undef_macros�
extra_objects�f2py_options)rrz9No %s resources found in system (try `f2py --help-link`)
�buildz--build-tempz--build-basez--build-platlibrz--disable-optimization�	config_fc�	build_ext)�ext_moduleszRemoving build directory %s
rT)*�tempfiler0r�rq�
ValueError�mkdtempr�r�r-r6rn�numpy.distutilsr��load_all_fcompiler_classesr��fcompiler_classrp�lower�KeyError�valuesr.r5�!numpy.distutils.command.build_srcr�r�rmr7�tuple�numpy.distutils.system_infor��get�numpy.distutils.corer�r��numpy.distutils.misc_utilrrr3r8r>�exists�shutil�rmtree)$r�rx�remove_build_dir�	build_dir�fl�a�del_listrir�r��allowed_keys�nv�ov�vmaprPr��optnamer��	pyf_filesrFr�r�r�r�r�r��
name_valuer��num_infor�r��ext_argsrr�n�extr�rT)r�r�r�r�r�r�r�r�r�r�r�rU�run_compile�s:�

�
�

��
��
�




��
�
���r�cCs�dtjdd�vrtj�d�ddlm}|�dSdtjdd�vr/tj�d�t�d�n7dtjdd�vr?tj�d�n'dtjdd�vrUtj�d	�tj�d�nd
tjdd�vretj�d
�n	dtjdd�vrtt	�dSt
tjdd��dS)Nz--help-linkrr��show_allz
--g3-numpyz*G3 f2py support is not implemented, yet.\nz--2e-numericz
--2e-numarrayz
-DNUMARRAYz
--2e-numpyr�)r0r��remover�r��stderrr]r1r-r�r�r�rTrTrU�main�s&
r�r}) �__doc__r0r8�pprintr�rrrrrrrr	r
�versionr/�
numpy_versionr�r]r4�showr3r=rVrar|rrr�r�r�r�r�rTrTrTrU�<module>sL����	$"

C.

https://t.me/RX1948 - 2025