Nuitka-winsvc 2.7.7__cp313-cp313-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of Nuitka-winsvc might be problematic. Click here for more details.
- nuitka/Builtins.py +259 -0
- nuitka/BytecodeCaching.py +184 -0
- nuitka/Bytecodes.py +109 -0
- nuitka/CacheCleanup.py +54 -0
- nuitka/Constants.py +425 -0
- nuitka/Errors.py +93 -0
- nuitka/HardImportRegistry.py +408 -0
- nuitka/MainControl.py +1201 -0
- nuitka/ModuleRegistry.py +364 -0
- nuitka/OptionParsing.py +2473 -0
- nuitka/Options.py +2948 -0
- nuitka/OutputDirectories.py +201 -0
- nuitka/PostProcessing.py +551 -0
- nuitka/Progress.py +252 -0
- nuitka/PythonFlavors.py +426 -0
- nuitka/PythonOperators.py +146 -0
- nuitka/PythonVersions.py +513 -0
- nuitka/Serialization.py +291 -0
- nuitka/SourceCodeReferences.py +176 -0
- nuitka/Tracing.py +579 -0
- nuitka/TreeXML.py +141 -0
- nuitka/Variables.py +515 -0
- nuitka/Version.py +88 -0
- nuitka/__init__.py +19 -0
- nuitka/__main__.py +224 -0
- nuitka/__past__.py +217 -0
- nuitka/build/Backend.scons +1111 -0
- nuitka/build/CCompilerVersion.scons +281 -0
- nuitka/build/DataComposerInterface.py +116 -0
- nuitka/build/Offsets.scons +626 -0
- nuitka/build/Onefile.scons +564 -0
- nuitka/build/SconsCaching.py +451 -0
- nuitka/build/SconsCompilerSettings.py +1133 -0
- nuitka/build/SconsHacks.py +215 -0
- nuitka/build/SconsInterface.py +664 -0
- nuitka/build/SconsProgress.py +100 -0
- nuitka/build/SconsSpawn.py +436 -0
- nuitka/build/SconsUtils.py +939 -0
- nuitka/build/__init__.py +19 -0
- nuitka/build/include/nuitka/allocator.h +450 -0
- nuitka/build/include/nuitka/builtins.h +97 -0
- nuitka/build/include/nuitka/calling.h +123 -0
- nuitka/build/include/nuitka/checkers.h +39 -0
- nuitka/build/include/nuitka/checksum_tools.h +28 -0
- nuitka/build/include/nuitka/compiled_asyncgen.h +281 -0
- nuitka/build/include/nuitka/compiled_cell.h +64 -0
- nuitka/build/include/nuitka/compiled_coroutine.h +271 -0
- nuitka/build/include/nuitka/compiled_frame.h +502 -0
- nuitka/build/include/nuitka/compiled_function.h +170 -0
- nuitka/build/include/nuitka/compiled_generator.h +287 -0
- nuitka/build/include/nuitka/compiled_method.h +54 -0
- nuitka/build/include/nuitka/constants.h +251 -0
- nuitka/build/include/nuitka/constants_blob.h +34 -0
- nuitka/build/include/nuitka/debug_settings.h +60 -0
- nuitka/build/include/nuitka/environment_variables.h +30 -0
- nuitka/build/include/nuitka/environment_variables_system.h +51 -0
- nuitka/build/include/nuitka/exception_groups.h +167 -0
- nuitka/build/include/nuitka/exceptions.h +1458 -0
- nuitka/build/include/nuitka/filesystem_paths.h +117 -0
- nuitka/build/include/nuitka/freelists.h +92 -0
- nuitka/build/include/nuitka/hedley.h +1774 -0
- nuitka/build/include/nuitka/helper/attributes.h +90 -0
- nuitka/build/include/nuitka/helper/boolean.h +86 -0
- nuitka/build/include/nuitka/helper/bytearrays.h +34 -0
- nuitka/build/include/nuitka/helper/bytes.h +28 -0
- nuitka/build/include/nuitka/helper/calling_generated.h +132 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_le.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +47 -0
- nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +39 -0
- nuitka/build/include/nuitka/helper/comparisons_eq.h +247 -0
- nuitka/build/include/nuitka/helper/comparisons_ge.h +197 -0
- nuitka/build/include/nuitka/helper/comparisons_gt.h +197 -0
- nuitka/build/include/nuitka/helper/comparisons_le.h +247 -0
- nuitka/build/include/nuitka/helper/comparisons_lt.h +247 -0
- nuitka/build/include/nuitka/helper/comparisons_ne.h +197 -0
- nuitka/build/include/nuitka/helper/complex.h +46 -0
- nuitka/build/include/nuitka/helper/dictionaries.h +481 -0
- nuitka/build/include/nuitka/helper/floats.h +32 -0
- nuitka/build/include/nuitka/helper/import_hard.h +121 -0
- nuitka/build/include/nuitka/helper/indexes.h +47 -0
- nuitka/build/include/nuitka/helper/ints.h +165 -0
- nuitka/build/include/nuitka/helper/iterators.h +376 -0
- nuitka/build/include/nuitka/helper/lists.h +94 -0
- nuitka/build/include/nuitka/helper/lists_generated.h +36 -0
- nuitka/build/include/nuitka/helper/mappings.h +39 -0
- nuitka/build/include/nuitka/helper/operations.h +114 -0
- nuitka/build/include/nuitka/helper/operations_binary_add.h +240 -0
- nuitka/build/include/nuitka/helper/operations_binary_bitand.h +108 -0
- nuitka/build/include/nuitka/helper/operations_binary_bitor.h +108 -0
- nuitka/build/include/nuitka/helper/operations_binary_bitxor.h +108 -0
- nuitka/build/include/nuitka/helper/operations_binary_divmod.h +103 -0
- nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
- nuitka/build/include/nuitka/helper/operations_binary_floordiv.h +103 -0
- nuitka/build/include/nuitka/helper/operations_binary_lshift.h +99 -0
- nuitka/build/include/nuitka/helper/operations_binary_matmult.h +60 -0
- nuitka/build/include/nuitka/helper/operations_binary_mod.h +304 -0
- nuitka/build/include/nuitka/helper/operations_binary_mult.h +247 -0
- nuitka/build/include/nuitka/helper/operations_binary_olddiv.h +125 -0
- nuitka/build/include/nuitka/helper/operations_binary_pow.h +90 -0
- nuitka/build/include/nuitka/helper/operations_binary_rshift.h +99 -0
- nuitka/build/include/nuitka/helper/operations_binary_sub.h +117 -0
- nuitka/build/include/nuitka/helper/operations_binary_truediv.h +103 -0
- nuitka/build/include/nuitka/helper/operations_builtin_types.h +247 -0
- nuitka/build/include/nuitka/helper/operations_inplace_add.h +173 -0
- nuitka/build/include/nuitka/helper/operations_inplace_bitand.h +76 -0
- nuitka/build/include/nuitka/helper/operations_inplace_bitor.h +76 -0
- nuitka/build/include/nuitka/helper/operations_inplace_bitxor.h +76 -0
- nuitka/build/include/nuitka/helper/operations_inplace_floordiv.h +95 -0
- nuitka/build/include/nuitka/helper/operations_inplace_lshift.h +62 -0
- nuitka/build/include/nuitka/helper/operations_inplace_matmult.h +60 -0
- nuitka/build/include/nuitka/helper/operations_inplace_mod.h +218 -0
- nuitka/build/include/nuitka/helper/operations_inplace_mult.h +184 -0
- nuitka/build/include/nuitka/helper/operations_inplace_olddiv.h +115 -0
- nuitka/build/include/nuitka/helper/operations_inplace_pow.h +87 -0
- nuitka/build/include/nuitka/helper/operations_inplace_rshift.h +62 -0
- nuitka/build/include/nuitka/helper/operations_inplace_sub.h +102 -0
- nuitka/build/include/nuitka/helper/operations_inplace_truediv.h +95 -0
- nuitka/build/include/nuitka/helper/raising.h +114 -0
- nuitka/build/include/nuitka/helper/rangeobjects.h +66 -0
- nuitka/build/include/nuitka/helper/richcomparisons.h +35 -0
- nuitka/build/include/nuitka/helper/sequences.h +33 -0
- nuitka/build/include/nuitka/helper/sets.h +25 -0
- nuitka/build/include/nuitka/helper/slices.h +314 -0
- nuitka/build/include/nuitka/helper/strings.h +30 -0
- nuitka/build/include/nuitka/helper/subscripts.h +390 -0
- nuitka/build/include/nuitka/helper/tuples.h +187 -0
- nuitka/build/include/nuitka/helpers.h +417 -0
- nuitka/build/include/nuitka/importing.h +149 -0
- nuitka/build/include/nuitka/incbin.h +402 -0
- nuitka/build/include/nuitka/jit_sources.h +25 -0
- nuitka/build/include/nuitka/prelude.h +626 -0
- nuitka/build/include/nuitka/printing.h +84 -0
- nuitka/build/include/nuitka/python_pgo.h +57 -0
- nuitka/build/include/nuitka/safe_string_ops.h +57 -0
- nuitka/build/include/nuitka/threading.h +142 -0
- nuitka/build/include/nuitka/tracing.h +82 -0
- nuitka/build/include/nuitka/type_aliases.h +30 -0
- nuitka/build/include/nuitka/unfreezing.h +91 -0
- nuitka/build/inline_copy/appdirs/LICENSE.txt +23 -0
- nuitka/build/inline_copy/appdirs/appdirs.py +611 -0
- nuitka/build/inline_copy/atomicwrites/LICENSE +19 -0
- nuitka/build/inline_copy/atomicwrites/atomicwrites.py +226 -0
- nuitka/build/inline_copy/bin/scons.py +58 -0
- nuitka/build/inline_copy/clcache/clcache/LICENSE +30 -0
- nuitka/build/inline_copy/clcache/clcache/__init__.py +4 -0
- nuitka/build/inline_copy/clcache/clcache/caching.py +2008 -0
- nuitka/build/inline_copy/colorama/LICENSE.txt +27 -0
- nuitka/build/inline_copy/colorama/colorama/__init__.py +6 -0
- nuitka/build/inline_copy/colorama/colorama/ansi.py +102 -0
- nuitka/build/inline_copy/colorama/colorama/ansitowin32.py +258 -0
- nuitka/build/inline_copy/colorama/colorama/initialise.py +80 -0
- nuitka/build/inline_copy/colorama/colorama/win32.py +152 -0
- nuitka/build/inline_copy/colorama/colorama/winterm.py +169 -0
- nuitka/build/inline_copy/glob2/LICENSE +27 -0
- nuitka/build/inline_copy/glob2/glob2/__init__.py +5 -0
- nuitka/build/inline_copy/glob2/glob2/compat.py +167 -0
- nuitka/build/inline_copy/glob2/glob2/fnmatch.py +141 -0
- nuitka/build/inline_copy/glob2/glob2/impl.py +216 -0
- nuitka/build/inline_copy/jinja2/LICENSE.rst +28 -0
- nuitka/build/inline_copy/jinja2/README.rst +2 -0
- nuitka/build/inline_copy/jinja2/jinja2/__init__.py +72 -0
- nuitka/build/inline_copy/jinja2/jinja2/_compat.py +105 -0
- nuitka/build/inline_copy/jinja2/jinja2/_identifier.py +2 -0
- nuitka/build/inline_copy/jinja2/jinja2/bccache.py +361 -0
- nuitka/build/inline_copy/jinja2/jinja2/compiler.py +1721 -0
- nuitka/build/inline_copy/jinja2/jinja2/constants.py +32 -0
- nuitka/build/inline_copy/jinja2/jinja2/debug.py +378 -0
- nuitka/build/inline_copy/jinja2/jinja2/defaults.py +56 -0
- nuitka/build/inline_copy/jinja2/jinja2/environment.py +1276 -0
- nuitka/build/inline_copy/jinja2/jinja2/exceptions.py +146 -0
- nuitka/build/inline_copy/jinja2/jinja2/ext.py +627 -0
- nuitka/build/inline_copy/jinja2/jinja2/filters.py +1190 -0
- nuitka/build/inline_copy/jinja2/jinja2/idtracking.py +286 -0
- nuitka/build/inline_copy/jinja2/jinja2/lexer.py +739 -0
- nuitka/build/inline_copy/jinja2/jinja2/loaders.py +483 -0
- nuitka/build/inline_copy/jinja2/jinja2/meta.py +106 -0
- nuitka/build/inline_copy/jinja2/jinja2/nativetypes.py +220 -0
- nuitka/build/inline_copy/jinja2/jinja2/nodes.py +999 -0
- nuitka/build/inline_copy/jinja2/jinja2/optimizer.py +49 -0
- nuitka/build/inline_copy/jinja2/jinja2/parser.py +903 -0
- nuitka/build/inline_copy/jinja2/jinja2/runtime.py +808 -0
- nuitka/build/inline_copy/jinja2/jinja2/sandbox.py +488 -0
- nuitka/build/inline_copy/jinja2/jinja2/tests.py +174 -0
- nuitka/build/inline_copy/jinja2/jinja2/utils.py +642 -0
- nuitka/build/inline_copy/jinja2/jinja2/visitor.py +87 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Action.py +1475 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Builder.py +905 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/CacheDir.py +314 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Conftest.py +805 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Debug.py +251 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Defaults.py +646 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Environment.py +2561 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/EnvironmentValues.py +119 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Errors.py +222 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Executor.py +660 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Job.py +439 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Memoize.py +242 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/Alias.py +176 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/FS.py +3861 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/Python.py +195 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/__init__.py +1784 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/PathList.py +224 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/__init__.py +341 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/aix.py +81 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/cygwin.py +61 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/darwin.py +70 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/hpux.py +45 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/irix.py +41 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/mingw.py +33 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/os2.py +55 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/posix.py +124 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/sunos.py +47 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/virtualenv.py +115 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/win32.py +429 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/SConf.py +1119 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/SConsign.py +453 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/C.py +226 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/Dir.py +131 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/Prog.py +114 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/RC.py +57 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/__init__.py +436 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/Interactive.py +372 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/Main.py +1469 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/SConsOptions.py +1071 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/SConscript.py +686 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/__init__.py +425 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Subst.py +979 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Taskmaster.py +1062 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/386asm.py +61 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/GettextCommon.py +429 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/__init__.py +52 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/arch.py +66 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/common.py +371 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/netframework.py +83 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/sdk.py +411 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/vc.py +994 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/vs.py +608 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/PharLapCommon.py +116 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/__init__.py +882 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixc++.py +43 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixcc.py +74 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixcxx.py +77 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixlink.py +78 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/applelink.py +209 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ar.py +63 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/as.py +49 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/asm.py +78 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/bcc32.py +81 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/c++.py +44 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cc.py +105 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clang.py +91 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clangCommon/__init__.py +18 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clangxx.py +99 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cxx.py +95 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cyglink.py +212 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/default.py +50 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/filesystem.py +98 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/g++.py +45 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gas.py +56 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gcc.py +110 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gettext_tool.py +69 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gnulink.py +70 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gxx.py +78 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpc++.py +45 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpcc.py +53 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpcxx.py +88 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hplink.py +72 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/icc.py +59 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/icl.py +52 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ilink.py +55 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ilink32.py +60 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/install.py +510 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/intelc.py +617 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/link.py +72 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/LoadableModule.py +131 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/SharedLibrary.py +218 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/__init__.py +171 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkloc.py +112 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/m4.py +63 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/masm.py +77 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mingw.py +232 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msgfmt.py +132 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msginit.py +137 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msgmerge.py +125 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mslib.py +73 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mslink.py +339 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mssdk.py +50 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msvc.py +325 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msvs.py +2116 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mwcc.py +207 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mwld.py +108 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/nasm.py +72 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/rmic.py +139 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/rpcgen.py +70 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgiar.py +68 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgic++.py +43 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgicc.py +53 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgicxx.py +61 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgilink.py +59 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunar.py +64 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunc++.py +45 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/suncc.py +58 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/suncxx.py +153 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunlink.py +79 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/tar.py +73 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/textfile.py +198 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/tlib.py +53 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/wix.py +104 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/xgettext.py +337 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/zip.py +120 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Util.py +2134 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/ConfigureCache.py +171 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/__init__.py +0 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/sconsign.py +494 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/BoolVariable.py +96 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/EnumVariable.py +110 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/ListVariable.py +152 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/PackageVariable.py +107 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/PathVariable.py +158 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/__init__.py +334 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Warnings.py +238 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/__init__.py +9 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/__init__.py +104 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/_scons_dbm.py +42 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/win32.py +101 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/cpp.py +640 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/dblite.py +295 -0
- nuitka/build/inline_copy/lib/scons-4.3.0/SCons/exitfuncs.py +59 -0
- nuitka/build/inline_copy/markupsafe/LICENSE.rst +28 -0
- nuitka/build/inline_copy/markupsafe/markupsafe/__init__.py +327 -0
- nuitka/build/inline_copy/markupsafe/markupsafe/_compat.py +33 -0
- nuitka/build/inline_copy/markupsafe/markupsafe/_constants.py +264 -0
- nuitka/build/inline_copy/markupsafe/markupsafe/_native.py +69 -0
- nuitka/build/inline_copy/pefile/LICENSE.txt +21 -0
- nuitka/build/inline_copy/pefile/ordlookup/__init__.py +41 -0
- nuitka/build/inline_copy/pefile/ordlookup/oleaut32.py +400 -0
- nuitka/build/inline_copy/pefile/ordlookup/ws2_32.py +120 -0
- nuitka/build/inline_copy/pefile/pefile.py +8034 -0
- nuitka/build/inline_copy/pkg_resources/pkg_resources/__init__.py +3272 -0
- nuitka/build/inline_copy/pkg_resources/pkg_resources/py31compat.py +21 -0
- nuitka/build/inline_copy/python_hacl/LICENSE.txt +201 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.c +1430 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.h +66 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.c +463 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.h +66 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.c +1273 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.h +204 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.c +734 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.h +131 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Streaming_Types.h +83 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt128_Verified.h +346 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt_8_16_32_64.h +107 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/fstar_uint128_struct_endianness.h +68 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/internal/target.h +293 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/lowstar_endianness.h +231 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/types.h +14 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_MD5.h +56 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA1.h +56 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA2.h +164 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA3.h +65 -0
- nuitka/build/inline_copy/python_hacl/hacl_312/python_hacl_namespaces.h +89 -0
- nuitka/build/inline_copy/stubgen/astunparse.py +938 -0
- nuitka/build/inline_copy/stubgen/six.py +998 -0
- nuitka/build/inline_copy/stubgen/stubgen.py +484 -0
- nuitka/build/inline_copy/tqdm/tqdm/__init__.py +40 -0
- nuitka/build/inline_copy/tqdm/tqdm/_main.py +9 -0
- nuitka/build/inline_copy/tqdm/tqdm/_monitor.py +97 -0
- nuitka/build/inline_copy/tqdm/tqdm/_tqdm.py +9 -0
- nuitka/build/inline_copy/tqdm/tqdm/_tqdm_notebook.py +9 -0
- nuitka/build/inline_copy/tqdm/tqdm/_tqdm_pandas.py +24 -0
- nuitka/build/inline_copy/tqdm/tqdm/_utils.py +12 -0
- nuitka/build/inline_copy/tqdm/tqdm/auto.py +44 -0
- nuitka/build/inline_copy/tqdm/tqdm/autonotebook.py +28 -0
- nuitka/build/inline_copy/tqdm/tqdm/dask.py +46 -0
- nuitka/build/inline_copy/tqdm/tqdm/notebook.py +316 -0
- nuitka/build/inline_copy/tqdm/tqdm/std.py +1524 -0
- nuitka/build/inline_copy/tqdm/tqdm/tk.py +207 -0
- nuitka/build/inline_copy/tqdm/tqdm/utils.py +351 -0
- nuitka/build/inline_copy/tqdm/tqdm/version.py +2 -0
- nuitka/build/inline_copy/yaml/LICENSE +20 -0
- nuitka/build/inline_copy/yaml/yaml/__init__.py +427 -0
- nuitka/build/inline_copy/yaml/yaml/composer.py +139 -0
- nuitka/build/inline_copy/yaml/yaml/constructor.py +748 -0
- nuitka/build/inline_copy/yaml/yaml/cyaml.py +101 -0
- nuitka/build/inline_copy/yaml/yaml/dumper.py +62 -0
- nuitka/build/inline_copy/yaml/yaml/emitter.py +1137 -0
- nuitka/build/inline_copy/yaml/yaml/error.py +75 -0
- nuitka/build/inline_copy/yaml/yaml/events.py +86 -0
- nuitka/build/inline_copy/yaml/yaml/loader.py +63 -0
- nuitka/build/inline_copy/yaml/yaml/nodes.py +49 -0
- nuitka/build/inline_copy/yaml/yaml/parser.py +589 -0
- nuitka/build/inline_copy/yaml/yaml/reader.py +185 -0
- nuitka/build/inline_copy/yaml/yaml/representer.py +389 -0
- nuitka/build/inline_copy/yaml/yaml/resolver.py +227 -0
- nuitka/build/inline_copy/yaml/yaml/scanner.py +1435 -0
- nuitka/build/inline_copy/yaml/yaml/serializer.py +111 -0
- nuitka/build/inline_copy/yaml/yaml/tokens.py +104 -0
- nuitka/build/inline_copy/zlib/LICENSE +22 -0
- nuitka/build/inline_copy/zlib/crc32.c +1049 -0
- nuitka/build/inline_copy/zlib/crc32.h +9446 -0
- nuitka/build/inline_copy/zlib/zconf.h +551 -0
- nuitka/build/inline_copy/zlib/zlib.h +1938 -0
- nuitka/build/inline_copy/zlib/zutil.h +275 -0
- nuitka/build/inline_copy/zstd/LICENSE.txt +30 -0
- nuitka/build/inline_copy/zstd/common/bitstream.h +463 -0
- nuitka/build/inline_copy/zstd/common/compiler.h +288 -0
- nuitka/build/inline_copy/zstd/common/cpu.h +213 -0
- nuitka/build/inline_copy/zstd/common/debug.h +107 -0
- nuitka/build/inline_copy/zstd/common/entropy_common.c +360 -0
- nuitka/build/inline_copy/zstd/common/error_private.c +56 -0
- nuitka/build/inline_copy/zstd/common/error_private.h +80 -0
- nuitka/build/inline_copy/zstd/common/fse.h +715 -0
- nuitka/build/inline_copy/zstd/common/fse_decompress.c +393 -0
- nuitka/build/inline_copy/zstd/common/huf.h +361 -0
- nuitka/build/inline_copy/zstd/common/mem.h +426 -0
- nuitka/build/inline_copy/zstd/common/xxhash.c +826 -0
- nuitka/build/inline_copy/zstd/common/xxhash.h +285 -0
- nuitka/build/inline_copy/zstd/common/zstd_common.c +83 -0
- nuitka/build/inline_copy/zstd/common/zstd_deps.h +111 -0
- nuitka/build/inline_copy/zstd/common/zstd_errors.h +95 -0
- nuitka/build/inline_copy/zstd/common/zstd_internal.h +478 -0
- nuitka/build/inline_copy/zstd/decompress/huf_decompress.c +1350 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_ddict.c +244 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_ddict.h +44 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_decompress.c +1930 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_decompress_block.c +1540 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_decompress_block.h +62 -0
- nuitka/build/inline_copy/zstd/decompress/zstd_decompress_internal.h +190 -0
- nuitka/build/inline_copy/zstd/zstd.h +2391 -0
- nuitka/build/static_src/CompiledAsyncgenType.c +2211 -0
- nuitka/build/static_src/CompiledCellType.c +300 -0
- nuitka/build/static_src/CompiledCodeHelpers.c +2160 -0
- nuitka/build/static_src/CompiledCoroutineType.c +1946 -0
- nuitka/build/static_src/CompiledFrameType.c +1337 -0
- nuitka/build/static_src/CompiledFunctionType.c +3320 -0
- nuitka/build/static_src/CompiledGeneratorType.c +1997 -0
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +2117 -0
- nuitka/build/static_src/CompiledMethodType.c +614 -0
- nuitka/build/static_src/GenerateHeadersMain.c +30 -0
- nuitka/build/static_src/HelpersAllocator.c +939 -0
- nuitka/build/static_src/HelpersAttributes.c +1241 -0
- nuitka/build/static_src/HelpersBuiltin.c +901 -0
- nuitka/build/static_src/HelpersBuiltinTypeMethods.c +3594 -0
- nuitka/build/static_src/HelpersBytes.c +107 -0
- nuitka/build/static_src/HelpersCalling.c +397 -0
- nuitka/build/static_src/HelpersCallingGenerated.c +14361 -0
- nuitka/build/static_src/HelpersChecksumTools.c +59 -0
- nuitka/build/static_src/HelpersClasses.c +91 -0
- nuitka/build/static_src/HelpersComparisonDualEq.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualGe.c +121 -0
- nuitka/build/static_src/HelpersComparisonDualGt.c +121 -0
- nuitka/build/static_src/HelpersComparisonDualLe.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualLt.c +183 -0
- nuitka/build/static_src/HelpersComparisonDualNe.c +121 -0
- nuitka/build/static_src/HelpersComparisonEq.c +12070 -0
- nuitka/build/static_src/HelpersComparisonEqUtils.c +169 -0
- nuitka/build/static_src/HelpersComparisonGe.c +11871 -0
- nuitka/build/static_src/HelpersComparisonGt.c +11855 -0
- nuitka/build/static_src/HelpersComparisonLe.c +11957 -0
- nuitka/build/static_src/HelpersComparisonLt.c +11941 -0
- nuitka/build/static_src/HelpersComparisonNe.c +11979 -0
- nuitka/build/static_src/HelpersConsole.c +124 -0
- nuitka/build/static_src/HelpersConstantsBlob.c +1487 -0
- nuitka/build/static_src/HelpersDeepcopy.c +636 -0
- nuitka/build/static_src/HelpersDictionaries.c +1739 -0
- nuitka/build/static_src/HelpersDictionariesGenerated.c +738 -0
- nuitka/build/static_src/HelpersDumpBacktraces.c +63 -0
- nuitka/build/static_src/HelpersEnvironmentVariables.c +65 -0
- nuitka/build/static_src/HelpersEnvironmentVariablesSystem.c +97 -0
- nuitka/build/static_src/HelpersExceptions.c +298 -0
- nuitka/build/static_src/HelpersFiles.c +353 -0
- nuitka/build/static_src/HelpersFilesystemPaths.c +1322 -0
- nuitka/build/static_src/HelpersFloats.c +92 -0
- nuitka/build/static_src/HelpersHeapStorage.c +68 -0
- nuitka/build/static_src/HelpersImport.c +506 -0
- nuitka/build/static_src/HelpersImportHard.c +526 -0
- nuitka/build/static_src/HelpersJitSources.c +48 -0
- nuitka/build/static_src/HelpersLists.c +899 -0
- nuitka/build/static_src/HelpersListsGenerated.c +564 -0
- nuitka/build/static_src/HelpersMappings.c +46 -0
- nuitka/build/static_src/HelpersMatching.c +192 -0
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +6477 -0
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +703 -0
- nuitka/build/static_src/HelpersOperationBinaryBitand.c +2738 -0
- nuitka/build/static_src/HelpersOperationBinaryBitor.c +2738 -0
- nuitka/build/static_src/HelpersOperationBinaryBitxor.c +2738 -0
- nuitka/build/static_src/HelpersOperationBinaryDivmod.c +2406 -0
- nuitka/build/static_src/HelpersOperationBinaryDivmodUtils.c +33 -0
- nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
- nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +2422 -0
- nuitka/build/static_src/HelpersOperationBinaryInplaceAdd.c +220 -0
- nuitka/build/static_src/HelpersOperationBinaryLshift.c +2846 -0
- nuitka/build/static_src/HelpersOperationBinaryMatmult.c +453 -0
- nuitka/build/static_src/HelpersOperationBinaryMod.c +6549 -0
- nuitka/build/static_src/HelpersOperationBinaryMult.c +6438 -0
- nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +125 -0
- nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +2355 -0
- nuitka/build/static_src/HelpersOperationBinaryPow.c +2743 -0
- nuitka/build/static_src/HelpersOperationBinaryPowUtils.c +26 -0
- nuitka/build/static_src/HelpersOperationBinaryRshift.c +2706 -0
- nuitka/build/static_src/HelpersOperationBinarySub.c +2649 -0
- nuitka/build/static_src/HelpersOperationBinaryTruediv.c +2415 -0
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +5211 -0
- nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +144 -0
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +1826 -0
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +1826 -0
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +1826 -0
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +2605 -0
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +1594 -0
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +603 -0
- nuitka/build/static_src/HelpersOperationInplaceMod.c +4762 -0
- nuitka/build/static_src/HelpersOperationInplaceMult.c +4689 -0
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +2553 -0
- nuitka/build/static_src/HelpersOperationInplacePow.c +2807 -0
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +1534 -0
- nuitka/build/static_src/HelpersOperationInplaceSub.c +2894 -0
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +2612 -0
- nuitka/build/static_src/HelpersProfiling.c +104 -0
- nuitka/build/static_src/HelpersPythonPgo.c +113 -0
- nuitka/build/static_src/HelpersRaising.c +447 -0
- nuitka/build/static_src/HelpersSafeStrings.c +185 -0
- nuitka/build/static_src/HelpersSequences.c +134 -0
- nuitka/build/static_src/HelpersSlices.c +73 -0
- nuitka/build/static_src/HelpersStrings.c +998 -0
- nuitka/build/static_src/HelpersTuples.c +148 -0
- nuitka/build/static_src/HelpersTypes.c +329 -0
- nuitka/build/static_src/InspectPatcher.c +439 -0
- nuitka/build/static_src/MainProgram.c +2060 -0
- nuitka/build/static_src/MetaPathBasedLoader.c +2290 -0
- nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +125 -0
- nuitka/build/static_src/MetaPathBasedLoaderResourceReader.c +158 -0
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +785 -0
- nuitka/build/static_src/OnefileBootstrap.c +1580 -0
- nuitka/build/static_src/OnefileSplashScreen.cpp +275 -0
- nuitka/code_generation/AsyncgenCodes.py +186 -0
- nuitka/code_generation/AttributeCodes.py +357 -0
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +720 -0
- nuitka/code_generation/BranchCodes.py +67 -0
- nuitka/code_generation/BuiltinCodes.py +529 -0
- nuitka/code_generation/CallCodes.py +1186 -0
- nuitka/code_generation/ClassCodes.py +156 -0
- nuitka/code_generation/CodeGeneration.py +1078 -0
- nuitka/code_generation/CodeHelperSelection.py +81 -0
- nuitka/code_generation/CodeHelpers.py +455 -0
- nuitka/code_generation/CodeObjectCodes.py +165 -0
- nuitka/code_generation/ComparisonCodes.py +569 -0
- nuitka/code_generation/ComparisonHelperDefinitions.py +146 -0
- nuitka/code_generation/ConditionalCodes.py +236 -0
- nuitka/code_generation/ConstantCodes.py +243 -0
- nuitka/code_generation/Contexts.py +1248 -0
- nuitka/code_generation/CoroutineCodes.py +253 -0
- nuitka/code_generation/CtypesCodes.py +46 -0
- nuitka/code_generation/DictCodes.py +918 -0
- nuitka/code_generation/Emission.py +75 -0
- nuitka/code_generation/ErrorCodes.py +281 -0
- nuitka/code_generation/EvalCodes.py +444 -0
- nuitka/code_generation/ExceptionCodes.py +337 -0
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +227 -0
- nuitka/code_generation/ExpressionCodes.py +61 -0
- nuitka/code_generation/FrameCodes.py +518 -0
- nuitka/code_generation/FunctionCodes.py +858 -0
- nuitka/code_generation/GeneratorCodes.py +218 -0
- nuitka/code_generation/GlobalConstants.py +249 -0
- nuitka/code_generation/GlobalsLocalsCodes.py +211 -0
- nuitka/code_generation/IdCodes.py +53 -0
- nuitka/code_generation/ImportCodes.py +468 -0
- nuitka/code_generation/Indentation.py +45 -0
- nuitka/code_generation/IndexCodes.py +50 -0
- nuitka/code_generation/InjectCCodes.py +28 -0
- nuitka/code_generation/IntegerCodes.py +110 -0
- nuitka/code_generation/IteratorCodes.py +378 -0
- nuitka/code_generation/JitCodes.py +44 -0
- nuitka/code_generation/LabelCodes.py +68 -0
- nuitka/code_generation/LineNumberCodes.py +91 -0
- nuitka/code_generation/ListCodes.py +502 -0
- nuitka/code_generation/LoaderCodes.py +193 -0
- nuitka/code_generation/LocalsDictCodes.py +359 -0
- nuitka/code_generation/LoopCodes.py +88 -0
- nuitka/code_generation/MatchCodes.py +67 -0
- nuitka/code_generation/ModuleCodes.py +247 -0
- nuitka/code_generation/Namify.py +260 -0
- nuitka/code_generation/NetworkxCodes.py +51 -0
- nuitka/code_generation/OperationCodes.py +398 -0
- nuitka/code_generation/PackageResourceCodes.py +986 -0
- nuitka/code_generation/PrintCodes.py +93 -0
- nuitka/code_generation/PythonAPICodes.py +215 -0
- nuitka/code_generation/RaisingCodes.py +481 -0
- nuitka/code_generation/Reports.py +115 -0
- nuitka/code_generation/ReturnCodes.py +143 -0
- nuitka/code_generation/SetCodes.py +196 -0
- nuitka/code_generation/SliceCodes.py +465 -0
- nuitka/code_generation/StringCodes.py +303 -0
- nuitka/code_generation/SubscriptCodes.py +263 -0
- nuitka/code_generation/TensorflowCodes.py +54 -0
- nuitka/code_generation/TryCodes.py +326 -0
- nuitka/code_generation/TupleCodes.py +115 -0
- nuitka/code_generation/TypeAliasCodes.py +120 -0
- nuitka/code_generation/VariableCodes.py +519 -0
- nuitka/code_generation/VariableDeclarations.py +279 -0
- nuitka/code_generation/YieldCodes.py +253 -0
- nuitka/code_generation/__init__.py +19 -0
- nuitka/code_generation/c_types/CTypeBases.py +177 -0
- nuitka/code_generation/c_types/CTypeBooleans.py +104 -0
- nuitka/code_generation/c_types/CTypeCFloats.py +57 -0
- nuitka/code_generation/c_types/CTypeCLongs.py +45 -0
- nuitka/code_generation/c_types/CTypeModuleDictVariables.py +109 -0
- nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +150 -0
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +200 -0
- nuitka/code_generation/c_types/CTypeNuitkaVoids.py +107 -0
- nuitka/code_generation/c_types/CTypePyObjectPointers.py +572 -0
- nuitka/code_generation/c_types/CTypeVoids.py +92 -0
- nuitka/code_generation/c_types/__init__.py +19 -0
- nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +106 -0
- nuitka/code_generation/templates/CodeTemplatesConstants.py +296 -0
- nuitka/code_generation/templates/CodeTemplatesCoroutines.py +109 -0
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +84 -0
- nuitka/code_generation/templates/CodeTemplatesFrames.py +235 -0
- nuitka/code_generation/templates/CodeTemplatesFunction.py +117 -0
- nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +130 -0
- nuitka/code_generation/templates/CodeTemplatesIterators.py +40 -0
- nuitka/code_generation/templates/CodeTemplatesLoader.py +180 -0
- nuitka/code_generation/templates/CodeTemplatesModules.py +710 -0
- nuitka/code_generation/templates/CodeTemplatesVariables.py +388 -0
- nuitka/code_generation/templates/TemplateDebugWrapper.py +80 -0
- nuitka/code_generation/templates/__init__.py +19 -0
- nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +321 -0
- nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +143 -0
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +677 -0
- nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +165 -0
- nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +38 -0
- nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +41 -0
- nuitka/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +53 -0
- nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +364 -0
- nuitka/code_generation/templates_c/HelperImportHard.c.j2 +37 -0
- nuitka/code_generation/templates_c/HelperLongTools.c.j2 +53 -0
- nuitka/code_generation/templates_c/HelperObjectTools.c.j2 +20 -0
- nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +148 -0
- nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +352 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +31 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +32 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +112 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +157 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +99 -0
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +115 -0
- nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +281 -0
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +420 -0
- nuitka/code_generation/templates_c/HelperSlotsBytes.c.j2 +51 -0
- nuitka/code_generation/templates_c/HelperSlotsCommon.c.j2 +71 -0
- nuitka/code_generation/templates_c/HelperSlotsFloat.c.j2 +327 -0
- nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +411 -0
- nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +59 -0
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +229 -0
- nuitka/code_generation/templates_c/HelperSlotsSet.c.j2 +47 -0
- nuitka/code_generation/templates_c/HelperSlotsStr.c.j2 +55 -0
- nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +58 -0
- nuitka/code_generation/templates_c/HelperSlotsUnicode.c.j2 +62 -0
- nuitka/containers/Namedtuples.py +51 -0
- nuitka/containers/OrderedDicts.py +191 -0
- nuitka/containers/OrderedSets.py +123 -0
- nuitka/containers/OrderedSetsFallback.py +139 -0
- nuitka/containers/__init__.py +19 -0
- nuitka/distutils/Build.py +76 -0
- nuitka/distutils/DistutilCommands.py +438 -0
- nuitka/distutils/__init__.py +19 -0
- nuitka/finalizations/Finalization.py +35 -0
- nuitka/finalizations/FinalizeMarkups.py +136 -0
- nuitka/finalizations/__init__.py +19 -0
- nuitka/freezer/DependsExe.py +257 -0
- nuitka/freezer/DllDependenciesCommon.py +97 -0
- nuitka/freezer/DllDependenciesMacOS.py +444 -0
- nuitka/freezer/DllDependenciesPosix.py +242 -0
- nuitka/freezer/DllDependenciesWin32.py +315 -0
- nuitka/freezer/ImportDetection.py +359 -0
- nuitka/freezer/IncludedDataFiles.py +689 -0
- nuitka/freezer/IncludedEntryPoints.py +376 -0
- nuitka/freezer/Onefile.py +296 -0
- nuitka/freezer/Standalone.py +520 -0
- nuitka/freezer/__init__.py +19 -0
- nuitka/importing/IgnoreListing.py +449 -0
- nuitka/importing/ImportCache.py +95 -0
- nuitka/importing/ImportResolving.py +186 -0
- nuitka/importing/Importing.py +1200 -0
- nuitka/importing/PreloadedPackages.py +164 -0
- nuitka/importing/Recursion.py +611 -0
- nuitka/importing/StandardLibrary.py +429 -0
- nuitka/importing/__init__.py +19 -0
- nuitka/nodes/AsyncgenNodes.py +107 -0
- nuitka/nodes/AttributeLookupNodes.py +124 -0
- nuitka/nodes/AttributeNodes.py +386 -0
- nuitka/nodes/AttributeNodesGenerated.py +10734 -0
- nuitka/nodes/BuiltinAllNodes.py +115 -0
- nuitka/nodes/BuiltinAnyNodes.py +124 -0
- nuitka/nodes/BuiltinComplexNodes.py +83 -0
- nuitka/nodes/BuiltinDecodingNodes.py +52 -0
- nuitka/nodes/BuiltinDecoratorNodes.py +85 -0
- nuitka/nodes/BuiltinDictNodes.py +140 -0
- nuitka/nodes/BuiltinFormatNodes.py +159 -0
- nuitka/nodes/BuiltinHashNodes.py +63 -0
- nuitka/nodes/BuiltinInputNodes.py +39 -0
- nuitka/nodes/BuiltinIntegerNodes.py +170 -0
- nuitka/nodes/BuiltinIteratorNodes.py +391 -0
- nuitka/nodes/BuiltinLenNodes.py +61 -0
- nuitka/nodes/BuiltinNextNodes.py +111 -0
- nuitka/nodes/BuiltinOpenNodes.py +148 -0
- nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +7367 -0
- nuitka/nodes/BuiltinRangeNodes.py +690 -0
- nuitka/nodes/BuiltinRefNodes.py +314 -0
- nuitka/nodes/BuiltinSumNodes.py +104 -0
- nuitka/nodes/BuiltinTypeNodes.py +454 -0
- nuitka/nodes/BuiltinVarsNodes.py +44 -0
- nuitka/nodes/BytesNodes.py +829 -0
- nuitka/nodes/CallNodes.py +217 -0
- nuitka/nodes/Checkers.py +55 -0
- nuitka/nodes/ChildrenHavingMixins.py +21576 -0
- nuitka/nodes/ClassNodes.py +286 -0
- nuitka/nodes/CodeObjectSpecs.py +230 -0
- nuitka/nodes/ComparisonNodes.py +687 -0
- nuitka/nodes/ConditionalNodes.py +884 -0
- nuitka/nodes/ConstantRefNodes.py +1717 -0
- nuitka/nodes/ContainerMakingNodes.py +408 -0
- nuitka/nodes/ContainerOperationNodes.py +87 -0
- nuitka/nodes/CoroutineNodes.py +144 -0
- nuitka/nodes/CtypesNodes.py +51 -0
- nuitka/nodes/DictionaryNodes.py +1513 -0
- nuitka/nodes/ExceptionNodes.py +393 -0
- nuitka/nodes/ExecEvalNodes.py +229 -0
- nuitka/nodes/ExpressionBases.py +1301 -0
- nuitka/nodes/ExpressionBasesGenerated.py +2103 -0
- nuitka/nodes/ExpressionShapeMixins.py +886 -0
- nuitka/nodes/FrameNodes.py +413 -0
- nuitka/nodes/FunctionAttributeNodes.py +102 -0
- nuitka/nodes/FunctionNodes.py +1303 -0
- nuitka/nodes/FutureSpecs.py +224 -0
- nuitka/nodes/GeneratorNodes.py +201 -0
- nuitka/nodes/GlobalsLocalsNodes.py +209 -0
- nuitka/nodes/HardImportNodesGenerated.py +3599 -0
- nuitka/nodes/ImportHardNodes.py +185 -0
- nuitka/nodes/ImportNodes.py +1366 -0
- nuitka/nodes/IndicatorMixins.py +79 -0
- nuitka/nodes/InjectCNodes.py +51 -0
- nuitka/nodes/IterationHandles.py +407 -0
- nuitka/nodes/KeyValuePairNodes.py +378 -0
- nuitka/nodes/ListOperationNodes.py +525 -0
- nuitka/nodes/LocalsDictNodes.py +717 -0
- nuitka/nodes/LocalsScopes.py +505 -0
- nuitka/nodes/LoopNodes.py +445 -0
- nuitka/nodes/MatchNodes.py +60 -0
- nuitka/nodes/ModuleAttributeNodes.py +180 -0
- nuitka/nodes/ModuleNodes.py +1137 -0
- nuitka/nodes/NetworkxNodes.py +45 -0
- nuitka/nodes/NodeBases.py +890 -0
- nuitka/nodes/NodeMakingHelpers.py +481 -0
- nuitka/nodes/NodeMetaClasses.py +172 -0
- nuitka/nodes/OperatorNodes.py +944 -0
- nuitka/nodes/OperatorNodesUnary.py +403 -0
- nuitka/nodes/OsSysNodes.py +215 -0
- nuitka/nodes/OutlineNodes.py +372 -0
- nuitka/nodes/PackageMetadataNodes.py +982 -0
- nuitka/nodes/PackageResourceNodes.py +424 -0
- nuitka/nodes/PrintNodes.py +105 -0
- nuitka/nodes/ReturnNodes.py +255 -0
- nuitka/nodes/SideEffectNodes.py +139 -0
- nuitka/nodes/SliceNodes.py +386 -0
- nuitka/nodes/StatementBasesGenerated.py +3419 -0
- nuitka/nodes/StatementNodes.py +316 -0
- nuitka/nodes/StrNodes.py +919 -0
- nuitka/nodes/StringConcatenationNodes.py +103 -0
- nuitka/nodes/SubscriptNodes.py +245 -0
- nuitka/nodes/TensorflowNodes.py +38 -0
- nuitka/nodes/TryNodes.py +519 -0
- nuitka/nodes/TypeMatchNodes.py +65 -0
- nuitka/nodes/TypeNodes.py +390 -0
- nuitka/nodes/VariableAssignNodes.py +1177 -0
- nuitka/nodes/VariableDelNodes.py +320 -0
- nuitka/nodes/VariableNameNodes.py +153 -0
- nuitka/nodes/VariableRefNodes.py +895 -0
- nuitka/nodes/VariableReleaseNodes.py +153 -0
- nuitka/nodes/YieldNodes.py +121 -0
- nuitka/nodes/__init__.py +19 -0
- nuitka/nodes/shapes/BuiltinTypeShapes.py +4290 -0
- nuitka/nodes/shapes/ControlFlowDescriptions.py +199 -0
- nuitka/nodes/shapes/IteratorShapes.py +71 -0
- nuitka/nodes/shapes/ShapeMixins.py +255 -0
- nuitka/nodes/shapes/StandardShapes.py +1384 -0
- nuitka/nodes/shapes/__init__.py +19 -0
- nuitka/optimizations/BytecodeDemotion.py +105 -0
- nuitka/optimizations/FunctionInlining.py +110 -0
- nuitka/optimizations/Graphs.py +70 -0
- nuitka/optimizations/Optimization.py +363 -0
- nuitka/optimizations/OptimizeBuiltinCalls.py +1582 -0
- nuitka/optimizations/Tags.py +76 -0
- nuitka/optimizations/TraceCollections.py +1257 -0
- nuitka/optimizations/ValueTraces.py +980 -0
- nuitka/optimizations/__init__.py +19 -0
- nuitka/pgo/PGO.py +160 -0
- nuitka/pgo/__init__.py +19 -0
- nuitka/plugins/PluginBase.py +1924 -0
- nuitka/plugins/Plugins.py +2007 -0
- nuitka/plugins/YamlPluginBase.py +121 -0
- nuitka/plugins/__init__.py +19 -0
- nuitka/plugins/standard/AntiBloatPlugin.py +1024 -0
- nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +95 -0
- nuitka/plugins/standard/DataFilesPlugin.py +311 -0
- nuitka/plugins/standard/DelvewheelPlugin.py +150 -0
- nuitka/plugins/standard/DillPlugin/DillPlugin.c +37 -0
- nuitka/plugins/standard/DillPlugin/cloudpickle-postLoad.py +67 -0
- nuitka/plugins/standard/DillPlugin/dill-postLoad.py +223 -0
- nuitka/plugins/standard/DillPlugin.py +137 -0
- nuitka/plugins/standard/DllFilesPlugin.py +527 -0
- nuitka/plugins/standard/EnumPlugin.py +64 -0
- nuitka/plugins/standard/EventletPlugin.py +57 -0
- nuitka/plugins/standard/GeventPlugin.py +64 -0
- nuitka/plugins/standard/GiPlugin.py +118 -0
- nuitka/plugins/standard/GlfwPlugin.py +138 -0
- nuitka/plugins/standard/ImplicitImports.py +845 -0
- nuitka/plugins/standard/KivyPlugin.py +141 -0
- nuitka/plugins/standard/MatplotlibPlugin.py +256 -0
- nuitka/plugins/standard/MultiprocessingPlugin.py +199 -0
- nuitka/plugins/standard/NumpyPlugin.py +35 -0
- nuitka/plugins/standard/OptionsNannyPlugin.py +158 -0
- nuitka/plugins/standard/PbrPlugin.py +62 -0
- nuitka/plugins/standard/PkgResourcesPlugin.py +162 -0
- nuitka/plugins/standard/PlaywrightPlugin.py +179 -0
- nuitka/plugins/standard/PmwPlugin.py +248 -0
- nuitka/plugins/standard/PySidePyQtPlugin.py +1666 -0
- nuitka/plugins/standard/PywebViewPlugin.py +81 -0
- nuitka/plugins/standard/SpacyPlugin.py +137 -0
- nuitka/plugins/standard/TensorflowPlugin.py +35 -0
- nuitka/plugins/standard/TkinterPlugin.py +416 -0
- nuitka/plugins/standard/TorchPlugin.py +35 -0
- nuitka/plugins/standard/TransformersPlugin.py +121 -0
- nuitka/plugins/standard/TrioPlugin.py +33 -0
- nuitka/plugins/standard/UpxPlugin.py +174 -0
- nuitka/plugins/standard/__init__.py +19 -0
- nuitka/plugins/standard/standard.nuitka-package.config.yml +9313 -0
- nuitka/plugins/standard/stdlib2.nuitka-package.config.yml +78 -0
- nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +468 -0
- nuitka/reports/CompilationReportReader.py +83 -0
- nuitka/reports/LicenseReport.rst.j2 +41 -0
- nuitka/reports/Reports.py +961 -0
- nuitka/reports/__init__.py +19 -0
- nuitka/specs/BuiltinBytesOperationSpecs.py +180 -0
- nuitka/specs/BuiltinDictOperationSpecs.py +82 -0
- nuitka/specs/BuiltinListOperationSpecs.py +80 -0
- nuitka/specs/BuiltinParameterSpecs.py +831 -0
- nuitka/specs/BuiltinStrOperationSpecs.py +181 -0
- nuitka/specs/BuiltinTypeOperationSpecs.py +34 -0
- nuitka/specs/BuiltinUnicodeOperationSpecs.py +123 -0
- nuitka/specs/HardImportSpecs.py +236 -0
- nuitka/specs/ParameterSpecs.py +630 -0
- nuitka/specs/__init__.py +19 -0
- nuitka/tools/Basics.py +55 -0
- nuitka/tools/__init__.py +19 -0
- nuitka/tools/commercial/__init__.py +21 -0
- nuitka/tools/data_composer/DataComposer.py +593 -0
- nuitka/tools/data_composer/__init__.py +19 -0
- nuitka/tools/data_composer/__main__.py +41 -0
- nuitka/tools/environments/CreateEnvironment.py +69 -0
- nuitka/tools/environments/Virtualenv.py +158 -0
- nuitka/tools/environments/__init__.py +19 -0
- nuitka/tools/general/__init__.py +19 -0
- nuitka/tools/general/dll_report/__init__.py +19 -0
- nuitka/tools/general/dll_report/__main__.py +83 -0
- nuitka/tools/general/find_module/FindModuleCode.py +127 -0
- nuitka/tools/general/find_module/__init__.py +19 -0
- nuitka/tools/general/generate_header/GenerateHeader.py +73 -0
- nuitka/tools/general/generate_header/__init__.py +19 -0
- nuitka/tools/onefile_compressor/OnefileCompressor.py +390 -0
- nuitka/tools/onefile_compressor/__init__.py +19 -0
- nuitka/tools/onefile_compressor/__main__.py +41 -0
- nuitka/tools/podman/Podman.py +55 -0
- nuitka/tools/podman/__init__.py +19 -0
- nuitka/tools/podman/__main__.py +425 -0
- nuitka/tools/profiler/__init__.py +19 -0
- nuitka/tools/profiler/__main__.py +93 -0
- nuitka/tools/scanning/DisplayDistributions.py +39 -0
- nuitka/tools/scanning/DisplayPackageDLLs.py +151 -0
- nuitka/tools/scanning/DisplayPackageData.py +73 -0
- nuitka/tools/scanning/__init__.py +19 -0
- nuitka/tools/specialize/CTypeDescriptions.py +1928 -0
- nuitka/tools/specialize/Common.py +380 -0
- nuitka/tools/specialize/SpecializeC.py +1483 -0
- nuitka/tools/specialize/SpecializePython.py +1151 -0
- nuitka/tools/specialize/__init__.py +19 -0
- nuitka/tools/testing/Common.py +2007 -0
- nuitka/tools/testing/Constructs.py +53 -0
- nuitka/tools/testing/DocTests.py +156 -0
- nuitka/tools/testing/OutputComparison.py +313 -0
- nuitka/tools/testing/Pythons.py +34 -0
- nuitka/tools/testing/RuntimeTracing.py +260 -0
- nuitka/tools/testing/SearchModes.py +208 -0
- nuitka/tools/testing/Valgrind.py +103 -0
- nuitka/tools/testing/__init__.py +19 -0
- nuitka/tools/testing/check_reference_counts/__init__.py +19 -0
- nuitka/tools/testing/check_reference_counts/__main__.py +107 -0
- nuitka/tools/testing/compare_with_cpython/__init__.py +19 -0
- nuitka/tools/testing/compare_with_cpython/__main__.py +942 -0
- nuitka/tools/testing/find_sxs_modules/__init__.py +19 -0
- nuitka/tools/testing/find_sxs_modules/__main__.py +73 -0
- nuitka/tools/testing/measure_construct_performance/__init__.py +19 -0
- nuitka/tools/testing/measure_construct_performance/__main__.py +288 -0
- nuitka/tools/testing/run_nuitka_tests/__init__.py +19 -0
- nuitka/tools/testing/run_nuitka_tests/__main__.py +1091 -0
- nuitka/tools/watch/AutoStage.py +145 -0
- nuitka/tools/watch/Common.py +55 -0
- nuitka/tools/watch/Conda.py +125 -0
- nuitka/tools/watch/GitHub.py +113 -0
- nuitka/tools/watch/Pacman.py +73 -0
- nuitka/tools/watch/Pipenv.py +145 -0
- nuitka/tools/watch/__init__.py +19 -0
- nuitka/tools/watch/__main__.py +615 -0
- nuitka/tree/Building.py +1459 -0
- nuitka/tree/ComplexCallHelperFunctions.py +2150 -0
- nuitka/tree/Extractions.py +48 -0
- nuitka/tree/FutureSpecState.py +71 -0
- nuitka/tree/InternalModule.py +96 -0
- nuitka/tree/Operations.py +45 -0
- nuitka/tree/ReformulationAssertStatements.py +97 -0
- nuitka/tree/ReformulationAssignmentStatements.py +1260 -0
- nuitka/tree/ReformulationBooleanExpressions.py +97 -0
- nuitka/tree/ReformulationCallExpressions.py +314 -0
- nuitka/tree/ReformulationClasses.py +407 -0
- nuitka/tree/ReformulationClasses3.py +1149 -0
- nuitka/tree/ReformulationComparisonExpressions.py +174 -0
- nuitka/tree/ReformulationContractionExpressions.py +676 -0
- nuitka/tree/ReformulationDictionaryCreation.py +304 -0
- nuitka/tree/ReformulationExecStatements.py +386 -0
- nuitka/tree/ReformulationForLoopStatements.py +215 -0
- nuitka/tree/ReformulationFunctionStatements.py +931 -0
- nuitka/tree/ReformulationImportStatements.py +333 -0
- nuitka/tree/ReformulationLambdaExpressions.py +185 -0
- nuitka/tree/ReformulationMatchStatements.py +797 -0
- nuitka/tree/ReformulationMultidist.py +80 -0
- nuitka/tree/ReformulationNamespacePackages.py +239 -0
- nuitka/tree/ReformulationPrintStatements.py +127 -0
- nuitka/tree/ReformulationSequenceCreation.py +438 -0
- nuitka/tree/ReformulationSubscriptExpressions.py +123 -0
- nuitka/tree/ReformulationTryExceptStatements.py +418 -0
- nuitka/tree/ReformulationTryFinallyStatements.py +239 -0
- nuitka/tree/ReformulationWhileLoopStatements.py +160 -0
- nuitka/tree/ReformulationWithStatements.py +382 -0
- nuitka/tree/ReformulationYieldExpressions.py +133 -0
- nuitka/tree/SourceHandling.py +476 -0
- nuitka/tree/SyntaxErrors.py +143 -0
- nuitka/tree/TreeHelpers.py +720 -0
- nuitka/tree/VariableClosure.py +483 -0
- nuitka/tree/__init__.py +19 -0
- nuitka/utils/AppDirs.py +104 -0
- nuitka/utils/CStrings.py +208 -0
- nuitka/utils/CommandLineOptions.py +207 -0
- nuitka/utils/Distributions.py +728 -0
- nuitka/utils/Download.py +217 -0
- nuitka/utils/Execution.py +517 -0
- nuitka/utils/FileOperations.py +1587 -0
- nuitka/utils/Hashing.py +137 -0
- nuitka/utils/Images.py +79 -0
- nuitka/utils/Importing.py +335 -0
- nuitka/utils/InlineCopies.py +52 -0
- nuitka/utils/InstalledPythons.py +254 -0
- nuitka/utils/InstanceCounters.py +86 -0
- nuitka/utils/Jinja2.py +158 -0
- nuitka/utils/Json.py +40 -0
- nuitka/utils/MacOSApp.py +134 -0
- nuitka/utils/MemoryUsage.py +165 -0
- nuitka/utils/ModuleNames.py +317 -0
- nuitka/utils/PackageResources.py +44 -0
- nuitka/utils/ReExecute.py +152 -0
- nuitka/utils/Rest.py +60 -0
- nuitka/utils/SharedLibraries.py +1014 -0
- nuitka/utils/Shebang.py +113 -0
- nuitka/utils/Signing.py +144 -0
- nuitka/utils/SlotMetaClasses.py +57 -0
- nuitka/utils/StaticLibraries.py +260 -0
- nuitka/utils/ThreadedExecutor.py +87 -0
- nuitka/utils/Timing.py +102 -0
- nuitka/utils/Utils.py +483 -0
- nuitka/utils/WindowsFileUsage.py +337 -0
- nuitka/utils/WindowsResources.py +652 -0
- nuitka/utils/Yaml.py +247 -0
- nuitka/utils/__init__.py +19 -0
- nuitka_winsvc-2.7.7.data/scripts/nuitka-run.cmd +24 -0
- nuitka_winsvc-2.7.7.data/scripts/nuitka.cmd +30 -0
- nuitka_winsvc-2.7.7.dist-info/METADATA +115 -0
- nuitka_winsvc-2.7.7.dist-info/RECORD +995 -0
- nuitka_winsvc-2.7.7.dist-info/WHEEL +5 -0
- nuitka_winsvc-2.7.7.dist-info/entry_points.txt +7 -0
- nuitka_winsvc-2.7.7.dist-info/licenses/LICENSE.txt +202 -0
- nuitka_winsvc-2.7.7.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1924 @@
|
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
"""
|
|
5
|
+
Plugins: Welcome to Nuitka! This is your shortest way to become part of it.
|
|
6
|
+
|
|
7
|
+
This is to provide the base class for all plugins. Some of which are part of
|
|
8
|
+
proper Nuitka, and some of which are waiting to be created and submitted for
|
|
9
|
+
inclusion by you.
|
|
10
|
+
|
|
11
|
+
The base class will serve as documentation. And it will point to examples of
|
|
12
|
+
it being used.
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import ast
|
|
16
|
+
import functools
|
|
17
|
+
import inspect
|
|
18
|
+
import os
|
|
19
|
+
import sys
|
|
20
|
+
import unittest
|
|
21
|
+
|
|
22
|
+
from nuitka import Options
|
|
23
|
+
from nuitka.__past__ import iter_modules, unicode
|
|
24
|
+
from nuitka.containers.Namedtuples import makeNamedtupleClass
|
|
25
|
+
from nuitka.containers.OrderedSets import OrderedSet
|
|
26
|
+
from nuitka.freezer.IncludedDataFiles import (
|
|
27
|
+
makeIncludedDataDirectory,
|
|
28
|
+
makeIncludedDataFile,
|
|
29
|
+
makeIncludedEmptyDirectory,
|
|
30
|
+
makeIncludedGeneratedDataFile,
|
|
31
|
+
makeIncludedPackageDataFiles,
|
|
32
|
+
)
|
|
33
|
+
from nuitka.freezer.IncludedEntryPoints import (
|
|
34
|
+
makeDllEntryPoint,
|
|
35
|
+
makeExeEntryPoint,
|
|
36
|
+
)
|
|
37
|
+
from nuitka.ModuleRegistry import (
|
|
38
|
+
addModuleInfluencingCondition,
|
|
39
|
+
addModuleInfluencingDetection,
|
|
40
|
+
addModuleInfluencingParameter,
|
|
41
|
+
addModuleInfluencingVariable,
|
|
42
|
+
getModuleInclusionInfoByName,
|
|
43
|
+
)
|
|
44
|
+
from nuitka.Options import (
|
|
45
|
+
getCompanyName,
|
|
46
|
+
getFileVersion,
|
|
47
|
+
getProductFileVersion,
|
|
48
|
+
getProductName,
|
|
49
|
+
getProductVersion,
|
|
50
|
+
isDeploymentMode,
|
|
51
|
+
isOnefileMode,
|
|
52
|
+
isOnefileTempDirMode,
|
|
53
|
+
isStandaloneMode,
|
|
54
|
+
shallMakeDll,
|
|
55
|
+
shallMakeModule,
|
|
56
|
+
shallShowExecutedCommands,
|
|
57
|
+
)
|
|
58
|
+
from nuitka.PythonFlavors import (
|
|
59
|
+
isAnacondaPython,
|
|
60
|
+
isDebianPackagePython,
|
|
61
|
+
isNuitkaPython,
|
|
62
|
+
)
|
|
63
|
+
from nuitka.PythonVersions import (
|
|
64
|
+
getTestExecutionPythonVersions,
|
|
65
|
+
python_version,
|
|
66
|
+
python_version_full_str,
|
|
67
|
+
python_version_str,
|
|
68
|
+
)
|
|
69
|
+
from nuitka.Tracing import plugins_logger
|
|
70
|
+
from nuitka.utils.AppDirs import getAppdirsModule
|
|
71
|
+
from nuitka.utils.Distributions import (
|
|
72
|
+
getDistributionFromModuleName,
|
|
73
|
+
getDistributionName,
|
|
74
|
+
isDistributionCondaPackage,
|
|
75
|
+
)
|
|
76
|
+
from nuitka.utils.Execution import (
|
|
77
|
+
NuitkaCalledProcessError,
|
|
78
|
+
check_output,
|
|
79
|
+
withEnvironmentVarsOverridden,
|
|
80
|
+
)
|
|
81
|
+
from nuitka.utils.FileOperations import (
|
|
82
|
+
changeFilenameExtension,
|
|
83
|
+
getFileContents,
|
|
84
|
+
getReportSourceReference,
|
|
85
|
+
)
|
|
86
|
+
from nuitka.utils.Importing import (
|
|
87
|
+
getExtensionModuleSuffix,
|
|
88
|
+
isBuiltinModuleName,
|
|
89
|
+
)
|
|
90
|
+
from nuitka.utils.ModuleNames import (
|
|
91
|
+
ModuleName,
|
|
92
|
+
makeTriggerModuleName,
|
|
93
|
+
post_module_load_trigger_name,
|
|
94
|
+
pre_module_load_trigger_name,
|
|
95
|
+
)
|
|
96
|
+
from nuitka.utils.SharedLibraries import locateDLL, locateDLLsInDirectory
|
|
97
|
+
from nuitka.utils.SlotMetaClasses import getMetaClassBase
|
|
98
|
+
from nuitka.utils.StaticLibraries import getSystemStaticLibPythonPath
|
|
99
|
+
from nuitka.utils.Utils import (
|
|
100
|
+
getArchitecture,
|
|
101
|
+
isAndroidBasedLinux,
|
|
102
|
+
isLinux,
|
|
103
|
+
isMacOS,
|
|
104
|
+
isWin32Windows,
|
|
105
|
+
withNoWarning,
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
_warned_unused_plugins = set()
|
|
109
|
+
|
|
110
|
+
# TODO: Could share data cache with meta data nodes
|
|
111
|
+
_package_versions = {}
|
|
112
|
+
|
|
113
|
+
# Populated during plugin instance creation from their tags given by
|
|
114
|
+
# "getEvaluationConditionControlTags" value.
|
|
115
|
+
control_tags = {}
|
|
116
|
+
|
|
117
|
+
_context_dict = None
|
|
118
|
+
|
|
119
|
+
# Populated when "constants" and "variables" yaml sections get evaluated.
|
|
120
|
+
_module_config_constants = {}
|
|
121
|
+
_module_config_variables = {}
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
def _getImportLibModule():
|
|
125
|
+
try:
|
|
126
|
+
import importlib
|
|
127
|
+
except ImportError:
|
|
128
|
+
return None
|
|
129
|
+
else:
|
|
130
|
+
return importlib
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
def _makeEvaluationContext(logger, full_name, config_name):
|
|
134
|
+
context = TagContext(logger=logger, full_name=full_name, config_name=config_name)
|
|
135
|
+
context.update(control_tags)
|
|
136
|
+
|
|
137
|
+
context.update(_getEvaluationContext())
|
|
138
|
+
|
|
139
|
+
return context
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
def _getEvaluationContext():
|
|
143
|
+
# Using global here, as this is really a singleton, in the form of a module,
|
|
144
|
+
# pylint: disable=global-statement
|
|
145
|
+
global _context_dict
|
|
146
|
+
|
|
147
|
+
if _context_dict is None:
|
|
148
|
+
_context_dict = {
|
|
149
|
+
"macos": isMacOS(),
|
|
150
|
+
"win32": isWin32Windows(),
|
|
151
|
+
"linux": isLinux(),
|
|
152
|
+
"android": isAndroidBasedLinux(),
|
|
153
|
+
"android32": isAndroidBasedLinux() and sys.maxsize < 2**32,
|
|
154
|
+
"android64": isAndroidBasedLinux() and sys.maxsize >= 2**64 - 1,
|
|
155
|
+
"anaconda": isAnacondaPython(),
|
|
156
|
+
"is_conda_package": _isCondaPackage,
|
|
157
|
+
"debian_python": isDebianPackagePython(),
|
|
158
|
+
"nuitka_python": isNuitkaPython(),
|
|
159
|
+
"standalone": isStandaloneMode(),
|
|
160
|
+
"onefile": isOnefileMode(),
|
|
161
|
+
"onefile_cached": not isOnefileTempDirMode(),
|
|
162
|
+
"module_mode": shallMakeModule(),
|
|
163
|
+
"dll_mode": shallMakeDll(),
|
|
164
|
+
"deployment": isDeploymentMode(),
|
|
165
|
+
# Version information
|
|
166
|
+
"company": getCompanyName(),
|
|
167
|
+
"product": getProductName(),
|
|
168
|
+
"file_version": getFileVersion(),
|
|
169
|
+
"product_version": getProductVersion(),
|
|
170
|
+
"combined_version": getProductFileVersion(),
|
|
171
|
+
# Querying package versions.
|
|
172
|
+
"version": _getPackageVersion,
|
|
173
|
+
"version_str": _getPackageVersionStr,
|
|
174
|
+
"get_dist_name": _getDistributionNameFromPackageName,
|
|
175
|
+
"plugin": _isPluginActive,
|
|
176
|
+
# Iterating packages
|
|
177
|
+
"iterate_modules": _iterate_module_names,
|
|
178
|
+
# Locating package directories
|
|
179
|
+
"get_module_directory": _getModuleDirectory,
|
|
180
|
+
# Checking module presence
|
|
181
|
+
"has_module": _hasModule,
|
|
182
|
+
# Getting data files contents
|
|
183
|
+
"get_data": _getPackageData,
|
|
184
|
+
# Querying package properties
|
|
185
|
+
"has_builtin_module": isBuiltinModuleName,
|
|
186
|
+
# Architectures
|
|
187
|
+
"arch_x86": getArchitecture() == "x86",
|
|
188
|
+
"arch_amd64": getArchitecture() == "x86_64",
|
|
189
|
+
"arch_arm64": getArchitecture() == "arm64",
|
|
190
|
+
# Frequent used modules
|
|
191
|
+
"sys": sys,
|
|
192
|
+
"os": os,
|
|
193
|
+
"importlib": _getImportLibModule(),
|
|
194
|
+
"appdirs": getAppdirsModule(),
|
|
195
|
+
"unittest": unittest,
|
|
196
|
+
# Python version string
|
|
197
|
+
"python_version_str": python_version_str,
|
|
198
|
+
"python_version_full_str": python_version_full_str,
|
|
199
|
+
# Technical requirements
|
|
200
|
+
"static_libpython": getSystemStaticLibPythonPath() is not None,
|
|
201
|
+
# Builtins
|
|
202
|
+
"True": True,
|
|
203
|
+
"False": False,
|
|
204
|
+
"None": None,
|
|
205
|
+
"repr": repr,
|
|
206
|
+
"len": len,
|
|
207
|
+
"str": str,
|
|
208
|
+
"bool": bool,
|
|
209
|
+
"int": int,
|
|
210
|
+
"tuple": tuple,
|
|
211
|
+
"list": list,
|
|
212
|
+
"dict": dict,
|
|
213
|
+
"set": set,
|
|
214
|
+
"getattr": getattr,
|
|
215
|
+
"hasattr": hasattr,
|
|
216
|
+
"frozenset": frozenset,
|
|
217
|
+
"__import__": __import__,
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
versions = getTestExecutionPythonVersions()
|
|
221
|
+
|
|
222
|
+
for version in versions:
|
|
223
|
+
big, major = version.split(".")
|
|
224
|
+
numeric_version = int(big) * 256 + int(major) * 16
|
|
225
|
+
is_same_or_higher_version = python_version >= numeric_version
|
|
226
|
+
|
|
227
|
+
_context_dict["python" + big + major + "_or_higher"] = (
|
|
228
|
+
is_same_or_higher_version
|
|
229
|
+
)
|
|
230
|
+
_context_dict["before_python" + big + major] = not is_same_or_higher_version
|
|
231
|
+
|
|
232
|
+
_context_dict["before_python3"] = python_version < 0x300
|
|
233
|
+
_context_dict["python3_or_higher"] = python_version >= 0x300
|
|
234
|
+
|
|
235
|
+
if not isNuitkaPython():
|
|
236
|
+
_context_dict["extension_std_suffix"] = getExtensionModuleSuffix(
|
|
237
|
+
preferred=True
|
|
238
|
+
)
|
|
239
|
+
_context_dict["extension_suffix"] = getExtensionModuleSuffix(
|
|
240
|
+
preferred=False
|
|
241
|
+
)
|
|
242
|
+
|
|
243
|
+
return _context_dict
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
def _convertVersionToTuple(version_str):
|
|
247
|
+
def numberize(v):
|
|
248
|
+
# For now, we ignore rc/post stuff, hoping it doesn't matter for us.
|
|
249
|
+
return int("".join(d for d in v if d.isdigit()))
|
|
250
|
+
|
|
251
|
+
return tuple(numberize(d) for d in version_str.split("."))
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
def _getPackageNameFromDistributionName(distribution_name):
|
|
255
|
+
# spell-checker: ignore opencv, pyobjc, objc
|
|
256
|
+
|
|
257
|
+
if distribution_name in ("opencv-python", "opencv-python-headless"):
|
|
258
|
+
return "cv2"
|
|
259
|
+
elif distribution_name == "pyobjc":
|
|
260
|
+
return "objc"
|
|
261
|
+
else:
|
|
262
|
+
return distribution_name
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
def _getDistributionNameFromPackageName(package_name):
|
|
266
|
+
package_name = ModuleName(package_name)
|
|
267
|
+
distribution = getDistributionFromModuleName(package_name)
|
|
268
|
+
|
|
269
|
+
if distribution is None:
|
|
270
|
+
return package_name.asString()
|
|
271
|
+
else:
|
|
272
|
+
return getDistributionName(distribution)
|
|
273
|
+
|
|
274
|
+
|
|
275
|
+
def _isCondaPackage(package_name):
|
|
276
|
+
distribution_name = _getDistributionNameFromPackageName(package_name)
|
|
277
|
+
|
|
278
|
+
return isDistributionCondaPackage(distribution_name)
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
def _getPackageVersion(distribution_name):
|
|
282
|
+
if distribution_name not in _package_versions:
|
|
283
|
+
try:
|
|
284
|
+
if python_version >= 0x380:
|
|
285
|
+
from importlib.metadata import version
|
|
286
|
+
else:
|
|
287
|
+
from importlib_metadata import version
|
|
288
|
+
|
|
289
|
+
result = _convertVersionToTuple(version(distribution_name))
|
|
290
|
+
except ImportError:
|
|
291
|
+
try:
|
|
292
|
+
from pkg_resources import (
|
|
293
|
+
DistributionNotFound,
|
|
294
|
+
extern,
|
|
295
|
+
get_distribution,
|
|
296
|
+
)
|
|
297
|
+
except ImportError:
|
|
298
|
+
result = None
|
|
299
|
+
else:
|
|
300
|
+
try:
|
|
301
|
+
result = _convertVersionToTuple(
|
|
302
|
+
get_distribution(distribution_name).version
|
|
303
|
+
)
|
|
304
|
+
except DistributionNotFound:
|
|
305
|
+
result = None
|
|
306
|
+
except extern.packaging.version.InvalidVersion:
|
|
307
|
+
result = None
|
|
308
|
+
|
|
309
|
+
if result is None:
|
|
310
|
+
# Fallback if nothing is available, which may happen if no package is installed,
|
|
311
|
+
# but only source code is found.
|
|
312
|
+
try:
|
|
313
|
+
result = _convertVersionToTuple(
|
|
314
|
+
__import__(
|
|
315
|
+
_getPackageNameFromDistributionName(distribution_name)
|
|
316
|
+
).__version__
|
|
317
|
+
)
|
|
318
|
+
except ImportError:
|
|
319
|
+
result = None
|
|
320
|
+
|
|
321
|
+
_package_versions[distribution_name] = result
|
|
322
|
+
|
|
323
|
+
return _package_versions[distribution_name]
|
|
324
|
+
|
|
325
|
+
|
|
326
|
+
def _getPackageVersionStr(distribution_name):
|
|
327
|
+
version = _getPackageVersion(distribution_name)
|
|
328
|
+
|
|
329
|
+
if version is not None:
|
|
330
|
+
version = ".".join(str(d) for d in version)
|
|
331
|
+
|
|
332
|
+
return version
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
def _getModuleDirectory(module_name):
|
|
336
|
+
from nuitka.importing.Importing import locateModule
|
|
337
|
+
|
|
338
|
+
_module_name, module_filename, _module_kind, _finding = locateModule(
|
|
339
|
+
module_name=ModuleName(module_name), parent_package=None, level=0
|
|
340
|
+
)
|
|
341
|
+
|
|
342
|
+
return module_filename
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
def _hasModule(module_name):
|
|
346
|
+
from nuitka.importing.Importing import locateModule
|
|
347
|
+
|
|
348
|
+
_module_name, _module_filename, _module_kind, finding = locateModule(
|
|
349
|
+
module_name=ModuleName(module_name), parent_package=None, level=0
|
|
350
|
+
)
|
|
351
|
+
|
|
352
|
+
return finding != "not-found"
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
def _getPackageData(package_name, resource, default=None):
|
|
356
|
+
|
|
357
|
+
from nuitka.utils.PackageResources import getPackageData
|
|
358
|
+
|
|
359
|
+
try:
|
|
360
|
+
return getPackageData(package_name=ModuleName(package_name), resource=resource)
|
|
361
|
+
except FileNotFoundError:
|
|
362
|
+
if default is not None:
|
|
363
|
+
return default
|
|
364
|
+
|
|
365
|
+
raise
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
def _iterate_module_names(package_name):
|
|
369
|
+
package_name = ModuleName(package_name)
|
|
370
|
+
package_path = _getModuleDirectory(module_name=package_name)
|
|
371
|
+
|
|
372
|
+
result = []
|
|
373
|
+
|
|
374
|
+
for module_info in iter_modules([package_path]):
|
|
375
|
+
module_name = package_name.getChildNamed(module_info.name)
|
|
376
|
+
result.append(module_name.asString())
|
|
377
|
+
|
|
378
|
+
if module_info.ispkg: # spell-checker: ignore ispkg
|
|
379
|
+
result.extend(_iterate_module_names(package_name=module_name))
|
|
380
|
+
|
|
381
|
+
return result
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
def _isPluginActive(plugin_name):
|
|
385
|
+
from .Plugins import getUserActivatedPluginNames
|
|
386
|
+
|
|
387
|
+
return plugin_name in getUserActivatedPluginNames()
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
# Workaround for "ast.literal_eval" not working properly for set literals
|
|
391
|
+
# before Python3.9, spell-checker: ignore elts
|
|
392
|
+
if python_version >= 0x390:
|
|
393
|
+
_literal_eval = ast.literal_eval
|
|
394
|
+
else:
|
|
395
|
+
|
|
396
|
+
class RewriteName(ast.NodeTransformer):
|
|
397
|
+
@staticmethod
|
|
398
|
+
def visit_Call(node):
|
|
399
|
+
if node.func.id == "set" and node.args == node.keywords == []:
|
|
400
|
+
if python_version >= 0x380:
|
|
401
|
+
return ast.Constant(
|
|
402
|
+
value=set(),
|
|
403
|
+
)
|
|
404
|
+
else:
|
|
405
|
+
# TODO: For Python2 it doesn't work to parse sets literals,
|
|
406
|
+
# if we ever find we need them, we need to workaround that
|
|
407
|
+
# by maybe implementing it entirely.
|
|
408
|
+
return ast.Set(
|
|
409
|
+
# spell-checker: ignore elts
|
|
410
|
+
elts=[],
|
|
411
|
+
)
|
|
412
|
+
|
|
413
|
+
def _literal_eval(value):
|
|
414
|
+
if "set()" in value:
|
|
415
|
+
value = ast.parse(value, mode="eval")
|
|
416
|
+
RewriteName().visit(value)
|
|
417
|
+
|
|
418
|
+
return ast.literal_eval(value)
|
|
419
|
+
|
|
420
|
+
|
|
421
|
+
class NuitkaPluginBase(getMetaClassBase("Plugin", require_slots=False)):
|
|
422
|
+
"""Nuitka base class for all plugins.
|
|
423
|
+
|
|
424
|
+
Derive your plugin from "NuitkaPluginBase" please.
|
|
425
|
+
For instructions, see https://github.com/Nuitka/Nuitka/blob/orsiris/UserPlugin-Creation.rst
|
|
426
|
+
|
|
427
|
+
Plugins allow to adapt Nuitka's behavior in a number of ways as explained
|
|
428
|
+
below at the individual methods.
|
|
429
|
+
|
|
430
|
+
It is used to deal with special requirements some packages may have (e.g. PyQt
|
|
431
|
+
and tkinter), data files to be included (e.g. "certifi"), inserting hidden
|
|
432
|
+
code, coping with otherwise undetectable needs, or issuing messages in
|
|
433
|
+
certain situations.
|
|
434
|
+
|
|
435
|
+
A plugin in general must be enabled to be used by Nuitka. This happens by
|
|
436
|
+
specifying "--enable-plugin" (standard plugins) or by "--user-plugin" (user
|
|
437
|
+
plugins) in the Nuitka command line. However, some plugins are always enabled
|
|
438
|
+
and invisible to the user.
|
|
439
|
+
|
|
440
|
+
Nuitka comes with a number of "standard" plugins to be enabled as needed.
|
|
441
|
+
What they are can be displayed using "nuitka --plugin-list file.py" (filename
|
|
442
|
+
required but ignored).
|
|
443
|
+
|
|
444
|
+
User plugins may be specified (and implicitly enabled) using their Python
|
|
445
|
+
script pathname.
|
|
446
|
+
"""
|
|
447
|
+
|
|
448
|
+
# Standard plugins must provide this as a unique string which Nuitka
|
|
449
|
+
# then uses to identify them.
|
|
450
|
+
#
|
|
451
|
+
# User plugins are identified by their path and implicitly activated.
|
|
452
|
+
# They however still need to specify some arbitrary non-blank string here,
|
|
453
|
+
# which does not equal the name of an inactivated standard plugin.
|
|
454
|
+
# For working with options, user plugins must set this variable to
|
|
455
|
+
# the script's path (use __file__, __module__ or __name__).
|
|
456
|
+
plugin_name = None
|
|
457
|
+
|
|
458
|
+
@staticmethod
|
|
459
|
+
def isAlwaysEnabled():
|
|
460
|
+
"""Request to be always enabled.
|
|
461
|
+
|
|
462
|
+
Notes:
|
|
463
|
+
Setting this to true is only applicable to standard plugins. In
|
|
464
|
+
this case, the plugin will be enabled upon Nuitka start-up. Any
|
|
465
|
+
plugin detector class will then be ignored. Method isRelevant() may
|
|
466
|
+
also be present and can be used to fine-control enabling the
|
|
467
|
+
plugin: A to-be-enabled, but irrelevant plugin will still not be
|
|
468
|
+
activated.
|
|
469
|
+
Returns:
|
|
470
|
+
True or False
|
|
471
|
+
"""
|
|
472
|
+
return False
|
|
473
|
+
|
|
474
|
+
@classmethod
|
|
475
|
+
def isRelevant(cls):
|
|
476
|
+
"""Consider if the plugin is relevant.
|
|
477
|
+
|
|
478
|
+
Notes:
|
|
479
|
+
A plugin may only be a needed on a certain OS, or with some options,
|
|
480
|
+
but this is only a class method, so you will not have much run time
|
|
481
|
+
information.
|
|
482
|
+
|
|
483
|
+
Returns:
|
|
484
|
+
True or False
|
|
485
|
+
|
|
486
|
+
"""
|
|
487
|
+
return not cls.isDeprecated()
|
|
488
|
+
|
|
489
|
+
@classmethod
|
|
490
|
+
def isDeprecated(cls):
|
|
491
|
+
"""Is this a deprecated plugin, i.e. one that has no use anymore."""
|
|
492
|
+
return False
|
|
493
|
+
|
|
494
|
+
@classmethod
|
|
495
|
+
def isDetector(cls):
|
|
496
|
+
"""Is this a detection plugin, i.e. one which is only there to inform."""
|
|
497
|
+
return hasattr(cls, "detector_for")
|
|
498
|
+
|
|
499
|
+
@classmethod
|
|
500
|
+
def hasCategory(cls, category):
|
|
501
|
+
return category in cls.getCategories()
|
|
502
|
+
|
|
503
|
+
@classmethod
|
|
504
|
+
def getCategories(cls):
|
|
505
|
+
plugin_category = getattr(cls, "plugin_category", None)
|
|
506
|
+
|
|
507
|
+
if plugin_category is None:
|
|
508
|
+
result = ()
|
|
509
|
+
else:
|
|
510
|
+
result = plugin_category.split(",")
|
|
511
|
+
|
|
512
|
+
return OrderedSet(sorted(result))
|
|
513
|
+
|
|
514
|
+
@classmethod
|
|
515
|
+
def addPluginCommandLineOptions(cls, group):
|
|
516
|
+
# Call group.add_option() here.
|
|
517
|
+
pass
|
|
518
|
+
|
|
519
|
+
def isRequiredImplicitImport(self, module, full_name):
|
|
520
|
+
"""Indicate whether an implicitly imported module should be accepted.
|
|
521
|
+
|
|
522
|
+
Notes:
|
|
523
|
+
You may negate importing a module specified as "implicit import",
|
|
524
|
+
although this is an unexpected event.
|
|
525
|
+
|
|
526
|
+
Args:
|
|
527
|
+
module: the module object
|
|
528
|
+
full_name: of the implicitly import module
|
|
529
|
+
Returns:
|
|
530
|
+
True or False
|
|
531
|
+
"""
|
|
532
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
533
|
+
return True
|
|
534
|
+
|
|
535
|
+
def getImplicitImports(self, module):
|
|
536
|
+
"""Return the implicit imports for a given module (iterator).
|
|
537
|
+
|
|
538
|
+
Args:
|
|
539
|
+
module: the module object
|
|
540
|
+
Yields:
|
|
541
|
+
implicit imports for the module
|
|
542
|
+
"""
|
|
543
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
544
|
+
return ()
|
|
545
|
+
|
|
546
|
+
def onModuleSourceCode(self, module_name, source_filename, source_code):
|
|
547
|
+
"""Inspect or modify source code.
|
|
548
|
+
|
|
549
|
+
Args:
|
|
550
|
+
module_name: (str) name of module
|
|
551
|
+
source_code: (str) its source code
|
|
552
|
+
Returns:
|
|
553
|
+
source_code (str)
|
|
554
|
+
Notes:
|
|
555
|
+
Default implementation forwards to `checkModuleSourceCode` which is
|
|
556
|
+
going to allow simply checking the source code without the need to
|
|
557
|
+
pass it back.
|
|
558
|
+
"""
|
|
559
|
+
# Virtual method, pylint: disable=unused-argument
|
|
560
|
+
self.checkModuleSourceCode(module_name, source_code)
|
|
561
|
+
|
|
562
|
+
return source_code
|
|
563
|
+
|
|
564
|
+
def checkModuleSourceCode(self, module_name, source_code):
|
|
565
|
+
"""Inspect source code.
|
|
566
|
+
|
|
567
|
+
Args:
|
|
568
|
+
module_name: (str) name of module
|
|
569
|
+
source_code: (str) its source code
|
|
570
|
+
Returns:
|
|
571
|
+
None
|
|
572
|
+
"""
|
|
573
|
+
|
|
574
|
+
def onFrozenModuleBytecode(self, module_name, is_package, bytecode):
|
|
575
|
+
"""Inspect or modify frozen module byte code.
|
|
576
|
+
|
|
577
|
+
Args:
|
|
578
|
+
module_name: (str) name of module
|
|
579
|
+
is_package: (bool) True indicates a package
|
|
580
|
+
bytecode: (bytes) byte code
|
|
581
|
+
Returns:
|
|
582
|
+
bytecode (bytes)
|
|
583
|
+
"""
|
|
584
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
585
|
+
return bytecode
|
|
586
|
+
|
|
587
|
+
@staticmethod
|
|
588
|
+
def createPreModuleLoadCode(module):
|
|
589
|
+
"""Create code to execute before importing a module.
|
|
590
|
+
|
|
591
|
+
Notes:
|
|
592
|
+
Called by @onModuleDiscovered.
|
|
593
|
+
|
|
594
|
+
Args:
|
|
595
|
+
module: the module object
|
|
596
|
+
Returns:
|
|
597
|
+
None (does not apply, default)
|
|
598
|
+
tuple (code, documentary string)
|
|
599
|
+
tuple (code, documentary string, flags)
|
|
600
|
+
"""
|
|
601
|
+
# Virtual method, pylint: disable=unused-argument
|
|
602
|
+
return None
|
|
603
|
+
|
|
604
|
+
@staticmethod
|
|
605
|
+
def createPostModuleLoadCode(module):
|
|
606
|
+
"""Create code to execute after loading to a module.
|
|
607
|
+
|
|
608
|
+
Notes:
|
|
609
|
+
Called by @onModuleDiscovered.
|
|
610
|
+
|
|
611
|
+
Args:
|
|
612
|
+
module: the module object
|
|
613
|
+
|
|
614
|
+
Returns:
|
|
615
|
+
None (does not apply, default)
|
|
616
|
+
tuple (code, documentary string)
|
|
617
|
+
tuple (code, documentary string, flags)
|
|
618
|
+
"""
|
|
619
|
+
# Virtual method, pylint: disable=unused-argument
|
|
620
|
+
return None
|
|
621
|
+
|
|
622
|
+
@staticmethod
|
|
623
|
+
def createFakeModuleDependency(module):
|
|
624
|
+
"""Create module to depend on.
|
|
625
|
+
|
|
626
|
+
Notes:
|
|
627
|
+
Called by @onModuleDiscovered.
|
|
628
|
+
|
|
629
|
+
Args:
|
|
630
|
+
module: the module object
|
|
631
|
+
|
|
632
|
+
Returns:
|
|
633
|
+
None (does not apply, default)
|
|
634
|
+
tuple (code, reason)
|
|
635
|
+
tuple (code, reason, flags)
|
|
636
|
+
"""
|
|
637
|
+
# Virtual method, pylint: disable=unused-argument
|
|
638
|
+
return None
|
|
639
|
+
|
|
640
|
+
@staticmethod
|
|
641
|
+
def hasPreModuleLoadCode(module_name):
|
|
642
|
+
return (
|
|
643
|
+
getModuleInclusionInfoByName(
|
|
644
|
+
makeTriggerModuleName(module_name, pre_module_load_trigger_name)
|
|
645
|
+
)
|
|
646
|
+
is not None
|
|
647
|
+
)
|
|
648
|
+
|
|
649
|
+
@staticmethod
|
|
650
|
+
def hasPostModuleLoadCode(module_name):
|
|
651
|
+
return (
|
|
652
|
+
getModuleInclusionInfoByName(
|
|
653
|
+
makeTriggerModuleName(module_name, post_module_load_trigger_name)
|
|
654
|
+
)
|
|
655
|
+
is not None
|
|
656
|
+
)
|
|
657
|
+
|
|
658
|
+
def onModuleDiscovered(self, module):
|
|
659
|
+
"""Called with a module to be loaded.
|
|
660
|
+
|
|
661
|
+
Notes:
|
|
662
|
+
We may specify code to be prepended and/or appended to this module.
|
|
663
|
+
This code is stored in the appropriate dict.
|
|
664
|
+
For every imported module and each of these two options, only one plugin may do this.
|
|
665
|
+
We check this condition here.
|
|
666
|
+
|
|
667
|
+
Args:
|
|
668
|
+
module: the module object
|
|
669
|
+
Returns:
|
|
670
|
+
None
|
|
671
|
+
"""
|
|
672
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
673
|
+
return None
|
|
674
|
+
|
|
675
|
+
def getPackageExtraScanPaths(self, package_name, package_dir):
|
|
676
|
+
"""Provide other directories to consider submodules to live in.
|
|
677
|
+
|
|
678
|
+
Args:
|
|
679
|
+
module_name: full module name
|
|
680
|
+
package_dir: directory of the package
|
|
681
|
+
|
|
682
|
+
Returns:
|
|
683
|
+
Iterable list of directories, non-existent ones are ignored.
|
|
684
|
+
"""
|
|
685
|
+
|
|
686
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
687
|
+
return ()
|
|
688
|
+
|
|
689
|
+
def onModuleEncounter(
|
|
690
|
+
self, using_module_name, module_name, module_filename, module_kind
|
|
691
|
+
):
|
|
692
|
+
"""Help decide whether to include a module.
|
|
693
|
+
|
|
694
|
+
Args:
|
|
695
|
+
using_module_name: module that does this (can be None if user)
|
|
696
|
+
module_name: full module name
|
|
697
|
+
module_filename: filename
|
|
698
|
+
module_kind: one of "py", "extension" (shared library)
|
|
699
|
+
Returns:
|
|
700
|
+
True or False
|
|
701
|
+
"""
|
|
702
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
703
|
+
return None
|
|
704
|
+
|
|
705
|
+
def onModuleUsageLookAhead(
|
|
706
|
+
self, module_name, module_filename, module_kind, get_module_source
|
|
707
|
+
):
|
|
708
|
+
"""React to tentative recursion of a module coming up.
|
|
709
|
+
|
|
710
|
+
For definite usage, use onModuleRecursion where it's a fact and
|
|
711
|
+
happening next. This may be a usage that is later optimized away
|
|
712
|
+
and doesn't impact anything. The main usage is to setup e.g.
|
|
713
|
+
hard imports as a factory, e.g. with detectable lazy loaders.
|
|
714
|
+
|
|
715
|
+
Args:
|
|
716
|
+
module_name: full module name
|
|
717
|
+
module_filename: filename
|
|
718
|
+
module_kind: one of "py", "extension" (shared library)
|
|
719
|
+
get_module_source: callable to get module source code if any
|
|
720
|
+
Returns:
|
|
721
|
+
None
|
|
722
|
+
"""
|
|
723
|
+
|
|
724
|
+
def onModuleRecursion(
|
|
725
|
+
self,
|
|
726
|
+
module_name,
|
|
727
|
+
module_filename,
|
|
728
|
+
module_kind,
|
|
729
|
+
using_module_name,
|
|
730
|
+
source_ref,
|
|
731
|
+
reason,
|
|
732
|
+
):
|
|
733
|
+
"""React to recursion of a module coming up.
|
|
734
|
+
|
|
735
|
+
Args:
|
|
736
|
+
module_name: full module name
|
|
737
|
+
module_filename: filename
|
|
738
|
+
module_kind: one of "py", "extension" (shared library)
|
|
739
|
+
using_module_name: name of module that does the usage (None if it is a user choice)
|
|
740
|
+
source_ref: code making the import (None if it is a user choice)
|
|
741
|
+
Returns:
|
|
742
|
+
None
|
|
743
|
+
"""
|
|
744
|
+
|
|
745
|
+
def onCompilationStartChecks(self):
|
|
746
|
+
"""The compilation is setup, locating modules if expected to work.
|
|
747
|
+
|
|
748
|
+
Args:
|
|
749
|
+
None
|
|
750
|
+
Returns:
|
|
751
|
+
None
|
|
752
|
+
"""
|
|
753
|
+
# Virtual method, pylint: disable=no-self-use
|
|
754
|
+
|
|
755
|
+
def onModuleInitialSet(self):
|
|
756
|
+
"""Provide extra modules to the initial root module set.
|
|
757
|
+
|
|
758
|
+
Args:
|
|
759
|
+
None
|
|
760
|
+
Returns:
|
|
761
|
+
Iterable of modules, may yield.
|
|
762
|
+
"""
|
|
763
|
+
# Virtual method, pylint: disable=no-self-use
|
|
764
|
+
return ()
|
|
765
|
+
|
|
766
|
+
def onModuleCompleteSet(self, module_set):
|
|
767
|
+
"""Provide extra modules to the initial root module set.
|
|
768
|
+
|
|
769
|
+
Args:
|
|
770
|
+
module_set - tuple of module objects
|
|
771
|
+
Returns:
|
|
772
|
+
None
|
|
773
|
+
Notes:
|
|
774
|
+
You must not change anything, this is purely for warning
|
|
775
|
+
and error checking, and potentially for later stages to
|
|
776
|
+
prepare.
|
|
777
|
+
"""
|
|
778
|
+
|
|
779
|
+
def onModuleCompleteSetGUI(self, module_set, plugin_binding_name):
|
|
780
|
+
from .Plugins import getOtherGUIBindingNames, getQtBindingNames
|
|
781
|
+
|
|
782
|
+
for module in module_set:
|
|
783
|
+
module_name = module.getFullName()
|
|
784
|
+
|
|
785
|
+
if module_name == plugin_binding_name:
|
|
786
|
+
continue
|
|
787
|
+
|
|
788
|
+
if module_name in getOtherGUIBindingNames():
|
|
789
|
+
if plugin_binding_name in getQtBindingNames():
|
|
790
|
+
recommendation = "Use '--nofollow-import-to=%s'" % module_name
|
|
791
|
+
|
|
792
|
+
if module_name in getQtBindingNames():
|
|
793
|
+
problem = "conflicts with"
|
|
794
|
+
else:
|
|
795
|
+
problem = "is redundant with"
|
|
796
|
+
else:
|
|
797
|
+
recommendation = "Use '--enable-plugin=no-qt'"
|
|
798
|
+
problem = "is redundant with"
|
|
799
|
+
|
|
800
|
+
self.warning(
|
|
801
|
+
"""\
|
|
802
|
+
Unwanted import of '%(unwanted)s' that %(problem)s '%(binding_name)s' encountered. \
|
|
803
|
+
%(recommendation)s or uninstall it for best compatibility with pure Python execution."""
|
|
804
|
+
% {
|
|
805
|
+
"unwanted": module_name,
|
|
806
|
+
"binding_name": plugin_binding_name,
|
|
807
|
+
"recommendation": recommendation,
|
|
808
|
+
"problem": problem,
|
|
809
|
+
}
|
|
810
|
+
)
|
|
811
|
+
|
|
812
|
+
def locateModule(self, module_name):
|
|
813
|
+
"""Provide a filename / -path for a to-be-imported module.
|
|
814
|
+
|
|
815
|
+
Args:
|
|
816
|
+
module_name: (str or ModuleName) full name of module
|
|
817
|
+
Returns:
|
|
818
|
+
filename for module
|
|
819
|
+
"""
|
|
820
|
+
|
|
821
|
+
from nuitka.importing.Importing import locateModule
|
|
822
|
+
|
|
823
|
+
_module_name, module_filename, _module_kind, _finding = locateModule(
|
|
824
|
+
module_name=ModuleName(module_name), parent_package=None, level=0
|
|
825
|
+
)
|
|
826
|
+
|
|
827
|
+
return module_filename
|
|
828
|
+
|
|
829
|
+
@staticmethod
|
|
830
|
+
def locateModules(module_name):
|
|
831
|
+
"""Provide a filename / -path for a to-be-imported module.
|
|
832
|
+
|
|
833
|
+
Args:
|
|
834
|
+
module_name: (str or ModuleName) full name of module
|
|
835
|
+
Returns:
|
|
836
|
+
list of ModuleName
|
|
837
|
+
"""
|
|
838
|
+
|
|
839
|
+
from nuitka.importing.Importing import locateModules
|
|
840
|
+
|
|
841
|
+
return locateModules(module_name)
|
|
842
|
+
|
|
843
|
+
@classmethod
|
|
844
|
+
def locateDLL(cls, dll_name):
|
|
845
|
+
"""Locate a DLL by name."""
|
|
846
|
+
return locateDLL(dll_name)
|
|
847
|
+
|
|
848
|
+
@classmethod
|
|
849
|
+
def locateDLLsInDirectory(cls, directory):
|
|
850
|
+
"""Locate all DLLs in a folder
|
|
851
|
+
|
|
852
|
+
Returns:
|
|
853
|
+
list of (filename, filename_relative, dll_extension)
|
|
854
|
+
"""
|
|
855
|
+
return locateDLLsInDirectory(directory)
|
|
856
|
+
|
|
857
|
+
def makeDllEntryPoint(
|
|
858
|
+
self, source_path, dest_path, module_name, package_name, reason
|
|
859
|
+
):
|
|
860
|
+
"""Create an entry point, as expected to be provided by getExtraDlls."""
|
|
861
|
+
return makeDllEntryPoint(
|
|
862
|
+
logger=self,
|
|
863
|
+
source_path=source_path,
|
|
864
|
+
dest_path=dest_path,
|
|
865
|
+
module_name=module_name,
|
|
866
|
+
package_name=package_name,
|
|
867
|
+
reason=reason,
|
|
868
|
+
)
|
|
869
|
+
|
|
870
|
+
def makeExeEntryPoint(
|
|
871
|
+
self, source_path, dest_path, module_name, package_name, reason
|
|
872
|
+
):
|
|
873
|
+
"""Create an entry point, as expected to be provided by getExtraDlls."""
|
|
874
|
+
return makeExeEntryPoint(
|
|
875
|
+
logger=self,
|
|
876
|
+
source_path=source_path,
|
|
877
|
+
dest_path=dest_path,
|
|
878
|
+
module_name=module_name,
|
|
879
|
+
package_name=package_name,
|
|
880
|
+
reason=reason,
|
|
881
|
+
)
|
|
882
|
+
|
|
883
|
+
def reportFileCount(self, module_name, count, section=None):
|
|
884
|
+
if count:
|
|
885
|
+
msg = "Found %d %s DLLs from %s%s installation." % (
|
|
886
|
+
count,
|
|
887
|
+
"file" if count < 2 else "files",
|
|
888
|
+
"" if not section else ("'%s' " % section),
|
|
889
|
+
module_name.asString(),
|
|
890
|
+
)
|
|
891
|
+
|
|
892
|
+
self.info(msg)
|
|
893
|
+
|
|
894
|
+
def getExtraDlls(self, module):
|
|
895
|
+
"""Provide IncludedEntryPoint named tuples describing extra needs of the module.
|
|
896
|
+
|
|
897
|
+
Args:
|
|
898
|
+
module: the module object needing the binaries
|
|
899
|
+
Returns:
|
|
900
|
+
yields IncludedEntryPoint objects
|
|
901
|
+
|
|
902
|
+
"""
|
|
903
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
904
|
+
return ()
|
|
905
|
+
|
|
906
|
+
def onCopiedDLL(self, dll_filename):
|
|
907
|
+
"""Chance for a plugin to modify DLLs after copy, e.g. to compress it, remove attributes, etc.
|
|
908
|
+
|
|
909
|
+
Args:
|
|
910
|
+
dll_filename: the filename of the DLL
|
|
911
|
+
|
|
912
|
+
Notes:
|
|
913
|
+
Do not remove or add any files in this method, this will not work well, there
|
|
914
|
+
is e.g. getExtraDLLs API to add things. This is only for post processing as
|
|
915
|
+
described above.
|
|
916
|
+
|
|
917
|
+
"""
|
|
918
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
919
|
+
return None
|
|
920
|
+
|
|
921
|
+
def getModuleSpecificDllPaths(self, module_name):
|
|
922
|
+
"""Provide a list of directories, where DLLs should be searched for this package (or module).
|
|
923
|
+
|
|
924
|
+
Args:
|
|
925
|
+
module_name: name of a package or module, for which the DLL path addition applies.
|
|
926
|
+
Returns:
|
|
927
|
+
iterable of paths
|
|
928
|
+
"""
|
|
929
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
930
|
+
return ()
|
|
931
|
+
|
|
932
|
+
def getModuleSysPathAdditions(self, module_name):
|
|
933
|
+
"""Provide a list of directories, that should be considered in 'PYTHONPATH' when this module is used.
|
|
934
|
+
|
|
935
|
+
Args:
|
|
936
|
+
module_name: name of a package or module
|
|
937
|
+
Returns:
|
|
938
|
+
iterable of paths
|
|
939
|
+
"""
|
|
940
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
941
|
+
return ()
|
|
942
|
+
|
|
943
|
+
def removeDllDependencies(self, dll_filename, dll_filenames):
|
|
944
|
+
"""Yield any DLLs / shared libraries not to be included in distribution.
|
|
945
|
+
|
|
946
|
+
Args:
|
|
947
|
+
dll_filename: DLL name
|
|
948
|
+
dll_filenames: list of DLLs
|
|
949
|
+
Yields:
|
|
950
|
+
yielded filenames to exclude
|
|
951
|
+
"""
|
|
952
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
953
|
+
return ()
|
|
954
|
+
|
|
955
|
+
def considerDataFiles(self, module):
|
|
956
|
+
"""Yield data file names (source|func, target) for inclusion (iterator).
|
|
957
|
+
|
|
958
|
+
Args:
|
|
959
|
+
module: module object that may need extra data files
|
|
960
|
+
Yields:
|
|
961
|
+
Data file description pairs, either (source, dest) or (func, dest)
|
|
962
|
+
where the func will be called to create the content dynamically.
|
|
963
|
+
|
|
964
|
+
"""
|
|
965
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
966
|
+
return ()
|
|
967
|
+
|
|
968
|
+
def isAcceptableMissingDLL(self, package_name, dll_basename):
|
|
969
|
+
"""Check if a missing DLL is acceptable to the plugin.
|
|
970
|
+
|
|
971
|
+
Args:
|
|
972
|
+
package_name: name of the package using the DLL
|
|
973
|
+
dll_basename : basename of the DLL, i.e. no suffix
|
|
974
|
+
Returns:
|
|
975
|
+
None (no opinion for that file), True (yes) or False (no)
|
|
976
|
+
"""
|
|
977
|
+
|
|
978
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
979
|
+
return None
|
|
980
|
+
|
|
981
|
+
def makeIncludedDataFile(self, source_path, dest_path, reason, tags=""):
|
|
982
|
+
return makeIncludedDataFile(
|
|
983
|
+
source_path=source_path,
|
|
984
|
+
dest_path=dest_path,
|
|
985
|
+
reason=reason,
|
|
986
|
+
tracer=self,
|
|
987
|
+
tags=tags,
|
|
988
|
+
)
|
|
989
|
+
|
|
990
|
+
def makeIncludedGeneratedDataFile(self, data, dest_path, reason, tags=""):
|
|
991
|
+
return makeIncludedGeneratedDataFile(
|
|
992
|
+
data=data, dest_path=dest_path, reason=reason, tracer=self, tags=tags
|
|
993
|
+
)
|
|
994
|
+
|
|
995
|
+
def makeIncludedDataDirectory(
|
|
996
|
+
self,
|
|
997
|
+
source_path,
|
|
998
|
+
dest_path,
|
|
999
|
+
reason,
|
|
1000
|
+
tags="",
|
|
1001
|
+
ignore_dirs=(),
|
|
1002
|
+
ignore_filenames=(),
|
|
1003
|
+
ignore_suffixes=(),
|
|
1004
|
+
only_suffixes=(),
|
|
1005
|
+
normalize=True,
|
|
1006
|
+
raw=False,
|
|
1007
|
+
):
|
|
1008
|
+
return makeIncludedDataDirectory(
|
|
1009
|
+
source_path=source_path,
|
|
1010
|
+
dest_path=dest_path,
|
|
1011
|
+
reason=reason,
|
|
1012
|
+
tracer=self,
|
|
1013
|
+
tags=tags,
|
|
1014
|
+
ignore_dirs=ignore_dirs,
|
|
1015
|
+
ignore_filenames=ignore_filenames,
|
|
1016
|
+
ignore_suffixes=ignore_suffixes,
|
|
1017
|
+
only_suffixes=only_suffixes,
|
|
1018
|
+
normalize=normalize,
|
|
1019
|
+
raw=raw,
|
|
1020
|
+
)
|
|
1021
|
+
|
|
1022
|
+
def makeIncludedEmptyDirectory(self, dest_path, reason, tags):
|
|
1023
|
+
return makeIncludedEmptyDirectory(
|
|
1024
|
+
dest_path=dest_path,
|
|
1025
|
+
reason=reason,
|
|
1026
|
+
tracer=self,
|
|
1027
|
+
tags=tags,
|
|
1028
|
+
)
|
|
1029
|
+
|
|
1030
|
+
def makeIncludedPackageDataFiles(
|
|
1031
|
+
self, package_name, package_directory, pattern, reason, tags
|
|
1032
|
+
):
|
|
1033
|
+
return makeIncludedPackageDataFiles(
|
|
1034
|
+
tracer=self,
|
|
1035
|
+
package_name=ModuleName(package_name),
|
|
1036
|
+
package_directory=package_directory,
|
|
1037
|
+
pattern=pattern,
|
|
1038
|
+
reason=reason,
|
|
1039
|
+
tags=tags,
|
|
1040
|
+
)
|
|
1041
|
+
|
|
1042
|
+
def updateDataFileTags(self, included_datafile):
|
|
1043
|
+
"""Add or remove data file tags."""
|
|
1044
|
+
|
|
1045
|
+
def onDataFileTags(self, included_datafile):
|
|
1046
|
+
"""Action on data file tags."""
|
|
1047
|
+
|
|
1048
|
+
def onBeforeCodeParsing(self):
|
|
1049
|
+
"""Prepare for code parsing, normally not needed."""
|
|
1050
|
+
|
|
1051
|
+
def onStandaloneDistributionFinished(self, dist_dir):
|
|
1052
|
+
"""Called after successfully creating a standalone distribution.
|
|
1053
|
+
|
|
1054
|
+
Note:
|
|
1055
|
+
It is up to the plugin to take subsequent action. Examples are:
|
|
1056
|
+
insert additional information (license, copyright, company or
|
|
1057
|
+
application description), create installation material, further
|
|
1058
|
+
folder clean-up, start downstream applications etc.
|
|
1059
|
+
|
|
1060
|
+
Args:
|
|
1061
|
+
dist_dir: the created distribution folder
|
|
1062
|
+
|
|
1063
|
+
Returns:
|
|
1064
|
+
None
|
|
1065
|
+
"""
|
|
1066
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1067
|
+
return None
|
|
1068
|
+
|
|
1069
|
+
def onOnefileFinished(self, filename):
|
|
1070
|
+
"""Called after successfully creating a onefile executable.
|
|
1071
|
+
|
|
1072
|
+
Note:
|
|
1073
|
+
It is up to the plugin to take subsequent action. Examples are:
|
|
1074
|
+
insert additional information (license, copyright, company or
|
|
1075
|
+
application description), create installation material, further
|
|
1076
|
+
folder clean-up, start downstream applications etc.
|
|
1077
|
+
|
|
1078
|
+
Args:
|
|
1079
|
+
filename: the created onefile executable
|
|
1080
|
+
|
|
1081
|
+
Returns:
|
|
1082
|
+
None
|
|
1083
|
+
"""
|
|
1084
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1085
|
+
return None
|
|
1086
|
+
|
|
1087
|
+
def onBootstrapBinary(self, filename):
|
|
1088
|
+
"""Called after successfully creating a bootstrap binary, but without payload.
|
|
1089
|
+
|
|
1090
|
+
Args:
|
|
1091
|
+
filename: the created bootstrap binary, will be modified later
|
|
1092
|
+
|
|
1093
|
+
Returns:
|
|
1094
|
+
None
|
|
1095
|
+
"""
|
|
1096
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1097
|
+
return None
|
|
1098
|
+
|
|
1099
|
+
def onStandaloneBinary(self, filename):
|
|
1100
|
+
"""Called after successfully creating a standalone binary.
|
|
1101
|
+
|
|
1102
|
+
Args:
|
|
1103
|
+
filename: the created standalone binary
|
|
1104
|
+
|
|
1105
|
+
Returns:
|
|
1106
|
+
None
|
|
1107
|
+
"""
|
|
1108
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1109
|
+
return None
|
|
1110
|
+
|
|
1111
|
+
def onFinalResult(self, filename):
|
|
1112
|
+
"""Called after successfully finishing a compilation.
|
|
1113
|
+
|
|
1114
|
+
Note:
|
|
1115
|
+
Plugins normally don't need this, and what filename is will be
|
|
1116
|
+
heavily dependent on compilation modes. Actions can be take here,
|
|
1117
|
+
e.g. commercial plugins output generated keys near that executable
|
|
1118
|
+
path.
|
|
1119
|
+
Args:
|
|
1120
|
+
filename: the created binary (module, accelerated exe, dist exe, onefile exe)
|
|
1121
|
+
|
|
1122
|
+
Returns:
|
|
1123
|
+
None
|
|
1124
|
+
"""
|
|
1125
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1126
|
+
return None
|
|
1127
|
+
|
|
1128
|
+
def suppressUnknownImportWarning(self, importing, module_name, source_ref):
|
|
1129
|
+
"""Suppress import warnings for unknown modules.
|
|
1130
|
+
|
|
1131
|
+
Args:
|
|
1132
|
+
importing: the module object
|
|
1133
|
+
module_name: name of module
|
|
1134
|
+
source_ref: ???
|
|
1135
|
+
Returns:
|
|
1136
|
+
True or False
|
|
1137
|
+
"""
|
|
1138
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1139
|
+
return False
|
|
1140
|
+
|
|
1141
|
+
def decideCompilation(self, module_name):
|
|
1142
|
+
"""Decide whether to compile a module (or just use its bytecode).
|
|
1143
|
+
|
|
1144
|
+
Notes:
|
|
1145
|
+
The first plugin not returning None makes the decision. Thereafter,
|
|
1146
|
+
no other plugins will be checked. If all plugins return None, the
|
|
1147
|
+
module will be compiled.
|
|
1148
|
+
|
|
1149
|
+
Args:
|
|
1150
|
+
module_name: name of module
|
|
1151
|
+
|
|
1152
|
+
Returns:
|
|
1153
|
+
"compiled" or "bytecode" or None (no opinion, use by default)
|
|
1154
|
+
"""
|
|
1155
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1156
|
+
return None
|
|
1157
|
+
|
|
1158
|
+
def decideAnnotations(self, module_name):
|
|
1159
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1160
|
+
return None
|
|
1161
|
+
|
|
1162
|
+
def decideDocStrings(self, module_name):
|
|
1163
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1164
|
+
return None
|
|
1165
|
+
|
|
1166
|
+
def decideAssertions(self, module_name):
|
|
1167
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1168
|
+
return None
|
|
1169
|
+
|
|
1170
|
+
def getPreprocessorSymbols(self):
|
|
1171
|
+
"""Decide which C defines to be used in compilation.
|
|
1172
|
+
|
|
1173
|
+
Notes:
|
|
1174
|
+
The plugins can each contribute, but are hopefully using
|
|
1175
|
+
a namespace for their defines.
|
|
1176
|
+
|
|
1177
|
+
Returns:
|
|
1178
|
+
None for no defines, otherwise dictionary of key to be
|
|
1179
|
+
defined, and non-None values if any, i.e. no "-Dkey" only
|
|
1180
|
+
"""
|
|
1181
|
+
# Virtual method, pylint: disable=no-self-use
|
|
1182
|
+
# spell-checker: ignore -Dkey
|
|
1183
|
+
return None
|
|
1184
|
+
|
|
1185
|
+
def getBuildDefinitions(self):
|
|
1186
|
+
"""Decide C source defines to be used in compilation.
|
|
1187
|
+
|
|
1188
|
+
Notes:
|
|
1189
|
+
Make sure to use a namespace for your defines, and prefer
|
|
1190
|
+
`getPreprocessorSymbols` if you can.
|
|
1191
|
+
|
|
1192
|
+
Returns:
|
|
1193
|
+
dict or None for no values
|
|
1194
|
+
"""
|
|
1195
|
+
# Virtual method, pylint: disable=no-self-use
|
|
1196
|
+
return None
|
|
1197
|
+
|
|
1198
|
+
def getExtraIncludeDirectories(self):
|
|
1199
|
+
"""Decide which extra directories to use for C includes in compilation.
|
|
1200
|
+
|
|
1201
|
+
Returns:
|
|
1202
|
+
List of directories or None by default
|
|
1203
|
+
"""
|
|
1204
|
+
|
|
1205
|
+
# Virtual method, pylint: disable=no-self-use
|
|
1206
|
+
return None
|
|
1207
|
+
|
|
1208
|
+
@classmethod
|
|
1209
|
+
def getPluginDataFilesDir(cls):
|
|
1210
|
+
"""Helper function that returns path, where data files for the plugin are stored."""
|
|
1211
|
+
plugin_filename = sys.modules[cls.__module__].__file__
|
|
1212
|
+
return changeFilenameExtension(plugin_filename, "")
|
|
1213
|
+
|
|
1214
|
+
def getPluginDataFileContents(self, filename):
|
|
1215
|
+
"""Helper function that returns contents of a plugin data file."""
|
|
1216
|
+
return getFileContents(
|
|
1217
|
+
os.path.join(
|
|
1218
|
+
self.getPluginDataFilesDir(),
|
|
1219
|
+
filename,
|
|
1220
|
+
)
|
|
1221
|
+
)
|
|
1222
|
+
|
|
1223
|
+
@staticmethod
|
|
1224
|
+
def getReportSourceReference(source_ref):
|
|
1225
|
+
"""Format a source reference suitable for user output."""
|
|
1226
|
+
return getReportSourceReference(source_ref)
|
|
1227
|
+
|
|
1228
|
+
def getExtraCodeFiles(self):
|
|
1229
|
+
"""Add extra code files to the compilation.
|
|
1230
|
+
|
|
1231
|
+
Notes:
|
|
1232
|
+
This is generally a bad idea to use unless you absolutely
|
|
1233
|
+
know what you are doing.
|
|
1234
|
+
|
|
1235
|
+
Returns:
|
|
1236
|
+
None for no extra codes, otherwise dictionary of key to be
|
|
1237
|
+
filename, and value to be source code.
|
|
1238
|
+
"""
|
|
1239
|
+
|
|
1240
|
+
# Virtual method, pylint: disable=no-self-use
|
|
1241
|
+
return None
|
|
1242
|
+
|
|
1243
|
+
def getExtraLinkLibraries(self):
|
|
1244
|
+
"""Decide which link library should be added.
|
|
1245
|
+
|
|
1246
|
+
Notes:
|
|
1247
|
+
Names provided multiple times, e.g. by multiple plugins are
|
|
1248
|
+
only added once.
|
|
1249
|
+
|
|
1250
|
+
Returns:
|
|
1251
|
+
None for no extra link library, otherwise the name as a **str**
|
|
1252
|
+
or an iterable of names of link libraries.
|
|
1253
|
+
"""
|
|
1254
|
+
|
|
1255
|
+
# Virtual method, pylint: disable=no-self-use
|
|
1256
|
+
return None
|
|
1257
|
+
|
|
1258
|
+
def getExtraLinkDirectories(self):
|
|
1259
|
+
"""Decide which link directories should be added.
|
|
1260
|
+
|
|
1261
|
+
Notes:
|
|
1262
|
+
Directories provided multiple times, e.g. by multiple plugins are
|
|
1263
|
+
only added once.
|
|
1264
|
+
|
|
1265
|
+
Returns:
|
|
1266
|
+
None for no extra link directory, otherwise the name as a **str**
|
|
1267
|
+
or an iterable of names of link directories.
|
|
1268
|
+
"""
|
|
1269
|
+
|
|
1270
|
+
# Virtual method, pylint: disable=no-self-use
|
|
1271
|
+
return None
|
|
1272
|
+
|
|
1273
|
+
def warnUnusedPlugin(self, message):
|
|
1274
|
+
"""An inactive plugin may issue a warning if it believes this may be wrong.
|
|
1275
|
+
|
|
1276
|
+
Returns:
|
|
1277
|
+
None
|
|
1278
|
+
"""
|
|
1279
|
+
if self.plugin_name not in _warned_unused_plugins:
|
|
1280
|
+
_warned_unused_plugins.add(self.plugin_name)
|
|
1281
|
+
|
|
1282
|
+
plugins_logger.warning(
|
|
1283
|
+
"Use '--enable-plugin=%s' for: %s" % (self.plugin_name, message)
|
|
1284
|
+
)
|
|
1285
|
+
|
|
1286
|
+
def onDataComposerRun(self):
|
|
1287
|
+
"""Internal use only.
|
|
1288
|
+
|
|
1289
|
+
Returns:
|
|
1290
|
+
None
|
|
1291
|
+
"""
|
|
1292
|
+
# Virtual method, pylint: disable=no-self-use
|
|
1293
|
+
return None
|
|
1294
|
+
|
|
1295
|
+
def onDataComposerResult(self, blob_filename):
|
|
1296
|
+
"""Internal use only.
|
|
1297
|
+
|
|
1298
|
+
Returns:
|
|
1299
|
+
None
|
|
1300
|
+
"""
|
|
1301
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1302
|
+
return None
|
|
1303
|
+
|
|
1304
|
+
def encodeDataComposerName(self, data_name):
|
|
1305
|
+
"""Internal use only.
|
|
1306
|
+
|
|
1307
|
+
Returns:
|
|
1308
|
+
None
|
|
1309
|
+
"""
|
|
1310
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1311
|
+
return None
|
|
1312
|
+
|
|
1313
|
+
_runtime_information_cache = {}
|
|
1314
|
+
|
|
1315
|
+
def queryRuntimeInformationMultiple(self, info_name, setup_codes, values):
|
|
1316
|
+
# Rather complicated error handling, pylint: disable=too-many-branches
|
|
1317
|
+
|
|
1318
|
+
info_name = self.plugin_name + "_" + info_name
|
|
1319
|
+
info_name = info_name.replace("-", "_").replace(".", "_")
|
|
1320
|
+
|
|
1321
|
+
if info_name in self._runtime_information_cache:
|
|
1322
|
+
return self._runtime_information_cache[info_name]
|
|
1323
|
+
|
|
1324
|
+
keys = []
|
|
1325
|
+
query_codes = []
|
|
1326
|
+
|
|
1327
|
+
for key, value_expression in values:
|
|
1328
|
+
keys.append(key)
|
|
1329
|
+
|
|
1330
|
+
query_codes.append("print(repr(%s))" % value_expression)
|
|
1331
|
+
query_codes.append('print("-" * 27)')
|
|
1332
|
+
|
|
1333
|
+
if type(setup_codes) is str:
|
|
1334
|
+
setup_codes = setup_codes.splitlines()
|
|
1335
|
+
|
|
1336
|
+
if not setup_codes:
|
|
1337
|
+
setup_codes = ("pass",)
|
|
1338
|
+
|
|
1339
|
+
cmd = r"""\
|
|
1340
|
+
from __future__ import print_function
|
|
1341
|
+
from __future__ import absolute_import
|
|
1342
|
+
import sys
|
|
1343
|
+
|
|
1344
|
+
try:
|
|
1345
|
+
%(setup_codes)s
|
|
1346
|
+
except ImportError as e:
|
|
1347
|
+
sys.stderr.write("\n%%s" %% repr(e))
|
|
1348
|
+
sys.exit(38)
|
|
1349
|
+
try:
|
|
1350
|
+
%(query_codes)s
|
|
1351
|
+
except Exception as e:
|
|
1352
|
+
sys.stderr.write("\n%%s" %% repr(e))
|
|
1353
|
+
sys.exit(39)
|
|
1354
|
+
""" % {
|
|
1355
|
+
"setup_codes": "\n".join(" %s" % line for line in setup_codes),
|
|
1356
|
+
"query_codes": "\n".join(" %s" % line for line in query_codes),
|
|
1357
|
+
}
|
|
1358
|
+
|
|
1359
|
+
if shallShowExecutedCommands():
|
|
1360
|
+
self.info("Executing query command:\n%s" % cmd, keep_format=True)
|
|
1361
|
+
|
|
1362
|
+
env = dict(os.environ)
|
|
1363
|
+
env["PYTHONIOENCODING"] = "utf8"
|
|
1364
|
+
|
|
1365
|
+
command = [sys.executable, "-c", cmd]
|
|
1366
|
+
|
|
1367
|
+
if isMacOS():
|
|
1368
|
+
command = ["arch", "-" + Options.getMacOSTargetArch()] + command
|
|
1369
|
+
|
|
1370
|
+
try:
|
|
1371
|
+
feedback = check_output(command, env=env)
|
|
1372
|
+
except NuitkaCalledProcessError as e:
|
|
1373
|
+
if e.returncode == 38:
|
|
1374
|
+
self.warning(
|
|
1375
|
+
"Import error (not installed?) during compile time command execution: %s"
|
|
1376
|
+
% e.stderr.splitlines()[-1]
|
|
1377
|
+
)
|
|
1378
|
+
|
|
1379
|
+
return None
|
|
1380
|
+
|
|
1381
|
+
if Options.is_debug:
|
|
1382
|
+
self.info(cmd, keep_format=True)
|
|
1383
|
+
|
|
1384
|
+
if e.returncode == 39:
|
|
1385
|
+
# TODO: Recognize the ModuleNotFoundError or ImportError exceptions
|
|
1386
|
+
# and output the missing module.
|
|
1387
|
+
self.warning(
|
|
1388
|
+
"Exception during compile time command execution: %s"
|
|
1389
|
+
% e.stderr.splitlines()[-1]
|
|
1390
|
+
)
|
|
1391
|
+
|
|
1392
|
+
return None
|
|
1393
|
+
|
|
1394
|
+
raise
|
|
1395
|
+
|
|
1396
|
+
if str is not bytes: # We want to work with strings, that's hopefully OK.
|
|
1397
|
+
feedback = feedback.decode("utf8")
|
|
1398
|
+
|
|
1399
|
+
if shallShowExecutedCommands():
|
|
1400
|
+
self.info("Result of query command:\n%s" % feedback)
|
|
1401
|
+
|
|
1402
|
+
# Ignore Windows newlines difference.
|
|
1403
|
+
feedback = [line.strip() for line in feedback.splitlines()]
|
|
1404
|
+
|
|
1405
|
+
if feedback.count("-" * 27) != len(keys):
|
|
1406
|
+
self.sysexit(
|
|
1407
|
+
"Error, mismatch in output retrieving %r information." % info_name
|
|
1408
|
+
)
|
|
1409
|
+
|
|
1410
|
+
feedback = [line for line in feedback if line != "-" * 27]
|
|
1411
|
+
|
|
1412
|
+
NamedtupleResultClass = makeNamedtupleClass(info_name, keys)
|
|
1413
|
+
|
|
1414
|
+
try:
|
|
1415
|
+
self._runtime_information_cache[info_name] = NamedtupleResultClass(
|
|
1416
|
+
*(_literal_eval(value) for value in feedback)
|
|
1417
|
+
)
|
|
1418
|
+
except ValueError:
|
|
1419
|
+
self.sysexit(
|
|
1420
|
+
"Error, non-constant values in output retrieving %r information."
|
|
1421
|
+
% info_name
|
|
1422
|
+
)
|
|
1423
|
+
|
|
1424
|
+
return self._runtime_information_cache[info_name]
|
|
1425
|
+
|
|
1426
|
+
def queryRuntimeInformationSingle(self, setup_codes, value, info_name=None):
|
|
1427
|
+
if info_name is None:
|
|
1428
|
+
info_name = "temp_info_for_" + self.plugin_name.replace("-", "_")
|
|
1429
|
+
|
|
1430
|
+
return self.queryRuntimeInformationMultiple(
|
|
1431
|
+
info_name=info_name,
|
|
1432
|
+
setup_codes=setup_codes,
|
|
1433
|
+
values=(("key", value),),
|
|
1434
|
+
).key
|
|
1435
|
+
|
|
1436
|
+
def onFunctionBodyParsing(self, module_name, function_name, body):
|
|
1437
|
+
"""Provide a different function body for the function of that module.
|
|
1438
|
+
|
|
1439
|
+
Should return a boolean, indicating if any actual change was done.
|
|
1440
|
+
"""
|
|
1441
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1442
|
+
return False
|
|
1443
|
+
|
|
1444
|
+
def onClassBodyParsing(self, module_name, class_name, node):
|
|
1445
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1446
|
+
"""Provide a different class body for the class of that module.
|
|
1447
|
+
|
|
1448
|
+
Should return a boolean, indicating if any actual change was done.
|
|
1449
|
+
"""
|
|
1450
|
+
return False
|
|
1451
|
+
|
|
1452
|
+
def getCacheContributionValues(self, module_name):
|
|
1453
|
+
"""Provide values that represent the include of a plugin on the compilation.
|
|
1454
|
+
|
|
1455
|
+
This must be used to invalidate cache results, e.g. when using the
|
|
1456
|
+
onFunctionBodyParsing function, and other things, that do not directly
|
|
1457
|
+
affect the source code. By default a plugin being enabled changes the
|
|
1458
|
+
result unless it makes it clear that is not the case.
|
|
1459
|
+
"""
|
|
1460
|
+
# Virtual method, pylint: disable=unused-argument
|
|
1461
|
+
return self.plugin_name
|
|
1462
|
+
|
|
1463
|
+
def getExtraConstantDefaultPopulation(self):
|
|
1464
|
+
"""Provide extra global constant values to code generation."""
|
|
1465
|
+
# Virtual method, pylint: disable=no-self-use
|
|
1466
|
+
return ()
|
|
1467
|
+
|
|
1468
|
+
def decideAllowOutsideDependencies(self, module_name):
|
|
1469
|
+
"""Decide if outside of Python dependencies are allowed.
|
|
1470
|
+
|
|
1471
|
+
Returns:
|
|
1472
|
+
None (no opinion for that module), True (yes) or False (no)
|
|
1473
|
+
"""
|
|
1474
|
+
# Virtual method, pylint: disable=no-self-use,unused-argument
|
|
1475
|
+
return None
|
|
1476
|
+
|
|
1477
|
+
@staticmethod
|
|
1478
|
+
def getPackageVersion(module_name):
|
|
1479
|
+
"""Provide package version of a distribution."""
|
|
1480
|
+
distribution_name = _getDistributionNameFromPackageName(module_name)
|
|
1481
|
+
|
|
1482
|
+
return _getPackageVersion(distribution_name)
|
|
1483
|
+
|
|
1484
|
+
def getEvaluationConditionControlTags(self):
|
|
1485
|
+
# Virtual method, pylint: disable=no-self-use
|
|
1486
|
+
return {}
|
|
1487
|
+
|
|
1488
|
+
@staticmethod
|
|
1489
|
+
def isValueForEvaluation(expression):
|
|
1490
|
+
return '"' in expression or "'" in expression or "(" in expression
|
|
1491
|
+
|
|
1492
|
+
def evaluateExpressionOrConstant(
|
|
1493
|
+
self, full_name, expression, config_name, extra_context, single_value
|
|
1494
|
+
):
|
|
1495
|
+
if self.isValueForEvaluation(expression):
|
|
1496
|
+
return self.evaluateExpression(
|
|
1497
|
+
config_module_name=full_name,
|
|
1498
|
+
module_name=full_name,
|
|
1499
|
+
expression=expression,
|
|
1500
|
+
config_name=config_name,
|
|
1501
|
+
extra_context=extra_context,
|
|
1502
|
+
single_value=single_value,
|
|
1503
|
+
)
|
|
1504
|
+
else:
|
|
1505
|
+
return expression
|
|
1506
|
+
|
|
1507
|
+
def getExpressionConstants(self, full_name):
|
|
1508
|
+
if full_name not in _module_config_constants:
|
|
1509
|
+
constants = {}
|
|
1510
|
+
|
|
1511
|
+
for count, constant_config in enumerate(
|
|
1512
|
+
self.config.get(full_name, section="constants"), start=1
|
|
1513
|
+
):
|
|
1514
|
+
declarations = constant_config.get("declarations")
|
|
1515
|
+
|
|
1516
|
+
if declarations and self.evaluateCondition(
|
|
1517
|
+
full_name=full_name,
|
|
1518
|
+
condition=constant_config.get("when", "True"),
|
|
1519
|
+
allow_constants=False,
|
|
1520
|
+
allow_variables=False,
|
|
1521
|
+
):
|
|
1522
|
+
for constant_name, constant_value in declarations.items():
|
|
1523
|
+
constants[constant_name] = self.evaluateExpressionOrConstant(
|
|
1524
|
+
full_name=full_name,
|
|
1525
|
+
expression=constant_value,
|
|
1526
|
+
config_name="constants config #%d" % count,
|
|
1527
|
+
extra_context=None,
|
|
1528
|
+
single_value=False,
|
|
1529
|
+
)
|
|
1530
|
+
|
|
1531
|
+
_module_config_constants[full_name] = constants
|
|
1532
|
+
|
|
1533
|
+
return _module_config_constants[full_name]
|
|
1534
|
+
|
|
1535
|
+
def getExpressionVariables(self, full_name):
|
|
1536
|
+
if full_name not in _module_config_variables:
|
|
1537
|
+
variables = {}
|
|
1538
|
+
|
|
1539
|
+
for count, variable_config in enumerate(
|
|
1540
|
+
self.config.get(full_name, section="variables")
|
|
1541
|
+
):
|
|
1542
|
+
environment = variable_config.get("environment", {})
|
|
1543
|
+
setup_codes = variable_config.get("setup_code", [])
|
|
1544
|
+
if type(setup_codes) is str:
|
|
1545
|
+
setup_codes = setup_codes.splitlines()
|
|
1546
|
+
declarations = variable_config.get("declarations", {})
|
|
1547
|
+
|
|
1548
|
+
if len(declarations) < 1:
|
|
1549
|
+
self.sysexit(
|
|
1550
|
+
"Error, no variable 'declarations' for %s makes no sense."
|
|
1551
|
+
% full_name
|
|
1552
|
+
)
|
|
1553
|
+
|
|
1554
|
+
if self.evaluateCondition(
|
|
1555
|
+
full_name=full_name,
|
|
1556
|
+
condition=variable_config.get("when", "True"),
|
|
1557
|
+
allow_constants=True,
|
|
1558
|
+
allow_variables=False,
|
|
1559
|
+
):
|
|
1560
|
+
setup_codes.extend(
|
|
1561
|
+
"%s=%r" % (constant_name, constant_value)
|
|
1562
|
+
for (
|
|
1563
|
+
constant_name,
|
|
1564
|
+
constant_value,
|
|
1565
|
+
) in self.getExpressionConstants(full_name=full_name).items()
|
|
1566
|
+
)
|
|
1567
|
+
|
|
1568
|
+
env_variables = {}
|
|
1569
|
+
|
|
1570
|
+
for env_name, env_value in environment.items():
|
|
1571
|
+
env_variables[env_name] = self.evaluateExpressionOrConstant(
|
|
1572
|
+
full_name=full_name,
|
|
1573
|
+
expression=env_value,
|
|
1574
|
+
config_name="variables config #%d" % count,
|
|
1575
|
+
extra_context=None,
|
|
1576
|
+
single_value=True,
|
|
1577
|
+
)
|
|
1578
|
+
|
|
1579
|
+
with withEnvironmentVarsOverridden(env_variables):
|
|
1580
|
+
info = self.queryRuntimeInformationMultiple(
|
|
1581
|
+
"%s_variables_%s" % (full_name.asString(), count),
|
|
1582
|
+
setup_codes=setup_codes,
|
|
1583
|
+
values=tuple(declarations.items()),
|
|
1584
|
+
)
|
|
1585
|
+
|
|
1586
|
+
if Options.isExperimental("display-yaml-variables"):
|
|
1587
|
+
self.info("Evaluated %r" % info)
|
|
1588
|
+
|
|
1589
|
+
if info is None:
|
|
1590
|
+
self.sysexit(
|
|
1591
|
+
"Error, failed to evaluate variables for '%s'." % full_name
|
|
1592
|
+
)
|
|
1593
|
+
|
|
1594
|
+
variables.update(info.asDict())
|
|
1595
|
+
|
|
1596
|
+
_module_config_variables[full_name] = variables
|
|
1597
|
+
|
|
1598
|
+
return _module_config_variables[full_name]
|
|
1599
|
+
|
|
1600
|
+
def evaluateExpression(
|
|
1601
|
+
self,
|
|
1602
|
+
config_module_name,
|
|
1603
|
+
module_name,
|
|
1604
|
+
expression,
|
|
1605
|
+
config_name,
|
|
1606
|
+
extra_context,
|
|
1607
|
+
single_value,
|
|
1608
|
+
):
|
|
1609
|
+
context = _makeEvaluationContext(
|
|
1610
|
+
logger=self, full_name=config_module_name, config_name=config_name
|
|
1611
|
+
)
|
|
1612
|
+
|
|
1613
|
+
def get_variable(variable_name):
|
|
1614
|
+
assert type(variable_name) is str, variable_name
|
|
1615
|
+
|
|
1616
|
+
result = self.getExpressionVariables(full_name=config_module_name)[
|
|
1617
|
+
variable_name
|
|
1618
|
+
]
|
|
1619
|
+
|
|
1620
|
+
addModuleInfluencingVariable(
|
|
1621
|
+
module_name=module_name,
|
|
1622
|
+
config_module_name=config_module_name,
|
|
1623
|
+
plugin_name=self.plugin_name,
|
|
1624
|
+
variable_name=variable_name,
|
|
1625
|
+
control_tags=context.used_tags,
|
|
1626
|
+
result=result,
|
|
1627
|
+
)
|
|
1628
|
+
|
|
1629
|
+
return result
|
|
1630
|
+
|
|
1631
|
+
def get_constant(constant_name):
|
|
1632
|
+
assert type(constant_name) is str, constant_name
|
|
1633
|
+
|
|
1634
|
+
result = self.getExpressionConstants(full_name=config_module_name)[
|
|
1635
|
+
constant_name
|
|
1636
|
+
]
|
|
1637
|
+
|
|
1638
|
+
# TODO: Record the constant value in report.
|
|
1639
|
+
|
|
1640
|
+
return result
|
|
1641
|
+
|
|
1642
|
+
context["get_variable"] = get_variable
|
|
1643
|
+
context["get_constant"] = get_constant
|
|
1644
|
+
|
|
1645
|
+
def get_parameter(parameter_name, default):
|
|
1646
|
+
result = Options.getModuleParameter(config_module_name, parameter_name)
|
|
1647
|
+
|
|
1648
|
+
if result is None:
|
|
1649
|
+
result = default
|
|
1650
|
+
|
|
1651
|
+
self.addModuleInfluencingParameter(
|
|
1652
|
+
module_name=config_module_name,
|
|
1653
|
+
parameter_name=parameter_name,
|
|
1654
|
+
condition_tags_used=context.used_tags,
|
|
1655
|
+
result=result,
|
|
1656
|
+
)
|
|
1657
|
+
|
|
1658
|
+
return result
|
|
1659
|
+
|
|
1660
|
+
context["get_parameter"] = get_parameter
|
|
1661
|
+
|
|
1662
|
+
if extra_context:
|
|
1663
|
+
context.update(extra_context)
|
|
1664
|
+
|
|
1665
|
+
with withNoWarning():
|
|
1666
|
+
# We trust the yaml files, pylint: disable=eval-used
|
|
1667
|
+
try:
|
|
1668
|
+
result = eval(expression, context)
|
|
1669
|
+
except Exception as e: # Catch all the things, pylint: disable=broad-except
|
|
1670
|
+
if Options.is_debug:
|
|
1671
|
+
raise
|
|
1672
|
+
|
|
1673
|
+
self.sysexit(
|
|
1674
|
+
"Error, failed to evaluate expression %r in this context, exception was '%r'."
|
|
1675
|
+
% (expression, e)
|
|
1676
|
+
)
|
|
1677
|
+
|
|
1678
|
+
if type(result) not in (str, unicode):
|
|
1679
|
+
if single_value:
|
|
1680
|
+
self._checkStrResult(
|
|
1681
|
+
value=result, expression=expression, full_name=config_module_name
|
|
1682
|
+
)
|
|
1683
|
+
else:
|
|
1684
|
+
self._checkSequenceResult(
|
|
1685
|
+
value=result, expression=expression, full_name=config_module_name
|
|
1686
|
+
)
|
|
1687
|
+
|
|
1688
|
+
for v in result:
|
|
1689
|
+
self._checkStrResult(
|
|
1690
|
+
value=v, expression=expression, full_name=config_module_name
|
|
1691
|
+
)
|
|
1692
|
+
|
|
1693
|
+
# Make it immutable in case it's a list.
|
|
1694
|
+
result = tuple(result)
|
|
1695
|
+
|
|
1696
|
+
return result
|
|
1697
|
+
|
|
1698
|
+
def _checkStrResult(self, value, expression, full_name):
|
|
1699
|
+
if type(value) not in (str, unicode):
|
|
1700
|
+
self.sysexit(
|
|
1701
|
+
"""\
|
|
1702
|
+
Error, expression '%s' for module '%s' did not evaluate to 'str', 'tuple[str]' or 'list[str]' result, but '%s'"""
|
|
1703
|
+
% (expression, full_name, type(value))
|
|
1704
|
+
)
|
|
1705
|
+
|
|
1706
|
+
def _checkSequenceResult(self, value, expression, full_name):
|
|
1707
|
+
if type(value) not in (tuple, list):
|
|
1708
|
+
self.sysexit(
|
|
1709
|
+
"""\
|
|
1710
|
+
Error, expression '%s' for module '%s' did not evaluate to 'tuple[str]' or 'list[str]' result."""
|
|
1711
|
+
% (expression, full_name)
|
|
1712
|
+
)
|
|
1713
|
+
|
|
1714
|
+
def evaluateCondition(
|
|
1715
|
+
self, full_name, condition, allow_constants=True, allow_variables=True
|
|
1716
|
+
):
|
|
1717
|
+
# Note: Caching makes no sense yet, this should all be very fast and
|
|
1718
|
+
# cache themselves. TODO: Allow plugins to contribute their own control
|
|
1719
|
+
# tag values during creation and during certain actions.
|
|
1720
|
+
if condition == "True":
|
|
1721
|
+
return True
|
|
1722
|
+
if condition == "False":
|
|
1723
|
+
return False
|
|
1724
|
+
|
|
1725
|
+
# TODO: Maybe add module name to config name?
|
|
1726
|
+
context = _makeEvaluationContext(
|
|
1727
|
+
logger=self, full_name=full_name, config_name="'when' configuration"
|
|
1728
|
+
)
|
|
1729
|
+
|
|
1730
|
+
def get_variable(variable_name):
|
|
1731
|
+
assert type(variable_name) is str, variable_name
|
|
1732
|
+
|
|
1733
|
+
result = self.getExpressionVariables(full_name=full_name)[variable_name]
|
|
1734
|
+
|
|
1735
|
+
addModuleInfluencingVariable(
|
|
1736
|
+
module_name=full_name,
|
|
1737
|
+
config_module_name=full_name,
|
|
1738
|
+
plugin_name=self.plugin_name,
|
|
1739
|
+
variable_name=variable_name,
|
|
1740
|
+
control_tags=context.used_tags,
|
|
1741
|
+
result=result,
|
|
1742
|
+
)
|
|
1743
|
+
|
|
1744
|
+
return result
|
|
1745
|
+
|
|
1746
|
+
def get_constant(constant_name):
|
|
1747
|
+
assert type(constant_name) is str, constant_name
|
|
1748
|
+
|
|
1749
|
+
result = self.getExpressionConstants(full_name=full_name)[constant_name]
|
|
1750
|
+
|
|
1751
|
+
# TODO: Record the constant value in report.
|
|
1752
|
+
|
|
1753
|
+
return result
|
|
1754
|
+
|
|
1755
|
+
if allow_constants:
|
|
1756
|
+
context["get_constant"] = get_constant
|
|
1757
|
+
if allow_variables:
|
|
1758
|
+
context["get_variable"] = get_variable
|
|
1759
|
+
|
|
1760
|
+
def get_parameter(parameter_name, default):
|
|
1761
|
+
result = Options.getModuleParameter(full_name, parameter_name)
|
|
1762
|
+
|
|
1763
|
+
if result is None:
|
|
1764
|
+
result = default
|
|
1765
|
+
|
|
1766
|
+
self.addModuleInfluencingParameter(
|
|
1767
|
+
module_name=full_name,
|
|
1768
|
+
parameter_name=parameter_name,
|
|
1769
|
+
condition_tags_used=context.used_tags,
|
|
1770
|
+
result=result,
|
|
1771
|
+
)
|
|
1772
|
+
|
|
1773
|
+
return result
|
|
1774
|
+
|
|
1775
|
+
context["get_parameter"] = get_parameter
|
|
1776
|
+
|
|
1777
|
+
with withNoWarning():
|
|
1778
|
+
# We trust the yaml files, pylint: disable=eval-used
|
|
1779
|
+
try:
|
|
1780
|
+
result = eval(condition, context)
|
|
1781
|
+
except Exception as e: # Catch all the things, pylint: disable=broad-except
|
|
1782
|
+
if Options.is_debug:
|
|
1783
|
+
raise
|
|
1784
|
+
|
|
1785
|
+
self.sysexit(
|
|
1786
|
+
"Error, failed to evaluate condition '%s' in this context, exception was '%s'."
|
|
1787
|
+
% (condition, e)
|
|
1788
|
+
)
|
|
1789
|
+
|
|
1790
|
+
if type(result) is not bool:
|
|
1791
|
+
self.sysexit(
|
|
1792
|
+
"Error, condition '%s' for module '%s' did not evaluate to boolean result."
|
|
1793
|
+
% (condition, full_name)
|
|
1794
|
+
)
|
|
1795
|
+
|
|
1796
|
+
addModuleInfluencingCondition(
|
|
1797
|
+
module_name=full_name,
|
|
1798
|
+
plugin_name=self.plugin_name,
|
|
1799
|
+
condition=condition,
|
|
1800
|
+
control_tags=context.used_tags,
|
|
1801
|
+
result=result,
|
|
1802
|
+
)
|
|
1803
|
+
|
|
1804
|
+
return result
|
|
1805
|
+
|
|
1806
|
+
def addModuleInfluencingParameter(
|
|
1807
|
+
self, module_name, parameter_name, condition_tags_used, result
|
|
1808
|
+
):
|
|
1809
|
+
addModuleInfluencingParameter(
|
|
1810
|
+
module_name=module_name,
|
|
1811
|
+
plugin_name=self.plugin_name,
|
|
1812
|
+
parameter_name=parameter_name,
|
|
1813
|
+
condition_tags_used=condition_tags_used,
|
|
1814
|
+
result=result,
|
|
1815
|
+
)
|
|
1816
|
+
|
|
1817
|
+
def addModuleInfluencingDetection(
|
|
1818
|
+
self, module_name, detection_name, detection_value
|
|
1819
|
+
):
|
|
1820
|
+
addModuleInfluencingDetection(
|
|
1821
|
+
module_name=module_name,
|
|
1822
|
+
plugin_name=self.plugin_name,
|
|
1823
|
+
detection_name=detection_name,
|
|
1824
|
+
detection_value=detection_value,
|
|
1825
|
+
)
|
|
1826
|
+
|
|
1827
|
+
@classmethod
|
|
1828
|
+
def warning(cls, message, **kwargs):
|
|
1829
|
+
# Doing keyword only arguments manually, to keep older Python compatibility, and avoid
|
|
1830
|
+
# user errors still.
|
|
1831
|
+
mnemonic = kwargs.pop("mnemonic", None)
|
|
1832
|
+
if kwargs:
|
|
1833
|
+
plugins_logger.sysexit("Illegal keyword arguments for self.warning")
|
|
1834
|
+
|
|
1835
|
+
plugins_logger.warning(cls.plugin_name + ": " + message, mnemonic=mnemonic)
|
|
1836
|
+
|
|
1837
|
+
@classmethod
|
|
1838
|
+
def info(cls, message, keep_format=False):
|
|
1839
|
+
plugins_logger.info(message, prefix=cls.plugin_name, keep_format=keep_format)
|
|
1840
|
+
|
|
1841
|
+
@classmethod
|
|
1842
|
+
def debug(cls, message, keep_format=False):
|
|
1843
|
+
if Options.is_debug:
|
|
1844
|
+
cls.info(message, keep_format=keep_format)
|
|
1845
|
+
|
|
1846
|
+
@classmethod
|
|
1847
|
+
def sysexit(cls, message, mnemonic=None, reporting=True):
|
|
1848
|
+
plugins_logger.sysexit(
|
|
1849
|
+
cls.plugin_name + ": " + message, mnemonic=mnemonic, reporting=reporting
|
|
1850
|
+
)
|
|
1851
|
+
|
|
1852
|
+
|
|
1853
|
+
class TagContext(dict):
|
|
1854
|
+
def __init__(self, logger, full_name, config_name):
|
|
1855
|
+
dict.__init__(self)
|
|
1856
|
+
|
|
1857
|
+
self.logger = logger
|
|
1858
|
+
self.full_name = full_name
|
|
1859
|
+
self.config_name = config_name
|
|
1860
|
+
|
|
1861
|
+
self.used_tags = OrderedSet()
|
|
1862
|
+
self.used_variables = OrderedSet()
|
|
1863
|
+
|
|
1864
|
+
def __getitem__(self, key):
|
|
1865
|
+
try:
|
|
1866
|
+
self.used_tags.add(key)
|
|
1867
|
+
|
|
1868
|
+
return dict.__getitem__(self, key)
|
|
1869
|
+
except KeyError:
|
|
1870
|
+
if key.startswith("use_"):
|
|
1871
|
+
return False
|
|
1872
|
+
|
|
1873
|
+
if key == "no_asserts":
|
|
1874
|
+
# TODO: This should be better decoupled.
|
|
1875
|
+
from .Plugins import Plugins
|
|
1876
|
+
|
|
1877
|
+
return Plugins.decideAssertions(self.full_name) is False
|
|
1878
|
+
|
|
1879
|
+
if key == "no_docstrings":
|
|
1880
|
+
from .Plugins import Plugins
|
|
1881
|
+
|
|
1882
|
+
return Plugins.decideDocStrings(self.full_name) is False
|
|
1883
|
+
|
|
1884
|
+
if key == "no_annotations":
|
|
1885
|
+
from .Plugins import Plugins
|
|
1886
|
+
|
|
1887
|
+
return Plugins.decideAnnotations(self.full_name) is False
|
|
1888
|
+
|
|
1889
|
+
self.logger.sysexit(
|
|
1890
|
+
"Identifier '%s' in %s of module '%s' is unknown."
|
|
1891
|
+
% (key, self.config_name, self.full_name)
|
|
1892
|
+
)
|
|
1893
|
+
|
|
1894
|
+
|
|
1895
|
+
def standalone_only(func):
|
|
1896
|
+
"""For plugins that have functionality that should be done in standalone mode only."""
|
|
1897
|
+
|
|
1898
|
+
@functools.wraps(func)
|
|
1899
|
+
def wrapped(*args, **kwargs):
|
|
1900
|
+
if isStandaloneMode():
|
|
1901
|
+
return func(*args, **kwargs)
|
|
1902
|
+
else:
|
|
1903
|
+
if inspect.isgeneratorfunction(func):
|
|
1904
|
+
return ()
|
|
1905
|
+
else:
|
|
1906
|
+
return None
|
|
1907
|
+
|
|
1908
|
+
return wrapped
|
|
1909
|
+
|
|
1910
|
+
|
|
1911
|
+
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
1912
|
+
# integrates with CPython, but also works on its own.
|
|
1913
|
+
#
|
|
1914
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
1915
|
+
# you may not use this file except in compliance with the License.
|
|
1916
|
+
# You may obtain a copy of the License at
|
|
1917
|
+
#
|
|
1918
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
1919
|
+
#
|
|
1920
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
1921
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
1922
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1923
|
+
# See the License for the specific language governing permissions and
|
|
1924
|
+
# limitations under the License.
|