Nuitka: a Python compiler written in Python

Last modified on June 17, 2021

doc/images/Nuitka-Logo-Symbol.png

Overview

This doc is the suggested first learn while you happen to might perhaps perhaps very nicely be drawn to
utilizing Nuitka, understand its use circumstances, check what which it's advisable to to anticipate,
license, necessities, credit score rating, and so on.

Nuitka is the Python compiler. It's written in Python. It's a
seamless substitute or extension to the Python interpreter and compiles
each catch that CPython 2.6, 2.7, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8,
3.9 embrace, when itself flee with that Python mannequin.

It then executes uncompiled code and compiled code collectively in an
terribly nicely succesful method.

It's possible you will perhaps perhaps be prepared to make use of all Python library modules and all extension modules freely.

Nuitka interprets the Python modules right into a C stage program that then
makes use of libpython and static C knowledge of its dangle to supply in the similar
method as CPython does.

All optimization is aimed toward keeping off overhead, the place or not it's pointless.
None is aimed toward inserting off compatibility, though microscopic enhancements
will as soon as in a while be carried out, the place not each malicious program of favourite Python is
emulated, e.g. extra complete error messages are given, however there may be a
chunky compatibility mode to disable even that.

Utilization

Requirements

  • C Compiler: You want a compiler with improve for C11 or alternatively
    for C++03 [1]

    For the time being this means, or not it's important to make use of 1 amongst these compilers:

    • The gcc compiler of as a minimal mannequin 5.1, or the g++
      compiler of as a minimal mannequin 4.Four as an totally different.
    • The clang compiler on macOS X and FreeBSD.
    • The MinGW64 C11 compiler on Windows, should be in accordance to gcc Eight or
      elevated. It'll be mechanically downloaded if not came upon, which is
      the suggested method of putting in it.
    • Visual Studio 2019 or elevated on Windows [2], older variations will
      work however solely supported for industrial clients. Configure to utilize the
      English language pack for many gripping outcomes (Nuitka filters away
      garbage outputs, however moral for that language).
    • On Windows the clang-cl compiler on Windows may even be previous if
      provided by the Visual Studio installer.
  • Python: Version 2.6, 2.7 or 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9

    For Python 3.3/3.Four and solely these, we choose assorted Python mannequin as a compile time dependency.

    Nuitka itself is absolutely nicely succesful with all listed variations, however
    Scons as an internally previous system is not.

    For these variations, you want a Python2 or Python 3.5 or elevated
    put in as nicely, however solely right through the compile time solely. That is
    to be used with Scons (which orchestrates the C compilation), which
    does not improve the similar Python variations as Nuitka.

    As nicely as, on Windows, Python2 can not be previous as a result of
    clcache does not work with it, there a Python 3.5 or elevated
    desires to be put in.

    Nuitka finds these wished Python variations (on Windows through
    registry) and also you should not glimpse it as prolonged as they're
    put in.

    Though-provoking binaries to assorted machines

    The created binaries may even be made executable sincere of the
    Python arrange, with --standalone and --onefile
    alternate options.

    Binary filename suffix

    The created binaries embrace an .exe suffix on Windows. On assorted
    platforms they produce not embrace any suffix for standalone mode, or .bin
    suffix, that it's in all probability going you will perhaps perhaps nicely very nicely be free to handle or commerce, or specify with the
    -o risk.

    The suffix for acceleration mode is added moral to make sure that the
    customary script title and the binary title produce not ever collide, so
    we are able to safely produce an overwrite with out destroying the customary
    supply file.

    It has to be CPython, Anaconda Python.

    You want the routine Python implementation, generally known as "CPython", to
    produce Nuitka, as a result of it's intently tied to implementation
    important elements of it.

    On Windows, for Python not put in system-large and acceleration
    mode, or not it's important to repeat the PythonXX.DLL alongside it,
    one factor Nuitka does mechanically.

    It can not be from Windows app retailer

    It's recognized that Windows app retailer Python positively does not
    work, or not it's checked towards. And on macOS "pyenv" possible does
    not work.

  • Working Machine: Linux, FreeBSD, NetBSD, macOS X, and Windows (32/64
    bits).

    Others might perhaps perhaps work as nicely. The portability is anticipated to be usually
    moral, nevertheless the e.g. Scons utilization might perhaps perhaps nicely have to be tailor-made. Accumulate sure to
    match Windows Python and C compiler construction, or else you will
    catch cryptic error messages.

  • Architectures: x86, x86_64 (amd64), and arm, possible many extra

    Numerous architectures are anticipated to moreover work, out of the sphere, as
    Nuitka is generally not utilizing any {hardware} specifics. These are moral
    those examined and recognized to be moral. Feedback is welcome. In general,
    the architectures that Debian helps may even be perception about moral and
    examined too.

