nuitka用法

来源:互联网 发布:c类网络借3位子网划分 编辑:程序博客网 时间:2024/06/02 06:28
Usage: nuitka [--module] [--execute] [options] main_module.py
用法:nuitka [模块] [执行] [选项] main_module.py --

Options:

选项:

  --version             show program's version number and exit

-版本                       显示程序的版本号和退出


  -h, --help            show this help message and exit

h,帮助                 显示此帮助消息并退出


  --module              Create an extension module executable instead of a program. Defaults to off.

-模块                       创建一个扩展模块可执行文件而不是程序。默认关闭。


  --standalone, --portable
                        Enable standalone mode in build. This allows you to transfer the created binary to other machines without  it relying on an existing Python installation. It

                        implies these options: "--recurse-all --recurse-stdlib". You may also want to use "--python-flag=no_site" to avoid the "site.py" module. Defaults to off.

这允许您将所创建的二进制文件转移到其他机器上,而不依赖于现有的Python安装。它意味着这些选项:“————递归递归程序”。你也可以用"--python-flag=no_site" 去避免site.py"模块。默认关闭。


  --nofreeze-stdlib     In standalone mode by default all modules of standard library will be frozen as bytecode. This compiles them all and as a result compilation time will     increase very much.

在独立模式下创建默认的标准库中的所有模块将被冻结的字节码。这将编译它们所有,因此编译时间将大大增加。


  --python-version=PYTHON_VERSION

                        Major version of Python to be used, one of '2.6','2.7', '3.2', '3.3', '3.4', or '3.5'. Defaults to what you run Nuitka with (currently 3.4)

使用的python标志。默认使用你所使用的Nuitka来说,这个执行一个具体的模式。这些选项也存在于标准的Python中。


  --python-debug, --python-dbg

                        Use debug version or not. Default uses what you are using to run Nuitka, most likely a non-debug version.

  --python-flag=PYTHON_FLAGS
                        Python flags to use. Default uses what you are using to run Nuitka, this enforces a specific mode. These  are options that also exist to standard Python

                        executable. Currently supported: "-S" (alias"nosite"), "static_hashes" (not use hash randomization), "no_warnings" (do not give Python runtime warnings), "-O"(alias "noasserts"). Default empty.


  --warn-implicit-exceptions

                        Enable warnings for implicit exceptions detected at compile time.

启用在编译时检测到的隐式异常的警告。


  --warn-unusual-code   Enable warnings for unusual code detected at compile time.
启用在编译时检测到异常代码的警告时间。

  Control the recursion into imported modules:

将递归控制到导入模块中:


    --recurse-stdlib    Also descend into imported modules from standard library. Defaults to off.

标准库下降到导入模块。默认关闭。


    --recurse-none      When --recurse-none is used, do not descend into any  imported modules at all, overrides all other recursion  options. Defaults to off.

当不使用递归,不要陷入任何导入模块时,凌驾于所有其他的递归选项。默认关闭。

    --recurse-all, --recurse-on

                        When --recurse-all is used, attempt to descend into all imported modules. Defaults to off.

当所有使用递归,试图进入所有进口模块。默认关闭。


    --recurse-to=MODULE/PACKAGE

                        Recurse to that module, or if a package, to the whole package. Can be given multiple times. Default empty.

递归,模块,或者一个包,整个包。可以多次给出。默认的空。


    --recurse-not-to=MODULE/PACKAGE

                        Do not recurse to that module, or if a package, to the  whole package in any case, overrides all other options. Can be given multiple times. Default empty.

不用递归,模块,或者一个包,整个包在任何情况下,覆盖所有其他选项。可以多次给出。默认的空。


    --recurse-plugins=MODULE/PACKAGE, --recurse-directory=MODULE/PACKAGE
                        Recurse into that directory, no matter if it's used by the given main program in a visible form. Overrides  all other recursion options. Can be given multiple

                        times. Default empty.

递归目录,无论是由给定的主程序在一个可见的形式。重写所有其他递归选项。可以多次给出。默认的空。


    --recurse-files=PATTERN, --recurse-pattern=PATTERN
                        Recurse into files matching the PATTERN. Overrides all  recursion other options. Can be given multiple times. Default empty.
递归匹配模式的文件。重写所有递归其他选项。可以多次给出。默认的空。

  Immediate execution after compilation:

编译后立即执行:


    --run, --execute    Execute immediately the created binary (or import the compiled module). Defaults to off.

-运行,立即执行创建的二进制文件(或导入编译后的模块)。默认关闭。


    --debugger, --gdb   Execute inside "gdb" to automatically get a stack trace. Defaults to off.

——调试器——GDB在“GDB”内执行,以自动获取堆栈跟踪。默认关闭。


    --execute-with-pythonpath, --keep-pythonpath
                        When immediately executing the created binary (--execute), don't reset PYTHONPATH. When all modules are successfully included, you ought to not need
                        PYTHONPATH anymore.

当立即执行所创建的二进制(--执行),不重新定义。当所有的模块都是成功,你应该不需要再定义。


  Dump options for internal tree:


    --dump-xml, --xml   Dump the final result of optimization as XML, then exit.

将优化的最终结果作为XML转储,然后退出。

    --display-tree      Display the final result of optimization in a GUI,  then exit.
在GUI中显示优化的最终结果,然后退出。

  Code generation choices:


    --full-compat       Enforce absolute compatibility with CPython. Do not   even allow minor deviations from CPython behavior, e.g. better tracebacks, which are not really

                        incompatible, but different. This is intended for tests only and should not be necessary for normal use.

