.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4. .TH NUITKA-RUN "1" "January 2019" "nuitka-run 0.6.1.1" "User Commands" .SH NAME nuitka-run \- the Python compiler .SH SYNOPSIS .B nuitka-run [\fI\,options\/\fR] \fI\,main_module.py\/\fR .SH OPTIONS .TP \fB\-\-version\fR show program's version number and exit .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-\-module\fR Create an extension module executable instead of a program. Defaults to off. .TP \fB\-\-standalone\fR 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 option: "\-\-recurse\-all". You may also want to use "\-\-python\-flag=no_site" to avoid the "site.py" module, which can save a lot of code dependencies. Defaults to off. .TP \fB\-\-python\-debug\fR Use debug version or not. Default uses what you are using to run Nuitka, most likely a non\-debug version. .TP \fB\-\-python\-flag\fR=\fI\,PYTHON_FLAGS\/\fR 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. .TP \fB\-\-python\-for\-scons\fR=\fI\,PYTHON_SCONS\/\fR If using Python3.3 or Python3.4, provide the path of a Python binary to use for Scons. Otherwise Nuitka can use what you run Nuitka with or a "scons" binary that is found in PATH, or a Python installation from Windows registry. .TP \fB\-\-warn\-implicit\-exceptions\fR Enable warnings for implicit exceptions detected at compile time. .TP \fB\-\-warn\-unusual\-code\fR Enable warnings for unusual code detected at compile time. .TP \fB\-\-assume\-yes\-for\-downloads\fR Allow Nuitka to download code if necessary, e.g. dependency walker on Windows. .SS Control the inclusion of modules and packages: .BR .TP \fB\-\-include\-package\fR=\fI\,PACKAGE\/\fR Include a whole package. Give as a Python namespace, e.g. ``some_package.sub_package`` and Nuitka will then find it and include it and all the modules found below that disk location in the binary or extension module it creates, and make it available for import by the code. Default empty. .TP \fB\-\-include\-module\fR=\fI\,MODULE\/\fR Include a single module. Give as a Python namespace, e.g. ``some_package.some_module`` and Nuitka will then find it and include it in the binary or extension module it creates, and make it available for import by the code. Default empty. .TP \fB\-\-include\-plugin\-directory\fR=\fI\,MODULE\/\fR/PACKAGE Include the content of 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. .TP \fB\-\-include\-plugin\-files\fR=\fI\,PATTERN\/\fR Include into files matching the PATTERN. Overrides all recursion other options. Can be given multiple times. Default empty. .SS Control the recursion into imported modules: .BR .TP \fB\-\-follow\-stdlib\fR, \fB\-\-recurse\-stdlib\fR Also descend into imported modules from standard library. This will increase the compilation time by a lot. Defaults to off. .TP \fB\-\-nofollow\-imports\fR, \fB\-\-recurse\-none\fR When \fB\-\-recurse\-none\fR is used, do not descend into any imported modules at all, overrides all other recursion options. Defaults to off. .TP \fB\-\-follow\-imports\fR, \fB\-\-recurse\-all\fR When \fB\-\-recurse\-all\fR is used, attempt to descend into all imported modules. Defaults to off. .TP \fB\-\-follow\-import\-to\fR=\fI\,MODULE\/\fR/PACKAGE, \fB\-\-recurse\-to\fR=\fI\,MODULE\/\fR/PACKAGE Recurse to that module, or if a package, to the whole package. Can be given multiple times. Default empty. .TP \fB\-\-nofollow\-import\-to\fR=\fI\,MODULE\/\fR/PACKAGE, \fB\-\-recurse\-not\-to\fR=\fI\,MODULE\/\fR/PACKAGE Do not recurse to that module name, or if a package name, to the whole package in any case, overrides all other options. Can be given multiple times. Default empty. .SS Immediate execution after compilation: .BR .TP \fB\-\-run\fR Execute immediately the created binary (or import the compiled module). Defaults to on. .TP \fB\-\-debugger\fR, \fB\-\-gdb\fR Execute inside "gdb" to automatically get a stack trace. Defaults to off. .TP \fB\-\-execute\-with\-pythonpath\fR When immediately executing the created binary (\fB\-\-execute\fR), don't reset PYTHONPATH. When all modules are successfully included, you ought to not need PYTHONPATH anymore. .SS Dump options for internal tree: .BR .TP \fB\-\-xml\fR Dump the final result of optimization as XML, then exit. .SS Code generation choices: .BR .TP \fB\-\-full\-compat\fR 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. .TP \fB\-\-file\-reference\-choice\fR=\fI\,FILE_REFERENCE_MODE\/\fR 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 "" is used. For compatibility reasons, the "__file__" value will always have ".py" suffix independent of what it really is. .SS Output choices: .BR .TP \fB\-o\fR FILENAME Specify how the executable should be named. For extension modules there is no choice, also not for standalone mode and using it will be an error. This may include path information that needs to exist though. Defaults to on this platform. \&.bin .TP \fB\-\-output\-dir\fR=\fI\,DIRECTORY\/\fR Specify where intermediate and final output files should be put. The DIRECTORY will be populated with C files, object files, etc. Defaults to current directory. .TP \fB\-\-remove\-output\fR Removes the build directory after producing the module or exe file. Defaults to off. .TP \fB\-\-no\-pyi\-file\fR Do not create a ".pyi" file for extension modules created by Nuitka. This is used to detect implicit imports. Defaults to off. .SS Debug features: .BR .TP \fB\-\-debug\fR Executing all self checks possible to find errors in Nuitka, do not use for production. Defaults to off. .TP \fB\-\-unstripped\fR Keep debug info in the resulting object file for better debugger interaction. Defaults to off. .TP \fB\-\-profile\fR Enable vmprof based profiling of time spent. Defaults to off. .TP \fB\-\-graph\fR Create graph of optimization process. Defaults to off. .TP \fB\-\-trace\-execution\fR Traced execution output, output the line of code before executing it. Defaults to off. .TP \fB\-\-recompile\-c\-only\fR 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. .TP \fB\-\-generate\-c\-only\fR 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 waste CPU. Defaults to off. .TP \fB\-\-experimental\fR=\fI\,EXPERIMENTAL\/\fR Use features declared as 'experimental'. May have no effect if no experimental features are present in the code. Uses secret tags (check source) per experimented feature. .SS Backend C compiler choice: .BR .TP \fB\-\-clang\fR Enforce the use of clang (needs clang 3.2 or higher). Defaults to off. .TP \fB\-\-mingw64\fR Enforce the use of MinGW64 on Windows. Defaults to off. .TP \fB\-\-msvc\fR=\fI\,MSVC\/\fR Enforce the use of specific MSVC version on Windows. Allowed values are e.g. 14.0, specify an illegal value for a list of installed compilers. Defaults to the most recent version. .TP \fB\-j\fR N, \fB\-\-jobs\fR=\fI\,N\/\fR Specify the allowed number of parallel C compiler jobs. Defaults to the system CPU count. .TP \fB\-\-lto\fR Use link time optimizations if available and usable (gcc 4.6 and higher). Defaults to off. .SS Tracing features: .BR .TP \fB\-\-show\-scons\fR Operate Scons in non\-quiet mode, showing the executed commands. Defaults to off. .TP \fB\-\-show\-progress\fR Provide progress information and statistics. Defaults to off. .TP \fB\-\-show\-memory\fR Provide memory information and statistics. Defaults to off. .TP \fB\-\-show\-modules\fR Provide a final summary on included modules. Defaults to off. .TP \fB\-\-verbose\fR Output details of actions taken, esp. in optimizations. Can become a lot. Defaults to off. .SS Windows specific output control: .BR .TP \fB\-\-windows\-disable\-console\fR When compiling for Windows, disable the console window. Defaults to off. .TP \fB\-\-windows\-icon\fR=\fI\,ICON_PATH\/\fR Add executable icon (Windows only). .SS Plugin control: .BR .TP \fB\-\-plugin\-enable\fR=\fI\,PLUGINS_ENABLED\/\fR, \fB\-\-enable\-plugin\fR=\fI\,PLUGINS_ENABLED\/\fR Enabled plugins. Must be plug\-in names. Use \fB\-\-pluginlist\fR to query the full list and exit. Default empty. .TP \fB\-\-plugin\-disable\fR=\fI\,PLUGINS_DISABLED\/\fR, \fB\-\-disable\-plugin\fR=\fI\,PLUGINS_DISABLED\/\fR Disabled plugins. Must be plug\-in names. Use \fB\-\-pluginlist\fR to query the full list and exit. Default empty. .TP \fB\-\-plugin\-no\-detection\fR Plugins can detect if they might be used, and the you can disable the warning via \fB\-\-plugin\-disable\fR=\fI\,pluginthat\-warned\/\fR, or you can use this option to disable the 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 to use. Defaults to off. .TP \fB\-\-plugin\-list\fR Show list of all available plugins and exit. Defaults to off. .TP \fB\-\-user\-plugin\fR=\fI\,USER_PLUGINS\/\fR The file name of user plugin. Can be given multiple times. Default empty. .PP Python: 3.5.3 (default, Sep 27 2018, 17:25:39) Executable: \fI\,/usr/bin/python3\/\fP OS: Linux Arch: armv7l .SH EXAMPLES Compile a Python file "some_module.py" to a module "some_module.so": .IP \f(CW$ nuitka \-\-module some_module.py\fR .PP Compile a Python program "some_program.py" to an executable "some_program.exe": .IP \f(CW$ nuitka some_program.py\fR .PP Compile a Python program "some_program.py" and the package "some_package" it uses to an executable "some_program.exe": .IP \f(CW$ nuitka \-\-recurse\-to=some_package some_program.py\fR .PP Compile a Python program "some_program.py" and all the modules it uses to an executable "some_program.exe". Then execute it immediately when ready: .IP \f(CW$ nuitka \-\-run \-\-recurse\-all some_program.py\fR .PP Compile a Python program "some_program.py" and the modules it uses (even standard library) to an executable "some_program.exe": .IP \f(CW$ nuitka \-\-recurse\-all \-\-recurse\-stdlib some_program.py\fR .PP Compile a Python program "some_program.py" and the modules it uses to an executable "some_program.exe". Keep the debug information, so valgrind, gdb, etc. work nicely. Note: This will *not* degrade performance: .IP \f(CW$ nuitka \-\-unstriped \-\-recurse\-all some_program.py\fR .PP Compile a Python program "some_program.py" and the modules it uses to an executable "some_program.exe". Perform all kinds of checks about correctness of the generated C and run\-time checks. Note: This will degrade performance and should only be used to debug Nuitka: .IP \f(CW$ nuitka \-\-debug \-\-recurse\-all some_program.py\fR .PP Compile a Python program "some_program.py" and the modules it uses to an executable "some_program.exe". Perform all kinds of checks about correctness of the generated C and run\-time checks. Also use the debug Python library, which does its own checks. Note: This will degrade performance and should only be used to debug Nuitka: .IP \f(CW$ nuitka \-\-debug \-\-python-debug \-\-recurse\-all some_program.py\fR .PP Compile a Python program "some_program.py" and the plugins modules it loads at run time to an executable "some_program.exe": .IP \f(CW$ nuitka \-\-recurse\-all \-\-recurse\-directory=plugins_dir some_program.py\fR .PP