[1]

Give a improve to for this C11 is a given with gcc 5.x or elevated or any clang
mannequin.

The MSVC compiler would not produce it but. But as a workaround, because the C++03
language routine is very overlapping with C11, it's then previous as an totally different
the place the C compiler is simply too feeble. Nuitka previous to require a C++ compiler
before now, nevertheless it modified.

[2]

Download with out price from
http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx
(the Squawk editions work moral glowing).

Potentially probably the most modern mannequin is suggested however not required. On the numerous hand,
there may be not any should apart from pre-Windows 10 improve, and so they'll work
for you, however improve of these configurations is totally available to
industrial clients.

Pronounce Line

The suggested method of executing Nuitka is -m
nuitka
to be fully decided which Python interpreter it's in all probability going you will perhaps perhaps nicely very nicely be
utilizing, so it's easier to match with what Nuitka has.

The subsequent most gripping method of executing Nuitka bare that's from a supply
checkout or archive, with out a environment variable changes, most
noteworthy, you produce not want to mess with PYTHONPATH at desirous about
Nuitka. You moral produce the nuitka and nuitka-flee scripts
without delay with none changes to the environment. It's possible you will perhaps perhaps nicely have an curiosity so as to add the
bin listing to your PATH to your consolation, however that step
is non-mandatory.

Furthermore, while you happen to might perhaps perhaps very nicely have an interest to supply with the edifying interpreter, in that
case, assure to supply bin/nuitka and be moral.

Take the edifying Interpreter

Whilst you stumble upon a SyntaxError you fully most fully
embrace picked the fallacious interpreter for this system it's in all probability going you will perhaps perhaps nicely very nicely be
compiling.

Nuitka has a --assist risk to output what it'll produce:

The nuitka-flee reveal is the similar as nuitka, however with a
assorted default. It tries to compile and without delay produce a Python
script:

This risk that's assorted is --flee, and passing on arguments
after the primary non-possibility to the created binary, so it's critically extra
very similar to what simple python will produce.

Installation

For most packages, there'll possible be packages on the obtain web page of Nuitka. But which it's advisable to to
moreover set up it from supply code as described above, however moreover get pleasure from each
assorted Python program it could even be put in through the routine python
setup.py set up
routine.

License

Nuitka is licensed beneath the Apache License, Version 2.0; it's in all probability going you will perhaps perhaps nicely not
use it apart from in compliance with the License.

You can set a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0

Except required by related legislation or agreed to in writing, utility
distributed beneath the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, both recount or implied.
Gape the License for the actual language governing permissions and
limitations beneath the License.

Tutorial Setup and originate on Windows

Here's routine steps while you happen to do not embrace one factor else put in, clearly while you happen to will embrace
any of the components, moral skip it.

Setup

Set up Python

  • Download and set up from https://www.python.org/downloads/home home windows
  • Take one amongst Windows x86-64 internet-primarily based mostly fully installer (64 bits
    Python, suggested) or x86 executable (32 bits Python)
    installer.
  • Take a take a look at utilizing reveal python --model.

Set up Nuitka

  • python -m pip set up nuitka
  • Take a take a look at utilizing reveal python -m nuitka --model

Write some code and check

Produce a folder for the Python code

  • mkdir Good dayWorld
  • make a python file named howdy.py
def focus on(message):
    return "Talk about " + message


def predominant():
    print(focus on("Howdy World"))


if __name__ == "__main__":
    predominant()

Take a take a look at your program

Construct as you in most circumstances would. Working Nuitka on code that works incorrectly
is not easier to debug.


Develop it utilizing

python -m nuitka --mingw64 howdy.py

Indicate

This might perhaps perhaps perhaps urged you to obtain a C caching system (to creep up
repeated compilation of generated C code) and a MinGW64 based totally fully C
compiler. Teach sure to these.

