Your IP : 216.73.216.213
B
Z��Z# � @ s@ d dl mZ d dlZd dlZddlmZ dZdd� Zdd � ZdS )
� )�absolute_importN� )�OptionsaD
Cython (http://cython.org) is a compiler for code written in the
Cython language. Cython is based on Pyrex by Greg Ewing.
Usage: cython [options] sourcefile.{pyx,py} ...
Options:
-V, --version Display version number of cython compiler
-l, --create-listing Write error messages to a listing file
-I, --include-dir <directory> Search for include files in named directory
(multiple include directories are allowed).
-o, --output-file <filename> Specify name of generated C file
-t, --timestamps Only compile newer source files
-f, --force Compile all source files (overrides implied -t)
-v, --verbose Be verbose, print file names on multiple compilation
-p, --embed-positions If specified, the positions in Cython files of each
function definition is embedded in its docstring.
--cleanup <level> Release interned objects on python exit, for memory debugging.
Level indicates aggressiveness, default 0 releases nothing.
-w, --working <directory> Sets the working directory for Cython (the directory modules
are searched from)
--gdb Output debug information for cygdb
--gdb-outdir <directory> Specify gdb debug information output directory. Implies --gdb.
-D, --no-docstrings Strip docstrings from the compiled module.
-a, --annotate Produce a colorized HTML version of the source.
--annotate-coverage <cov.xml> Annotate and include coverage information from cov.xml.
--line-directives Produce #line directives pointing to the .pyx source
--cplus Output a C++ rather than C file.
--embed[=<method_name>] Generate a main() function that embeds the Python interpreter.
-2 Compile based on Python-2 syntax and code semantics.
-3 Compile based on Python-3 syntax and code semantics.
--lenient Change some compile time errors to runtime errors to
improve Python compatibility
--capi-reexport-cincludes Add cincluded headers to any auto-generated header files.
--fast-fail Abort the compilation on the first error
--warning-errors, -Werror Make all warnings into errors
--warning-extra, -Wextra Enable extra warnings
-X, --directive <name>=<value>[,<name=value,...] Overrides a compiler directive
c C s t j�t� t �d� d S )Nr )�sys�stderr�write�usage�exit� r
r
�J/opt/alt/python37/lib64/python3.7/site-packages/Cython/Compiler/CmdLine.py� bad_usage; s r c
s� ddl m}m} g �� �fdd��d;� �fdd� }�fdd�}||�}g }�x$� �rp� d �d
��rb�� }|dkr|d|_�qn|dkr�d|_�qn|d
kr�d|_�qn|dkr�|d�t_�qn|�d�r�|j �
||�� �qn|dkr�|j �
|� � �qn|dk�r|� |_�qn|dk�r|� |_�qn|dk�r.d|_
�qn|dk�rBd |_
�qn|dk�r^| jd7 _�qn|dk�rrdt_�qn|dk�r�|� t_�qn|dk�r�t|� �t_�qn|dk�r�dt_�qn|dk�r�dt_�qn|dk�r�dt_|� t_�qn|dk�r�dt_�qn|d k�rd|_�qn|d!k�r"d|_�qn|d"k�r>d|_tj|_�qn|d#k�rZd|_|� |_�qn|d$k�rtdt_dt_�qn|d%k�r�d&|_�qn|d'k�r�d(|_�qn|d)k�r�d|_ �qn|d*k�r�dt_!�qn|d+k�r�dt_"�qn|d,k�r�dt_#�qn|d-k�r|j$�%tj&� �qn|d.k�rdt_'�qn|d/k�s2|�d0��r�|�d0��r^|d&d � �(� �r^|d&d � }n|� }ytj)|d|j$d1�|_$W nD t*k
�r� } z$t+j,�-d2| j.d � t+�/d� W d d } ~ X Y nX n�|�d3��r$|d&d � �0d
d4�}dd5l1m2}
|t3|
�k�rt4|
|d� nt+j,�-d6| � t5� n<|d7k�rFt+j6�-t7� t+�/d � nt+j,�-d8| � t+�/d� qN|�
�� � qNW ��r~t5� |j�r�t8|�dk�r�t+j,�-d9� t+�/d� t8|�d k�r�|j�s�t5� tj�r�t8|�dk�r�t+j,�-d:� t+�/d� ||fS )<Nr )�CompilationOptions�default_optionsc sV � r�rt � d� d krL� d �d�rL� �d��dd�\} }��|� | S � �d�S )N�=r z--r )r �
startswith�pop�split�append)�name�value)�args�pending_argr
r �pop_argE s
z#parse_command_line.<locals>.pop_argc s, �r�� � S | d k r| S � s"t� � � d�S )Nr )r r )�default)r r r
r � pop_valueN s z%parse_command_line.<locals>.pop_valuec s | dd � }|r|S � � S d S )N� r
)�option�tail)r r
r � get_paramW s z%parse_command_line.<locals>.get_paramr �-)z-Vz --version)z-lz--create-listing)z-+z--cplusz--embed�mainz-Iz
--include-dir)z-wz --working)z-oz
--output-file)z-tz--timestamps)z-fz--force)z-vz --verbose)z-pz--embed-positions)z-zz--pre-importz --cleanup)z-Dz--no-docstringsF)z-az
--annotateTz--annotate-coveragez--convert-rangez--line-directivesz--no-c-in-tracebackz--gdbz--gdb-outdirz --lenientz-2r z-3� z--capi-reexport-cincludesz--fast-failz--cimport-from-pyx)z-Werrorz--warning-errors)z-Wextraz--warning-extraz--old-style-globalsz--directivez-X)Zrelaxed_boolZcurrent_settingsz Error in compiler directive: %s
z--debug�_)�
DebugFlagszUnknown debug flag: %s
)z-hz--helpzUnknown compiler flag: %s
z3cython: Only one source file allowed when using -o
z7cython: Only one source file allowed when using -embed
)N)9ZMainr
r r Zshow_version�use_listing_file�cplusr Zembed�include_pathr Zworking_path�output_fileZ
timestamps�verboseZembed_pos_in_docstringZ
pre_import�intZgenerate_cleanup_codeZ
docstringsZannotateZannotate_coverage_xmlZ
convert_range�
emit_linenums�c_line_in_traceback� gdb_debug�os�curdir�
output_dirZerror_on_unknown_namesZerror_on_uninitializedZlanguage_levelZcapi_reexport_cincludesZ fast_failZcimport_from_pyxZwarning_errors�compiler_directives�updateZextra_warningsZold_style_globals�stripZparse_directive_list�
ValueErrorr r r r r �replace� r# �dir�setattrr �stdoutr �len)r r
r r r �options�sourcesr Zx_args�er# r
)r r r r �parse_command_line@ s�
r= ) �
__future__r r- r r5 r r r r= r
r
r
r �<module> s )