加强与CPython的绝对兼容性。甚至不允许轻微的偏差从CPython的行为,例如更好的回溯,这是不是真的合不来,但不同。这只是用于测试,不应该是正常使用所必需的。


    --file-reference-choice=FILE_REFERENCE_MODE
                        Select what value "__file__" is going to be. With  "runtime" (default for standalone binary mode and module mode), the created binaries and modules, use
                        the location of themselves to deduct the value of   "__file__". Included packages pretend to be in   directories below that location. This allows you to
                        include data files in deployments. If you merely seek    acceleration, it's better for you to use the "original" value, where the source files location will
                        be used. With "frozen" a notation "<frozen   module_name>" is used. For compatibility reasons, the   "__file__" value will always have ".py" suffix
                        independent of what it really is.


  Output directory choices:


    --output-dir=DIRECTORY

                        Specify where intermediate and final output files  should be put. DIRECTORY will be populated with C++  files, object files, etc. Defaults to current directory.

指定中间输出文件和最终输出文件的位置。目录将被填充的C++文件,目标文件,默认为当前目录等。


    --remove-output     Removes the build directory after producing the module  or exe file. Defaults to off.

在生成模块或EXE文件后删除构建目录。默认关闭。



  Debug features:


    --debug             Executing all self checks possible to find errors in  Nuitka, do not use for production. Defaults to off.

执行所有的自我检查可能发现错误在Nuitka,不能用于生产。默认关闭。


    --unstripped, --no-strip, --unstriped

                        Keep debug info in the resulting object file for better debugger interaction. Defaults to off.

保持信息的结果 DEBUG调试对象文件更好的互动。defaults两关。


    --profile           Enable vmprof based profiling of time spent. Defaults  to off.


    --graph             Create graph of optimization process. Defaults to off.

创建优化过程图。默认关闭。

    --trace-execution   Traced execution output, output the line of code  before executing it. Defaults to off.

跟踪执行输出,在执行代码之前输出代码行。默认关闭。


    --recompile-c++-only, --recompile-c-only
                        Take existing files and compile them again.Allows  compiling edited C++ files with the C++ compiler for  quick debugging changes to the generated source.

                        Defaults to off. Depends on compiling Python source to  determine which files it should look at.

把现有的文件和编译一遍。允许编译编辑C++文件的C++编译器的快速调试修改生成的代码。默认关闭。取决于编译Python源代码来决定应该查看哪些文件。


    --generate-c++-only

                        Generate only C++ source code, and do not compile it to binary or module. This is for debugging and code  coverage analysis that doesn't wasteCPU.Defaults to  off.

只生成C++源代码,不编译为二进制或模块。这是用于调试和代码覆盖分析,不浪费cpu默认关闭。


    --experimental      Use features declared as 'experimental'. May have no   effect if no experimental features are present in the
                        code. Defaults to off.

使用声明为“实验”的特性。如果没有实验特征,则可能没有效果。

代码。默认关闭。


  Backend C++ compiler choice:

c++编译器选择

    --clang             Enforce the use of clang (needs clang 3.2 or higher).  Defaults to off.


    --mingw             Enforce the use of MinGW on Windows. Defaults to off.


    --msvc=MSVC         Enforce the use of specific MSVC version on Windows.  Allowed values are e.g. 9.0, 9.0exp, specify an  illegal value for a list of installed compilers.

                        Defaults to the most recent version.


    -j N, --jobs=N      Specify the allowed number of parallel C++ compiler   jobs. Defaults to the system CPU count.


    --lto               Use link time optimizations if available and usable (g++ 4.6 and higher). Defaults to off.


  Tracing features:


    --show-scons        Operate Scons in non-quiet mode, showing the executed  commands. Defaults to off.


    --show-progress     Provide progress information and statistics. Defaults to off.


    --show-memory       Provide memory information and statistics. Defaults to   off.


    --show-modules      Provide a final summary on included modules. Defaults    to off.


    --verbose           Output details of actions taken, esp. in  optimizations. Can become a lot. Defaults to off.


  Windows specific output control:


    --windows-disable-console

                        When compiling for Windows, disable the console window. Defaults to off.

在编译Windows时,禁用控制台窗口。默认关闭。


    --windows-icon=ICON_PATH, --icon=ICON_PATH
                        Add executable icon (Windows only).
图标

  Plugin control:


    --plugin-enable=PLUGINS_ENABLED, --enable-plugin=PLUGINS_ENABLED

                        Enabled plugins. Must be plug-in names. Use --plugin- list to query the full list and exit. Default empty.

启用插件。必须是插件名。使用-插件列表来查询完整的列表并退出。默认的空。


    --plugin-disable=PLUGINS_DISABLED, --disable-plugin=PLUGINS_DISABLED

                        Disabled plugins. Must be plug-in names. Use --plugin- list to query the full list and exit. Default empty.

禁用插件。必须是插件名。使用-插件列表来查询完整的列表并退出。默认的空。


    --plugin-no-detection
                        Plugins can detect if they might be used, and the you   can disable the warning via --plugin-disable=plugin-  that-warned, or you can use this option to disablethe mechanism entirely, which also speeds up compilation  slightly of course as this detection code is run in  vain once you are certain of which plug-ins touse. Defaults to off.
原创粉丝点击