Whilst you like to incorporate chunky output from the C compilation add
--display-scons, however that ought to simply be necessary while you happen to will embrace errors.

Bustle it

Construct the howdy.exe created attain howdy.py.

Distribute

To distribute, originate with --standalone risk, which is not going to output
a single executable, however a complete folder. Reproduction the ensuing
howdy.dist folder to the numerous machine and flee it.

You can are trying --onefile which does catch a single file, however make
sure that the mere standalone is working, sooner than turning to it, as a result of it
will make the debugging solely extra sturdy, e.g. in case of lacking information knowledge.

Utilize Cases

Utilize Case 1 - Program compilation with all modules embedded

Whilst it's in all probability going you will perhaps perhaps nicely choose to compile a complete program recursively, and not solely the
single file that's the predominant program, produce it get pleasure from this:

python -m nuitka --educate-imports program.py

Indicate

There are extra glowing grained controls than --educate-imports
available. Take into accounts the output of nuitka --assist. Including much less
modules into the compilation, however as an totally different utilizing routine Python for it
will make it sooner to compile.

Must it's in all probability going you will perhaps perhaps nicely embrace a supply listing with dynamically loaded knowledge, i.e.
one which might not be came upon by recursing after routine import statements
through the PYTHONPATH (which might perhaps perhaps nicely be the suggested method), which it's advisable to to
typically require that a given listing shall moreover be included in the
executable:

python -m nuitka --educate-imports --consist of-plugin-directory=plugin_dir program.py

Indicate

Whilst you produce not produce any dynamic imports, merely environment your
PYTHONPATH at compilation time is what you should peaceful produce.

Utilize --consist of-plugin-directory provided that you simply simply're making __import__()
calls that Nuitka can not predict, as a result of they e.g. rely on reveal
line parameters. Nuitka moreover warns about these, and show the
risk.

Indicate

The ensuing filename will possible be program.exe on Windows,
program.bin on assorted platforms.

Indicate

The ensuing binary peaceful rely on CPython and previous C extension
modules being put in.

Whilst it's in all probability going you will perhaps perhaps nicely choose in order to repeat it to 1 extra machine, use
--standalone and reproduction the created program.dist listing and
produce the program.exe (Windows) or program (assorted
platforms) put inside.

Utilize Case 2 - Extension Module compilation

Whilst it's in all probability going you will perhaps perhaps nicely choose to compile a single extension module, all it's in all probability going you will perhaps perhaps nicely want to produce is
this:

python -m nuitka --module some_module.py

The ensuing file some_module.so can then be previous as an totally different of
some_module.py.

Indicate

It be left as an notify to the reader, to look out out what occurs if
each are price.

Indicate

The risk --educate-imports and various variants work as nicely, however
the included modules will solely become importable after you imported
the some_module title.

Indicate

The ensuing extension module can solely be loaded right into a CPython of
the similar mannequin and would not consist of various extension modules.

Utilize Case 3 - Package deal compilation

If or not it's important to compile a complete package and embed all modules, that's
moreover possible, use Nuitka get pleasure from this:

python -m nuitka --module some_package --consist of-kit=some_package

Indicate

The recursion into the package listing desires to be provided
manually, in each different case, the package is empty. Files knowledge positioned inside
the package might perhaps perhaps not be embedded but.

Utilize Case 4 - Program Distribution

For distribution to assorted packages, there may be the standalone mode which
produces a folder for which which it's advisable to to specify --standalone.

python -m nuitka --standalone program.py

Apply all imports is default in this mode. It's possible you will perhaps perhaps be able to selectively exclude
modules by notably asserting --nofollow-import-to, however then an
ImportError will possible be raised when import of it's tried at program
runtime.

For information knowledge to be included, use the chance
--consist of-knowledge-file== the place the supply is a file
system course, however goal have to be specified relative. For standalone you
can moreover copy them manually, however this could produce additional exams, and for
onefile mode, there may be not any handbook copying possible.

To copy some or all file in a listing, use the chance
--consist of-knowledge-file=/and so on/*.txt=and so on/ the place you catch to specify shell
patterns for the data, and a subdirectory the place to put them, indicated
by the trailing gash.

To copy a complete folder with all knowledge, it's advisable to make the most of
--consist of-knowledge-dir=/course/to/pictures=pictures which is able to copy all knowledge
together with a means subdirectory development. It's possible you will perhaps perhaps nicely not filter proper right here,
i.e. while you happen to choose solely a partial copy, handle the data beforehand.

For package information, there may be a larger method, utilizing
--consist of-kit-knowledge which detects information knowledge of packages
mechanically and copies them over. It even accepts patterns in shell
vogue.

With information knowledge, it's in all probability going you will perhaps perhaps nicely very nicely be largely in your dangle. Nuitka retains music of ones
which might perhaps perhaps nicely be wished by authentic packages, nevertheless it might perhaps perhaps nicely be incomplete. Elevate
factors while you happen to stumble upon one factor in these.

When that's working, it's advisable to make the most of the onefile mode while you happen to so need.

python -m nuitka --onefile program.py

This might perhaps perhaps perhaps catch a single binary, which on Linux is not going to even unpack
itself, however as an totally different loop help mount its contents as a filesystem and use
that.

On Windows, there are two modes, one which is copying it to the AppData
of your organization specified, to moreover use it as a cache, and one which does
it in the non eternal listing. You want to produce one this this.

# Produce a binary that unpacks right into a non eternal folder
python -m nuitka --onefile program.py

Indicate

There are extra Windows explicit alternate options, e.g. related to icons, however
moreover extra mannequin information, keep in mind the --assist output for the
important elements of these.

One extra time, on Windows, for the non eternal file listing, by default the person
one is previous, nevertheless that's overridable with a course specification given
in --house windows-onefile-tempdir-spec=%TEMPpercentonefile_percentPIDpercent_percentTIME% which
is the default and asserts that the non eternal directories created can not
collide.

For the time being these expanded tokens are available:

TokenWhat this Expands toInstance
%TEMP%Particular individual non eternal file listingC:Customers...AppDataLocalsTemp
%PID%Process ID2772
%TIME%Time in seconds because the epoch.1299852985
%PROGRAM%Stout program filename of executable.C:SomeThe placeYourOnefile.exe

Indicate

It's your responsibility to make the breeze provided extraordinary, on
Windows a working program will possible be locked, and whereas utilizing a mounted
folder title might be going, it'll motive locking factors if that is the case,
the place this system will get restarted.

On the general or not it's important to utilize %TIME% or as a minimal %PID% to make a
course extraordinary, and that is largely meant to be used circumstances, the place e.g.
you like points to remain in a location you are taking out or abide your naming
conventions.

Conventional Complications

Dynamic sys.course

In case your script modifies sys.course to e.g. insert directories with
supply code relative to it, Nuitka will presently not be prepared to check
these. Alternatively, while you happen to residence the PYTHONPATH to the ensuing fee,
you will be able to compile it.

Missing information knowledge in standalone

In case your program fails to file information, it'll motive every kind of various
behaviours, e.g. a package might perhaps perhaps nicely complain it's not the edifying mannequin,
as a result of a VERSION file check defaulted to unknown. The absence of
icon knowledge or help texts, might perhaps perhaps elevate extraordinary errors.

On the general the error paths for knowledge not being price are even buggy and
will price programming errors get pleasure from unbound native variables. Please be taught about
fastidiously at these exceptions retaining in thoughts that that is in a place to perhaps perhaps nicely be the
motive. Whilst you program works with out standalone, chance is information knowledge
might perhaps perhaps be motive.

Missing DLLs in standalone

Nuitka has plugins that handle copying DLLs. For NumPy, SciPy,
Tkinter, and so on.

These want particular remedy in order to flee on assorted packages.
Manually copying them is not ample and might given extraordinary errors.
As quickly as in a while extra modern mannequin of packages, esp. NumPy may even be unsupported. In
this case you will want to interact a issue, and use the older one.

Dependency mosey in standalone

Some packages are a single import, however to Nuitka imply that greater than a
thousand packages (really) are to be included. The prime instance of
Pandas, which does have an curiosity to run and use moral about each factor which it's advisable to to
issue in. A few frameworks for syntax highlighting each factor
that it's in all probability going you will assume of choose time.

Nuitka will want to be taught environment friendly caching to handle with this in the
future. Appropriate now, you will want to handle with mountainous compilation instances for
these.

For now, a important weapon in combating dependency creap desires to be utilized,
specifically the anti-bloat plugin, which presents gripping skills,
that may even be put to utilize and block unneeded imports, giving an error for
the place they happen. Utilize it e.g. get pleasure from this --enable-plugin=anti-bloat
--noinclude-pytest-mode=nofollow --noinclude-setuptools-mode=nofollow

and check its help output. It can choose for each module of your choice,
e.g. forcing moreover that PyQt5 is perception about uninstalled for standalone
mode.

Onefile: Finding knowledge

There could possibly be a distinction between sys.argv[0] and __file__ of the
predominant module for onefile extra, that's precipitated by using a bootstrap to a
non eternal location. The predominant one stands out because the customary executable course,
the place because the 2nd one stands out because the non eternal or eternal course the
bootstrap executable unpacks to. Files knowledge will possible be in the later
location, your customary environment knowledge will possible be in the extinct
location.

Given 2 knowledge, one which you anticipate to be attain your executable, and one
which you anticipate to be inside the onefile binary, entry them get pleasure from this.

# This might perhaps perhaps perhaps rating a file attain your onefile.exe
delivery(os.course.be a a part of(os.course.dirname(sys.argv[0]), "user-supplied-file.txt"))
# This might perhaps perhaps perhaps rating a file inside your onefile.exe
delivery(os.course.be a a part of(os.course.dirname(__file__), "user-supplied-file.txt"))

Windows Applications with out console give no errors

For debugging capabilities, handle --house windows-disable-console or use the
alternate options --house windows-force-stdout-spec and
--house windows-force-stderr-spec with paths as documented for
--house windows-onefile-tempdir-spec above.

Guidelines

Nuitka Alternatives in the code

There could possibly be improve for conditional alternate options, and alternate options utilizing pre-outlined
variables, that's an instance:

# Compilation mode, improve OS explicit.
# nuitka-project-if: {OS} in ("Windows", "Linux", "Darwin", "FreeBSD"): 
#    nuitka-project: --onefile
# nuitka-project-if: {OS} not in ("Windows", "Linux", "Darwin", "FreeBSD"): 
#    nuitka-project: --standalone

# The PySide2 plugin covers qt-plugins
# nuitka-project: --enable-plugin=pyside2
# nuitka-project: --consist of-qt-plugins=shimmering,qml

The suggestions should be a delivery of line, and indentation is to be previous, to
conclude a conditional block, primary get pleasure from in Python. There are presently no
assorted key phrases than the previous ones demonstrated above.

VariableWhat this Expands toInstance
{OS}Name of the OS previousLinux, Windows, Darwin,
FreeBSD, OpenBSD
{Version}Version of Nuitka(0, 6, 14)
{Arch}Architecture previousx86_64, arm64, and so on.
{MAIN_DIRECTORY}Checklist of the compiled filesome_dir/maybe_relative

Python reveal line flags

For passing points get pleasure from -O or -S to Python, to your compiled
program, there may be a reveal line risk title --python-flag= which
makes Nuitka emulate these alternate options.

The protected ones are supported, extra can fully be added.

Caching compilation outcomes

The C compiler, when invoked with the similar enter knowledge, will choose a prolonged
time and far CPU to compile time and again. Accumulate sure it's in all probability going you will perhaps perhaps nicely very nicely be having
ccache put in and configured when utilizing gcc (even on Windows). It
will make repeated compilations primary sooner, even if points are actually not but
not very most gripping, i.e. changes to this system can motive many C knowledge to
commerce, requiring a model new compilation as an totally different of utilizing the cached outcome.

On Windows, with gcc Nuitka helps utilizing ccache.exe which that is in a place to perhaps perhaps
provide to obtain from an kindly supply and it mechanically. Here's
the suggested method of utilizing it on Windows, as assorted variations can e.g.
dangle.

Nuitka will take up ccache if or not it's in came upon in system PATH, and
that is in a place to perhaps perhaps nicely even be prone to make if by environment
NUITKA_CCACHE_BINARY to the chunky course of the binary, that's to be used
in CI packages.

For the MSVC compilers and ClangCL setups, utilizing the clcache is
automated and included in Nuitka.

Adjust the place Caches are dwelling

The storage for cache outcomes of every kind, downloads, cached
compilation outcomes from C and Nuitka, is completed in a platform dependent
listing as excellent by the appdirs package. Alternatively, which it's advisable to to
override it with environment the environment variable NUITKA_CACHE_DIR
to a incorrect listing. Here's to be used in environments the place the home
listing is not persevered, however assorted paths are.

Runners

Defend a good distance from working the nuitka binary, doing python -m nuitka will
make a 100% sure it's in all probability going you will perhaps perhaps nicely very nicely be utilizing what you belief you studied it's in all probability going you will perhaps perhaps nicely very nicely be. The use of the fallacious
Python will make it give you SyntaxError for moral code or
ImportError for put in modules. That is happening, while you happen to flee
Nuitka with Python2 on PythonThree code and vice versa. By explicitly
calling the similar Python interpreter binary, you keep away from that disclose
fully.

Quickest C Compilers

The quickest binaries of pystone.exe on Windows with 64 bits Python
proved to be vastly sooner with MinGW64, roughly 20% larger
rating. So it's suggested to be used over MSVC. The use of clang-cl.exe of
Clang7 modified into as soon as earlier than MSVC, however peaceful vastly slower than
MinGW64, and that is in a place to perhaps perhaps be extra sturdy to utilize, so it's not suggested.

On Linux for pystone.bin the binary produced by clang6 modified into as soon as
earlier than gcc-6.3, however not by a important margin. Since gcc is
extra usually already put in, that's suggested to utilize for now.

Differences in C compilation instances embrace not but been examined.

Unexpected Slowdowns

The use of the Python DLL, get pleasure from routine CPython does may result in sudden
slowdowns, e.g. in uncompiled code that works with Unicode strings. This
is as a result of calling to the DLL reasonably than residing in the DLL causes
overhead, and this even occurs to the DLL with itself, being slower,
than a Python all contained in one binary.

So if possible, intention at static linking, which is presently solely possible
with Anaconda Python on non-Windows.

Standalone executables and dependencies

The method of organising standalone executables for Windows traditionally
entails utilizing an exterior dependency walker in disclose to repeat necessary
libraries alongside with the compiled executables to the distribution
folder.

There could possibly be a great deal of methods to look out that one factor is lacking. Construct not
manually copy points into the folder, esp. not DLLs, as that's not going
to work. As an totally different make malicious program stories to catch these handled by Nuitka
nicely.

Windows errors with sources

On Windows, the Windows Defender system and the Windows Indexing Provider
each scan the freshly created binaries, whereas Nuitka must work with
it, e.g. together with extra sources, after which combating operations randomly
as a consequence of retaining locks. Accumulate sure to exclude your compilation stage from
these services.

Windows standalone program redistribuation

Whether compiling with MingW or MSVC, the standalone packages embrace
exterior dependencies to Visual C Runtime libraries. Nuitka tries to
ship these dependent DLLs by copying them out of your system.

Starting put with Microsoft Windows 10, Microsoft ships ucrt.dll
(In vogue C Runtime libraries) which rehook calls to
api-ms-crt-*.dll.

With earlier Windows platforms (and wine/ReactOS), it's in all probability going you will perhaps perhaps nicely like to recollect
putting in Visual C Runtime libraries sooner than executing a Nuitka
standalone compiled program.

Looking on the previous C compiler, you will want the next redist
variations:

Visual C mannequinRedist YearCPython
14.220193.5, 3.6, 3.7, 3.8, 3.9
14.120173.5, 3.6, 3.7, 3.8
14.020153.5, 3.6, 3.7, 3.8
10.020103.3, 3.4
9.020082.6, 2.7

When utilizing MingGW64, you will want the next redist variations:

MingGW64 mannequinRedist YearCPython
8.1.020153.5, 3.6, 3.7, 3.8, 3.9

As quickly because the corresponding runtime libraries are put in on the goal
system, it's in all probability going you will perhaps perhaps nicely handle all api-ms-crt-*.dll knowledge out of your Nuitka
compiled dist folder.

Detecting Nuitka at flee time

It would not put of dwelling sys.frozen not like assorted devices. For Nuitka, now we embrace
the module attribute __compiled__ to check if a particular module modified into as soon as
compiled.

The put to plug subsequent

Be aware, this mission is not achieved but. Although the CPython check
suite works attain very most gripping, there may be peaceful extra work wished, esp. to make
it produce extra optimization. Strive it out.

Apply me on Twitter

Nuitka bulletins and gripping stuff is pointed to on the Twitter
fable, however clearly with out a important elements. @KayHayen.

I might not reply Nuitka factors through Twitter though, reasonably make
occasional polls, and provides important bulletins, in addition to low-stage
posts about growth ongoing.

Document factors or bugs

Must peaceful you stumble upon any factors, bugs, or concepts, please go to the
Nuitka malicious program tracker and
chronicle them.

Most environment friendly practices for reporting bugs:

  • Please typically encompass the next information in your chronicle, for
    the underlying Python mannequin. It's possible you will perhaps perhaps be able to with out issue copy&paste this into
    your chronicle.

    python -m nuitka --model
  • Strive to make your instance minimal. That is, are trying and handle code that
    does not make a contribution to the issue as primary as possible. Ideally attain up
    with a shrimp reproducing program that illustrates the issue, utilizing
    print with assorted outcomes when that packages runs compiled or
    native.

  • If the hole happens spuriously (i.e. not at any time when), are trying and put of dwelling the
    environment variable PYTHONHASHSEED to 0, disabling hash
    randomization. If that makes the hole plug away, are trying rising in
    steps of 1 to a hash seed fee that makes it happen each time,
    encompass it in your chronicle.

  • Construct not encompass the created code in your chronicle. Given moral enter,
    or not it's redundant, and or not it's now probably not that I could possibly be taught about at it with out
    the flexibleness to commerce the Python or Nuitka supply and re-flee it.

  • Construct not ship screenshots of textual recount materials, that's unpleasant and sluggish. As an totally different,
    catch textual recount materials outputs from the console.

Be aware of Warning

Take into accounts utilizing this utility with warning. Even supposing many assessments are
utilized sooner than releases, points are probably breaking. Your options
and patches to Nuitka are very welcome.

Be a a part of Nuitka

You can very nicely be greater than welcome to affix Nuitka growth and help to
complete the mission in all minor and predominant methods.

The come of Nuitka happens in git. We presently embrace these 3
branches:

  • grasp

    This division accommodates the trusty delivery to which solely hotfixes for
    bugs will possible be carried out. It's speculated to work all the time and is
    supported.

  • kind

    This division accommodates the persevering with growth. It'll on occasion embrace
    microscopic regressions, however moreover new components. On this division, the
    integration work is completed, whereas new components might perhaps perhaps be developed on
    attribute branches.

  • manufacturing facility

    This division accommodates unfinished and incomplete work. It's terribly
    typically discipline to git rebase and the ultimate public staging ground,
    the place my work for kind division lives first. It's meant for
    making an attempt out solely and suggested to incorrect any of your dangle growth on.
    When updating it, you very usually will catch merge conflicts. Merely
    unravel these by doing git reset --arduous basis/manufacturing facility and swap
    to principally probably the most modern mannequin.

Indicate

The Developer Handbook explains the coding
concepts, branching mannequin previous, with attribute branches and hotfix
releases, the Nuitka originate and primary extra. Take into accounts studying it to
become a contributor. This doc is meant for Nuitka clients.

Donations

Must peaceful it's in all probability going you will perhaps perhaps nicely very nicely be feeling that it's in all probability going you will not help Nuitka without delay, however peaceful have an curiosity to
improve, please keep in mind making a donation and help this style.

Unsupported performance

The co_code attribute of code objects

The code objects are empty for native compiled capabilities. There could possibly be not any
bytecode with Nuitka's compiled attribute objects, so there may be not any method to
present it.

PDB

There could possibly be not any tracing of compiled capabilities to hitch a debugger to.

Optimization

Constant Folding

The protected ticket of optimization is the fastened folding. Here's
when an operation may even be absolutely predicted at compile time. For the time being,
Nuitka does these for some constructed-ins (however not all but, any individual to check
at this extra intently will possible be very welcome!), and it does it e.g. for
binary/unary operations and comparisons.

Constants presently recognized:

5 + 6  # binary operations
not 7  # unary operations
5  6  # comparisons
differ(3)  # constructed-ins

Literals are the one evident bitter

Read More

Similar Products:

    None Found

Recent Content