Nuitka-winsvc 2.5.6__cp311-cp311-win_amd64.whl → 2.6.5__cp311-cp311-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_winsvc-2.5.6.data → Nuitka_winsvc-2.6.5.data}/scripts/nuitka-run.cmd +1 -1
- {Nuitka_winsvc-2.5.6.data → Nuitka_winsvc-2.6.5.data}/scripts/nuitka.cmd +1 -1
- {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/METADATA +36 -24
- Nuitka_winsvc-2.6.5.dist-info/RECORD +992 -0
- {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/WHEEL +1 -1
- nuitka/Builtins.py +1 -1
- nuitka/BytecodeCaching.py +15 -4
- nuitka/Bytecodes.py +1 -1
- nuitka/CacheCleanup.py +1 -1
- nuitka/Constants.py +1 -1
- nuitka/Errors.py +1 -1
- nuitka/HardImportRegistry.py +1 -1
- nuitka/MainControl.py +93 -94
- nuitka/ModuleRegistry.py +19 -4
- nuitka/OptionParsing.py +86 -17
- nuitka/Options.py +230 -106
- nuitka/OutputDirectories.py +5 -3
- nuitka/PostProcessing.py +76 -27
- nuitka/Progress.py +1 -1
- nuitka/PythonFlavors.py +24 -3
- nuitka/PythonOperators.py +1 -1
- nuitka/PythonVersions.py +8 -4
- nuitka/Serialization.py +1 -1
- nuitka/SourceCodeReferences.py +1 -1
- nuitka/Tracing.py +2 -1
- nuitka/TreeXML.py +1 -1
- nuitka/Variables.py +1 -1
- nuitka/Version.py +2 -2
- nuitka/__init__.py +1 -1
- nuitka/__main__.py +4 -1
- nuitka/__past__.py +1 -1
- nuitka/build/Backend.scons +44 -66
- nuitka/build/CCompilerVersion.scons +2 -1
- nuitka/build/DataComposerInterface.py +2 -1
- nuitka/build/Offsets.scons +644 -0
- nuitka/build/Onefile.scons +5 -13
- nuitka/build/SconsCaching.py +9 -7
- nuitka/build/SconsCompilerSettings.py +57 -35
- nuitka/build/SconsHacks.py +3 -3
- nuitka/build/SconsInterface.py +86 -58
- nuitka/build/SconsProgress.py +12 -5
- nuitka/build/SconsSpawn.py +3 -3
- nuitka/build/SconsUtils.py +20 -1
- nuitka/build/__init__.py +1 -1
- nuitka/build/include/nuitka/allocator.h +3 -1
- nuitka/build/include/nuitka/builtins.h +1 -1
- nuitka/build/include/nuitka/calling.h +1 -1
- nuitka/build/include/nuitka/checkers.h +1 -1
- nuitka/build/include/nuitka/checksum_tools.h +1 -1
- nuitka/build/include/nuitka/compiled_asyncgen.h +4 -2
- nuitka/build/include/nuitka/compiled_cell.h +1 -1
- nuitka/build/include/nuitka/compiled_coroutine.h +3 -2
- nuitka/build/include/nuitka/compiled_frame.h +6 -13
- nuitka/build/include/nuitka/compiled_function.h +2 -3
- nuitka/build/include/nuitka/compiled_generator.h +3 -2
- nuitka/build/include/nuitka/compiled_method.h +1 -1
- nuitka/build/include/nuitka/constants.h +5 -1
- nuitka/build/include/nuitka/constants_blob.h +1 -1
- nuitka/build/include/nuitka/debug_settings.h +1 -1
- nuitka/build/include/nuitka/environment_variables.h +1 -1
- nuitka/build/include/nuitka/environment_variables_system.h +1 -1
- nuitka/build/include/nuitka/exception_groups.h +1 -1
- nuitka/build/include/nuitka/exceptions.h +2 -2
- nuitka/build/include/nuitka/filesystem_paths.h +4 -1
- nuitka/build/include/nuitka/freelists.h +2 -2
- nuitka/build/include/nuitka/helper/attributes.h +1 -1
- nuitka/build/include/nuitka/helper/boolean.h +1 -1
- nuitka/build/include/nuitka/helper/bytearrays.h +1 -1
- nuitka/build/include/nuitka/helper/bytes.h +1 -1
- nuitka/build/include/nuitka/helper/calling_generated.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_le.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_eq.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_ge.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_gt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_le.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_lt.h +1 -1
- nuitka/build/include/nuitka/helper/comparisons_ne.h +1 -1
- nuitka/build/include/nuitka/helper/complex.h +1 -1
- nuitka/build/include/nuitka/helper/dictionaries.h +1 -1
- nuitka/build/include/nuitka/helper/floats.h +1 -1
- nuitka/build/include/nuitka/helper/import_hard.h +1 -1
- nuitka/build/include/nuitka/helper/indexes.h +1 -1
- nuitka/build/include/nuitka/helper/ints.h +1 -1
- nuitka/build/include/nuitka/helper/iterators.h +1 -1
- nuitka/build/include/nuitka/helper/lists.h +1 -1
- nuitka/build/include/nuitka/helper/lists_generated.h +1 -1
- nuitka/build/include/nuitka/helper/mappings.h +1 -1
- nuitka/build/include/nuitka/helper/operations.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_add.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_bitand.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_bitor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_bitxor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_divmod.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_floordiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_lshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_matmult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_mod.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_mult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_olddiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_pow.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_rshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_sub.h +1 -1
- nuitka/build/include/nuitka/helper/operations_binary_truediv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_builtin_types.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_add.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_bitand.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_bitor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_bitxor.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_floordiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_lshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_matmult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_mod.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_mult.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_olddiv.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_pow.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_rshift.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_sub.h +1 -1
- nuitka/build/include/nuitka/helper/operations_inplace_truediv.h +1 -1
- nuitka/build/include/nuitka/helper/raising.h +1 -1
- nuitka/build/include/nuitka/helper/rangeobjects.h +1 -1
- nuitka/build/include/nuitka/helper/richcomparisons.h +1 -1
- nuitka/build/include/nuitka/helper/sequences.h +1 -1
- nuitka/build/include/nuitka/helper/sets.h +1 -1
- nuitka/build/include/nuitka/helper/slices.h +1 -1
- nuitka/build/include/nuitka/helper/strings.h +1 -1
- nuitka/build/include/nuitka/helper/subscripts.h +1 -1
- nuitka/build/include/nuitka/helper/tuples.h +1 -1
- nuitka/build/include/nuitka/helpers.h +1 -43
- nuitka/build/include/nuitka/importing.h +1 -1
- nuitka/build/include/nuitka/jit_sources.h +1 -1
- nuitka/build/include/nuitka/prelude.h +10 -10
- nuitka/build/include/nuitka/printing.h +1 -1
- nuitka/build/include/nuitka/python_pgo.h +1 -1
- nuitka/build/include/nuitka/safe_string_ops.h +1 -1
- nuitka/build/include/nuitka/threading.h +1 -1
- nuitka/build/include/nuitka/tracing.h +1 -1
- nuitka/build/include/nuitka/type_aliases.h +2 -2
- nuitka/build/include/nuitka/unfreezing.h +1 -1
- 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/static_src/CompiledAsyncgenType.c +80 -75
- nuitka/build/static_src/CompiledCellType.c +2 -1
- nuitka/build/static_src/CompiledCodeHelpers.c +10 -28
- nuitka/build/static_src/CompiledCoroutineType.c +30 -40
- nuitka/build/static_src/CompiledFrameType.c +63 -5
- nuitka/build/static_src/CompiledFunctionType.c +11 -13
- nuitka/build/static_src/CompiledGeneratorType.c +56 -13
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +1 -1
- nuitka/build/static_src/CompiledMethodType.c +2 -1
- nuitka/build/static_src/GenerateHeadersMain.c +30 -0
- nuitka/build/static_src/HelpersAllocator.c +1 -1
- nuitka/build/static_src/HelpersAttributes.c +5 -2
- nuitka/build/static_src/HelpersBuiltin.c +1 -1
- nuitka/build/static_src/HelpersBuiltinTypeMethods.c +1 -1
- nuitka/build/static_src/HelpersBytes.c +1 -1
- nuitka/build/static_src/HelpersCalling.c +1 -1
- nuitka/build/static_src/HelpersCallingGenerated.c +6 -16
- nuitka/build/static_src/HelpersChecksumTools.c +1 -1
- nuitka/build/static_src/HelpersClasses.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualEq.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualGe.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualGt.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualLe.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualLt.c +1 -1
- nuitka/build/static_src/HelpersComparisonDualNe.c +1 -1
- nuitka/build/static_src/HelpersComparisonEq.c +1 -1
- nuitka/build/static_src/HelpersComparisonEqUtils.c +1 -1
- nuitka/build/static_src/HelpersComparisonGe.c +1 -1
- nuitka/build/static_src/HelpersComparisonGt.c +1 -1
- nuitka/build/static_src/HelpersComparisonLe.c +1 -1
- nuitka/build/static_src/HelpersComparisonLt.c +1 -1
- nuitka/build/static_src/HelpersComparisonNe.c +1 -1
- nuitka/build/static_src/HelpersConsole.c +2 -2
- nuitka/build/static_src/HelpersConstantsBlob.c +199 -50
- nuitka/build/static_src/HelpersDeepcopy.c +3 -1
- nuitka/build/static_src/HelpersDictionaries.c +1 -1
- nuitka/build/static_src/HelpersDictionariesGenerated.c +1 -1
- nuitka/build/static_src/HelpersDumpBacktraces.c +1 -1
- nuitka/build/static_src/HelpersEnvironmentVariables.c +1 -1
- nuitka/build/static_src/HelpersEnvironmentVariablesSystem.c +1 -1
- nuitka/build/static_src/HelpersExceptions.c +1 -1
- nuitka/build/static_src/HelpersFiles.c +18 -10
- nuitka/build/static_src/HelpersFilesystemPaths.c +36 -16
- nuitka/build/static_src/HelpersFloats.c +1 -1
- nuitka/build/static_src/HelpersHeapStorage.c +1 -1
- nuitka/build/static_src/HelpersImport.c +1 -1
- nuitka/build/static_src/HelpersImportHard.c +1 -1
- nuitka/build/static_src/HelpersJitSources.c +1 -1
- nuitka/build/static_src/HelpersLists.c +2 -1
- nuitka/build/static_src/HelpersListsGenerated.c +1 -1
- nuitka/build/static_src/HelpersMappings.c +1 -1
- nuitka/build/static_src/HelpersMatching.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryBitand.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryBitor.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryBitxor.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryDivmod.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryDivmodUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryInplaceAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryLshift.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMatmult.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMod.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMult.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryPow.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryPowUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryRshift.c +1 -1
- nuitka/build/static_src/HelpersOperationBinarySub.c +1 -1
- nuitka/build/static_src/HelpersOperationBinaryTruediv.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceBitand.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceBitor.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceBitxor.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceLshift.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceMatmult.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceMod.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceMult.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +1 -1
- nuitka/build/static_src/HelpersOperationInplacePow.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceRshift.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceSub.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceTruediv.c +1 -1
- nuitka/build/static_src/HelpersProfiling.c +1 -1
- nuitka/build/static_src/HelpersPythonPgo.c +5 -2
- nuitka/build/static_src/HelpersRaising.c +1 -1
- nuitka/build/static_src/HelpersSafeStrings.c +1 -1
- nuitka/build/static_src/HelpersSequences.c +1 -1
- nuitka/build/static_src/HelpersSlices.c +1 -1
- nuitka/build/static_src/HelpersStrings.c +1 -1
- nuitka/build/static_src/HelpersTuples.c +1 -1
- nuitka/build/static_src/HelpersTypes.c +5 -5
- nuitka/build/static_src/InspectPatcher.c +2 -1
- nuitka/build/static_src/MainProgram.c +30 -6
- nuitka/build/static_src/MetaPathBasedLoader.c +19 -11
- nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +1 -1
- nuitka/build/static_src/MetaPathBasedLoaderResourceReader.c +1 -1
- nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +17 -4
- nuitka/build/static_src/OnefileBootstrap.c +6 -4
- nuitka/build/static_src/OnefileSplashScreen.cpp +1 -1
- nuitka/code_generation/AsyncgenCodes.py +5 -6
- nuitka/code_generation/AttributeCodes.py +1 -1
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +1 -1
- nuitka/code_generation/BranchCodes.py +1 -1
- nuitka/code_generation/BuiltinCodes.py +15 -5
- nuitka/code_generation/CallCodes.py +1 -1
- nuitka/code_generation/ClassCodes.py +1 -1
- nuitka/code_generation/CodeGeneration.py +23 -17
- nuitka/code_generation/CodeHelperSelection.py +1 -1
- nuitka/code_generation/CodeHelpers.py +1 -1
- nuitka/code_generation/CodeObjectCodes.py +19 -2
- nuitka/code_generation/ComparisonCodes.py +1 -1
- nuitka/code_generation/ComparisonHelperDefinitions.py +1 -1
- nuitka/code_generation/ConditionalCodes.py +1 -1
- nuitka/code_generation/ConstantCodes.py +1 -1
- nuitka/code_generation/Contexts.py +52 -39
- nuitka/code_generation/CoroutineCodes.py +4 -5
- nuitka/code_generation/CtypesCodes.py +1 -1
- nuitka/code_generation/DictCodes.py +1 -1
- nuitka/code_generation/Emission.py +1 -1
- nuitka/code_generation/ErrorCodes.py +1 -1
- nuitka/code_generation/EvalCodes.py +1 -1
- nuitka/code_generation/ExceptionCodes.py +1 -1
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +1 -1
- nuitka/code_generation/ExpressionCodes.py +1 -1
- nuitka/code_generation/FrameCodes.py +26 -17
- nuitka/code_generation/FunctionCodes.py +9 -15
- nuitka/code_generation/GeneratorCodes.py +9 -10
- nuitka/code_generation/GlobalConstants.py +6 -4
- nuitka/code_generation/GlobalsLocalsCodes.py +1 -1
- nuitka/code_generation/IdCodes.py +1 -1
- nuitka/code_generation/ImportCodes.py +1 -1
- nuitka/code_generation/Indentation.py +1 -1
- nuitka/code_generation/IndexCodes.py +1 -1
- nuitka/code_generation/InjectCCodes.py +1 -1
- nuitka/code_generation/IntegerCodes.py +1 -1
- nuitka/code_generation/IteratorCodes.py +1 -1
- nuitka/code_generation/JitCodes.py +1 -1
- nuitka/code_generation/LabelCodes.py +1 -1
- nuitka/code_generation/LineNumberCodes.py +1 -1
- nuitka/code_generation/ListCodes.py +1 -1
- nuitka/code_generation/LoaderCodes.py +1 -1
- nuitka/code_generation/LocalsDictCodes.py +1 -1
- nuitka/code_generation/LoopCodes.py +1 -1
- nuitka/code_generation/MatchCodes.py +1 -1
- nuitka/code_generation/ModuleCodes.py +31 -4
- nuitka/code_generation/Namify.py +4 -1
- nuitka/code_generation/NetworkxCodes.py +1 -1
- nuitka/code_generation/OperationCodes.py +1 -1
- nuitka/code_generation/PackageResourceCodes.py +4 -10
- nuitka/code_generation/PrintCodes.py +1 -1
- nuitka/code_generation/PythonAPICodes.py +1 -1
- nuitka/code_generation/RaisingCodes.py +1 -1
- nuitka/code_generation/Reports.py +1 -1
- nuitka/code_generation/ReturnCodes.py +1 -1
- nuitka/code_generation/SetCodes.py +1 -1
- nuitka/code_generation/SliceCodes.py +1 -1
- nuitka/code_generation/StringCodes.py +1 -1
- nuitka/code_generation/SubscriptCodes.py +1 -1
- nuitka/code_generation/TensorflowCodes.py +1 -1
- nuitka/code_generation/TryCodes.py +1 -1
- nuitka/code_generation/TupleCodes.py +1 -1
- nuitka/code_generation/TypeAliasCodes.py +4 -3
- nuitka/code_generation/VariableCodes.py +1 -1
- nuitka/code_generation/VariableDeclarations.py +1 -1
- nuitka/code_generation/YieldCodes.py +1 -1
- nuitka/code_generation/__init__.py +1 -1
- nuitka/code_generation/c_types/CTypeBases.py +1 -1
- nuitka/code_generation/c_types/CTypeBooleans.py +1 -1
- nuitka/code_generation/c_types/CTypeCFloats.py +1 -1
- nuitka/code_generation/c_types/CTypeCLongs.py +1 -1
- nuitka/code_generation/c_types/CTypeModuleDictVariables.py +1 -1
- nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +1 -1
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +1 -1
- nuitka/code_generation/c_types/CTypeNuitkaVoids.py +1 -1
- nuitka/code_generation/c_types/CTypePyObjectPointers.py +1 -1
- nuitka/code_generation/c_types/CTypeVoids.py +1 -1
- nuitka/code_generation/c_types/__init__.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesConstants.py +2 -2
- nuitka/code_generation/templates/CodeTemplatesCoroutines.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesFrames.py +21 -25
- nuitka/code_generation/templates/CodeTemplatesFunction.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +3 -3
- nuitka/code_generation/templates/CodeTemplatesIterators.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesLoader.py +26 -3
- nuitka/code_generation/templates/CodeTemplatesModules.py +21 -8
- nuitka/code_generation/templates/CodeTemplatesVariables.py +1 -1
- nuitka/code_generation/templates/TemplateDebugWrapper.py +1 -1
- nuitka/code_generation/templates/__init__.py +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +21 -1
- nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +1 -1
- nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperLongTools.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperObjectTools.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsBytes.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsCommon.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsFloat.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsSet.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsStr.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +1 -1
- nuitka/code_generation/templates_c/HelperSlotsUnicode.c.j2 +1 -1
- nuitka/containers/Namedtuples.py +1 -1
- nuitka/containers/OrderedSetsFallback.py +1 -1
- nuitka/containers/__init__.py +1 -1
- nuitka/distutils/Build.py +1 -1
- nuitka/distutils/DistutilCommands.py +2 -2
- nuitka/distutils/__init__.py +1 -1
- nuitka/finalizations/Finalization.py +1 -1
- nuitka/finalizations/FinalizeMarkups.py +1 -1
- nuitka/finalizations/__init__.py +1 -1
- nuitka/freezer/DependsExe.py +2 -1
- nuitka/freezer/DllDependenciesCommon.py +1 -1
- nuitka/freezer/DllDependenciesMacOS.py +8 -3
- nuitka/freezer/DllDependenciesPosix.py +23 -4
- nuitka/freezer/DllDependenciesWin32.py +112 -25
- nuitka/freezer/ImportDetection.py +1 -1
- nuitka/freezer/IncludedDataFiles.py +2 -2
- nuitka/freezer/IncludedEntryPoints.py +9 -1
- nuitka/freezer/Onefile.py +13 -15
- nuitka/freezer/Standalone.py +16 -4
- nuitka/freezer/__init__.py +1 -1
- nuitka/importing/IgnoreListing.py +1 -1
- nuitka/importing/ImportCache.py +1 -1
- nuitka/importing/ImportResolving.py +1 -1
- nuitka/importing/Importing.py +6 -4
- nuitka/importing/PreloadedPackages.py +1 -1
- nuitka/importing/Recursion.py +37 -12
- nuitka/importing/StandardLibrary.py +1 -1
- nuitka/importing/__init__.py +1 -1
- nuitka/nodes/AsyncgenNodes.py +1 -1
- nuitka/nodes/AttributeLookupNodes.py +1 -1
- nuitka/nodes/AttributeNodes.py +1 -1
- nuitka/nodes/AttributeNodesGenerated.py +1 -1
- nuitka/nodes/BuiltinAllNodes.py +1 -1
- nuitka/nodes/BuiltinAnyNodes.py +1 -1
- nuitka/nodes/BuiltinComplexNodes.py +1 -1
- nuitka/nodes/BuiltinDecodingNodes.py +1 -1
- nuitka/nodes/BuiltinDecoratorNodes.py +1 -1
- nuitka/nodes/BuiltinDictNodes.py +1 -1
- nuitka/nodes/BuiltinFormatNodes.py +1 -1
- nuitka/nodes/BuiltinHashNodes.py +1 -1
- nuitka/nodes/BuiltinInputNodes.py +1 -1
- nuitka/nodes/BuiltinIntegerNodes.py +1 -1
- nuitka/nodes/BuiltinIteratorNodes.py +1 -1
- nuitka/nodes/BuiltinLenNodes.py +1 -1
- nuitka/nodes/BuiltinNextNodes.py +1 -1
- nuitka/nodes/BuiltinOpenNodes.py +1 -1
- nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +1 -1
- nuitka/nodes/BuiltinRangeNodes.py +1 -1
- nuitka/nodes/BuiltinRefNodes.py +1 -1
- nuitka/nodes/BuiltinSumNodes.py +1 -1
- nuitka/nodes/BuiltinTypeNodes.py +1 -1
- nuitka/nodes/BuiltinVarsNodes.py +1 -1
- nuitka/nodes/BytesNodes.py +1 -1
- nuitka/nodes/CallNodes.py +1 -1
- nuitka/nodes/Checkers.py +1 -1
- nuitka/nodes/ChildrenHavingMixins.py +240 -16
- nuitka/nodes/ClassNodes.py +1 -1
- nuitka/nodes/CodeObjectSpecs.py +4 -4
- nuitka/nodes/ComparisonNodes.py +1 -1
- nuitka/nodes/ConditionalNodes.py +1 -1
- nuitka/nodes/ConstantRefNodes.py +1 -1
- nuitka/nodes/ContainerMakingNodes.py +1 -1
- nuitka/nodes/ContainerOperationNodes.py +1 -1
- nuitka/nodes/CoroutineNodes.py +1 -1
- nuitka/nodes/CtypesNodes.py +1 -1
- nuitka/nodes/DictionaryNodes.py +1 -1
- nuitka/nodes/ExceptionNodes.py +1 -1
- nuitka/nodes/ExecEvalNodes.py +1 -1
- nuitka/nodes/ExpressionBases.py +1 -1
- nuitka/nodes/ExpressionBasesGenerated.py +1 -1
- nuitka/nodes/ExpressionShapeMixins.py +1 -1
- nuitka/nodes/FrameNodes.py +19 -7
- nuitka/nodes/FunctionAttributeNodes.py +1 -1
- nuitka/nodes/FunctionNodes.py +8 -1
- nuitka/nodes/FutureSpecs.py +34 -2
- nuitka/nodes/GeneratorNodes.py +1 -1
- nuitka/nodes/GlobalsLocalsNodes.py +1 -1
- nuitka/nodes/HardImportNodesGenerated.py +140 -56
- nuitka/nodes/ImportHardNodes.py +1 -1
- nuitka/nodes/ImportNodes.py +1 -1
- nuitka/nodes/IndicatorMixins.py +1 -1
- nuitka/nodes/InjectCNodes.py +1 -1
- nuitka/nodes/IterationHandles.py +1 -1
- nuitka/nodes/KeyValuePairNodes.py +1 -1
- nuitka/nodes/ListOperationNodes.py +1 -1
- nuitka/nodes/LocalsDictNodes.py +1 -1
- nuitka/nodes/LocalsScopes.py +1 -1
- nuitka/nodes/LoopNodes.py +1 -1
- nuitka/nodes/MatchNodes.py +1 -1
- nuitka/nodes/ModuleAttributeNodes.py +1 -1
- nuitka/nodes/ModuleNodes.py +23 -9
- nuitka/nodes/NetworkxNodes.py +1 -1
- nuitka/nodes/NodeBases.py +1 -1
- nuitka/nodes/NodeMakingHelpers.py +1 -1
- nuitka/nodes/NodeMetaClasses.py +1 -1
- nuitka/nodes/OperatorNodes.py +1 -1
- nuitka/nodes/OperatorNodesUnary.py +1 -1
- nuitka/nodes/OsSysNodes.py +1 -1
- nuitka/nodes/OutlineNodes.py +1 -1
- nuitka/nodes/PackageMetadataNodes.py +4 -2
- nuitka/nodes/PackageResourceNodes.py +42 -7
- nuitka/nodes/PrintNodes.py +1 -1
- nuitka/nodes/ReturnNodes.py +1 -1
- nuitka/nodes/SideEffectNodes.py +1 -1
- nuitka/nodes/SliceNodes.py +1 -1
- nuitka/nodes/StatementBasesGenerated.py +1 -1
- nuitka/nodes/StatementNodes.py +1 -1
- nuitka/nodes/StrNodes.py +1 -1
- nuitka/nodes/StringConcatenationNodes.py +1 -1
- nuitka/nodes/SubscriptNodes.py +1 -1
- nuitka/nodes/TensorflowNodes.py +1 -1
- nuitka/nodes/TryNodes.py +1 -1
- nuitka/nodes/TypeMatchNodes.py +1 -1
- nuitka/nodes/TypeNodes.py +4 -4
- nuitka/nodes/VariableAssignNodes.py +1 -1
- nuitka/nodes/VariableDelNodes.py +1 -1
- nuitka/nodes/VariableNameNodes.py +1 -1
- nuitka/nodes/VariableRefNodes.py +1 -1
- nuitka/nodes/VariableReleaseNodes.py +1 -1
- nuitka/nodes/YieldNodes.py +1 -1
- nuitka/nodes/__init__.py +1 -1
- nuitka/nodes/shapes/BuiltinTypeShapes.py +1 -1
- nuitka/nodes/shapes/ControlFlowDescriptions.py +1 -1
- nuitka/nodes/shapes/IteratorShapes.py +1 -1
- nuitka/nodes/shapes/ShapeMixins.py +1 -1
- nuitka/nodes/shapes/StandardShapes.py +1 -1
- nuitka/nodes/shapes/__init__.py +1 -1
- nuitka/optimizations/BytecodeDemotion.py +1 -1
- nuitka/optimizations/FunctionInlining.py +1 -1
- nuitka/optimizations/Graphs.py +1 -1
- nuitka/optimizations/Optimization.py +1 -1
- nuitka/optimizations/OptimizeBuiltinCalls.py +1 -1
- nuitka/optimizations/Tags.py +1 -1
- nuitka/optimizations/TraceCollections.py +1 -1
- nuitka/optimizations/ValueTraces.py +1 -1
- nuitka/optimizations/__init__.py +1 -1
- nuitka/pgo/PGO.py +1 -1
- nuitka/pgo/__init__.py +1 -1
- nuitka/plugins/PluginBase.py +91 -16
- nuitka/plugins/Plugins.py +58 -15
- nuitka/plugins/YamlPluginBase.py +1 -1
- nuitka/plugins/__init__.py +1 -1
- nuitka/plugins/standard/AntiBloatPlugin.py +138 -66
- nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +2 -1
- nuitka/plugins/standard/DataFilesPlugin.py +2 -2
- nuitka/plugins/standard/DelvewheelPlugin.py +2 -1
- nuitka/plugins/standard/DillPlugin/DillPlugin.c +1 -1
- nuitka/plugins/standard/DillPlugin/dill-postLoad.py +1 -1
- nuitka/plugins/standard/DillPlugin.py +2 -2
- nuitka/plugins/standard/DllFilesPlugin.py +2 -12
- nuitka/plugins/standard/EnumPlugin.py +2 -2
- nuitka/plugins/standard/EventletPlugin.py +2 -1
- nuitka/plugins/standard/GeventPlugin.py +2 -1
- nuitka/plugins/standard/GiPlugin.py +2 -1
- nuitka/plugins/standard/GlfwPlugin.py +2 -1
- nuitka/plugins/standard/ImplicitImports.py +7 -6
- nuitka/plugins/standard/KivyPlugin.py +2 -1
- nuitka/plugins/standard/MatplotlibPlugin.py +2 -1
- nuitka/plugins/standard/MultiprocessingPlugin.py +2 -1
- nuitka/plugins/standard/NumpyPlugin.py +2 -1
- nuitka/plugins/standard/OptionsNannyPlugin.py +2 -2
- nuitka/plugins/standard/PbrPlugin.py +2 -2
- nuitka/plugins/standard/PkgResourcesPlugin.py +2 -1
- nuitka/plugins/standard/PlaywrightPlugin.py +10 -15
- nuitka/plugins/standard/PmwPlugin.py +2 -1
- nuitka/plugins/standard/PySidePyQtPlugin.py +25 -15
- nuitka/plugins/standard/PywebViewPlugin.py +2 -1
- nuitka/plugins/standard/SpacyPlugin.py +2 -1
- nuitka/plugins/standard/TensorflowPlugin.py +2 -1
- nuitka/plugins/standard/TkinterPlugin.py +15 -2
- nuitka/plugins/standard/TorchPlugin.py +2 -1
- nuitka/plugins/standard/TransformersPlugin.py +2 -2
- nuitka/plugins/standard/TrioPlugin.py +2 -1
- nuitka/plugins/standard/UpxPlugin.py +2 -1
- nuitka/plugins/standard/__init__.py +1 -1
- nuitka/plugins/standard/standard.nuitka-package.config.yml +257 -89
- nuitka/reports/CompilationReportReader.py +5 -1
- nuitka/reports/LicenseReport.rst.j2 +1 -1
- nuitka/reports/Reports.py +30 -3
- nuitka/reports/__init__.py +1 -1
- nuitka/specs/BuiltinBytesOperationSpecs.py +1 -1
- nuitka/specs/BuiltinDictOperationSpecs.py +1 -1
- nuitka/specs/BuiltinListOperationSpecs.py +1 -1
- nuitka/specs/BuiltinParameterSpecs.py +1 -1
- nuitka/specs/BuiltinStrOperationSpecs.py +1 -1
- nuitka/specs/BuiltinTypeOperationSpecs.py +1 -1
- nuitka/specs/BuiltinUnicodeOperationSpecs.py +1 -1
- nuitka/specs/HardImportSpecs.py +10 -2
- nuitka/specs/ParameterSpecs.py +17 -2
- nuitka/specs/__init__.py +1 -1
- nuitka/tools/Basics.py +1 -1
- nuitka/tools/__init__.py +1 -1
- nuitka/tools/commercial/__init__.py +1 -1
- nuitka/tools/data_composer/DataComposer.py +125 -1
- nuitka/tools/data_composer/__init__.py +1 -1
- nuitka/tools/data_composer/__main__.py +1 -1
- nuitka/tools/environments/CreateEnvironment.py +1 -1
- nuitka/tools/environments/Virtualenv.py +1 -1
- nuitka/tools/environments/__init__.py +1 -1
- nuitka/tools/general/__init__.py +1 -1
- nuitka/tools/general/dll_report/__init__.py +1 -1
- nuitka/tools/general/dll_report/__main__.py +1 -1
- nuitka/tools/general/find_module/FindModuleCode.py +6 -3
- nuitka/tools/general/find_module/__init__.py +1 -1
- nuitka/tools/general/generate_header/GenerateHeader.py +73 -0
- nuitka/tools/general/generate_header/__init__.py +19 -0
- nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
- nuitka/tools/onefile_compressor/__init__.py +1 -1
- nuitka/tools/onefile_compressor/__main__.py +1 -1
- nuitka/tools/podman/Podman.py +1 -1
- nuitka/tools/podman/__init__.py +1 -1
- nuitka/tools/podman/__main__.py +4 -2
- nuitka/tools/profiler/__init__.py +1 -1
- nuitka/tools/profiler/__main__.py +1 -1
- nuitka/tools/scanning/DisplayPackageDLLs.py +42 -20
- nuitka/tools/scanning/DisplayPackageData.py +1 -1
- nuitka/tools/scanning/__init__.py +1 -1
- nuitka/tools/specialize/CTypeDescriptions.py +1 -1
- nuitka/tools/specialize/Common.py +1 -1
- nuitka/tools/specialize/SpecializeC.py +1 -1
- nuitka/tools/specialize/SpecializePython.py +7 -3
- nuitka/tools/specialize/__init__.py +1 -1
- nuitka/tools/testing/Common.py +140 -19
- nuitka/tools/testing/Constructs.py +1 -1
- nuitka/tools/testing/OutputComparison.py +5 -4
- nuitka/tools/testing/Pythons.py +1 -1
- nuitka/tools/testing/RuntimeTracing.py +1 -1
- nuitka/tools/testing/SearchModes.py +1 -1
- nuitka/tools/testing/Valgrind.py +1 -1
- nuitka/tools/testing/__init__.py +1 -1
- nuitka/tools/testing/check_reference_counts/__init__.py +1 -1
- nuitka/tools/testing/check_reference_counts/__main__.py +6 -2
- nuitka/tools/testing/compare_with_cpython/__init__.py +1 -1
- nuitka/tools/testing/compare_with_cpython/__main__.py +51 -14
- nuitka/tools/testing/find_sxs_modules/__init__.py +1 -1
- nuitka/tools/testing/find_sxs_modules/__main__.py +1 -1
- nuitka/tools/testing/measure_construct_performance/__init__.py +1 -1
- nuitka/tools/testing/measure_construct_performance/__main__.py +1 -1
- nuitka/tools/testing/run_nuitka_tests/__init__.py +1 -1
- nuitka/tools/testing/run_nuitka_tests/__main__.py +1 -1
- nuitka/tools/watch/AutoStage.py +1 -1
- nuitka/tools/watch/Common.py +55 -0
- nuitka/tools/watch/Conda.py +125 -0
- nuitka/tools/watch/GitHub.py +1 -1
- nuitka/tools/watch/Pacman.py +73 -0
- nuitka/tools/watch/Pipenv.py +143 -0
- nuitka/tools/watch/__init__.py +1 -1
- nuitka/tools/watch/__main__.py +124 -266
- nuitka/tree/Building.py +5 -7
- nuitka/tree/ComplexCallHelperFunctions.py +1 -1
- nuitka/tree/Extractions.py +1 -1
- nuitka/tree/FutureSpecState.py +71 -0
- nuitka/tree/InternalModule.py +1 -1
- nuitka/tree/Operations.py +1 -1
- nuitka/tree/ReformulationAssertStatements.py +1 -1
- nuitka/tree/ReformulationAssignmentStatements.py +3 -3
- nuitka/tree/ReformulationBooleanExpressions.py +1 -1
- nuitka/tree/ReformulationCallExpressions.py +1 -1
- nuitka/tree/ReformulationClasses.py +1 -1
- nuitka/tree/ReformulationClasses3.py +1 -1
- nuitka/tree/ReformulationComparisonExpressions.py +1 -1
- nuitka/tree/ReformulationContractionExpressions.py +3 -1
- nuitka/tree/ReformulationDictionaryCreation.py +3 -3
- nuitka/tree/ReformulationExecStatements.py +1 -1
- nuitka/tree/ReformulationForLoopStatements.py +1 -1
- nuitka/tree/ReformulationFunctionStatements.py +2 -2
- nuitka/tree/ReformulationImportStatements.py +5 -52
- nuitka/tree/ReformulationLambdaExpressions.py +2 -1
- nuitka/tree/ReformulationMatchStatements.py +1 -1
- nuitka/tree/ReformulationMultidist.py +2 -2
- nuitka/tree/ReformulationNamespacePackages.py +28 -6
- nuitka/tree/ReformulationPrintStatements.py +1 -1
- nuitka/tree/ReformulationSequenceCreation.py +1 -1
- nuitka/tree/ReformulationSubscriptExpressions.py +1 -1
- nuitka/tree/ReformulationTryExceptStatements.py +1 -1
- nuitka/tree/ReformulationTryFinallyStatements.py +1 -1
- nuitka/tree/ReformulationWhileLoopStatements.py +1 -1
- nuitka/tree/ReformulationWithStatements.py +1 -1
- nuitka/tree/ReformulationYieldExpressions.py +1 -1
- nuitka/tree/SourceHandling.py +57 -18
- nuitka/tree/SyntaxErrors.py +1 -1
- nuitka/tree/TreeHelpers.py +24 -10
- nuitka/tree/VariableClosure.py +1 -1
- nuitka/tree/__init__.py +1 -1
- nuitka/utils/AppDirs.py +5 -2
- nuitka/utils/CStrings.py +1 -1
- nuitka/utils/CommandLineOptions.py +2 -2
- nuitka/utils/Distributions.py +197 -15
- nuitka/utils/Download.py +14 -6
- nuitka/utils/Execution.py +43 -14
- nuitka/utils/FileOperations.py +43 -10
- nuitka/utils/Hashing.py +1 -1
- nuitka/utils/Images.py +8 -2
- nuitka/utils/Importing.py +1 -1
- nuitka/utils/InlineCopies.py +1 -1
- nuitka/utils/InstalledPythons.py +1 -1
- nuitka/utils/InstanceCounters.py +1 -1
- nuitka/utils/Jinja2.py +1 -1
- nuitka/utils/Json.py +2 -2
- nuitka/utils/MacOSApp.py +4 -3
- nuitka/utils/MemoryUsage.py +1 -1
- nuitka/utils/ModuleNames.py +1 -1
- nuitka/utils/PackageResources.py +1 -1
- nuitka/utils/ReExecute.py +1 -1
- nuitka/utils/Rest.py +1 -1
- nuitka/utils/SharedLibraries.py +52 -7
- nuitka/utils/Shebang.py +1 -1
- nuitka/utils/Signing.py +2 -4
- nuitka/utils/SlotMetaClasses.py +1 -1
- nuitka/utils/StaticLibraries.py +29 -1
- nuitka/utils/ThreadedExecutor.py +1 -1
- nuitka/utils/Timing.py +1 -1
- nuitka/utils/Utils.py +1 -1
- nuitka/utils/WindowsFileUsage.py +1 -1
- nuitka/utils/WindowsResources.py +3 -1
- nuitka/utils/Yaml.py +1 -1
- nuitka/utils/__init__.py +1 -1
- Nuitka_winsvc-2.5.6.dist-info/RECORD +0 -978
- {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.5.6.dist-info → Nuitka_winsvc-2.6.5.dist-info}/top_level.txt +0 -0
nuitka/tree/TreeHelpers.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Helper functions for parsing the AST nodes and building the Nuitka node tree.
|
|
@@ -431,18 +431,18 @@ def makeModuleFrame(module, statements, source_ref):
|
|
|
431
431
|
assert module.isCompiledPythonModule()
|
|
432
432
|
|
|
433
433
|
if Options.is_full_compat:
|
|
434
|
-
|
|
434
|
+
co_name = "<module>"
|
|
435
435
|
else:
|
|
436
436
|
if module.isMainModule():
|
|
437
|
-
|
|
437
|
+
co_name = "<module>"
|
|
438
438
|
else:
|
|
439
|
-
|
|
439
|
+
co_name = "<module %s>" % module.getFullName()
|
|
440
440
|
|
|
441
441
|
return StatementsFrameModule(
|
|
442
442
|
statements=tuple(statements),
|
|
443
443
|
code_object=CodeObjectSpec(
|
|
444
|
-
co_name=
|
|
445
|
-
co_qualname=
|
|
444
|
+
co_name=co_name,
|
|
445
|
+
co_qualname=co_name,
|
|
446
446
|
co_kind="Module",
|
|
447
447
|
co_varnames=(),
|
|
448
448
|
co_freevars=(),
|
|
@@ -455,6 +455,7 @@ def makeModuleFrame(module, statements, source_ref):
|
|
|
455
455
|
co_lineno=source_ref.getLineNumber(),
|
|
456
456
|
future_spec=module.getFutureSpec(),
|
|
457
457
|
),
|
|
458
|
+
owner_code_name=module.getCodeName(),
|
|
458
459
|
source_ref=source_ref,
|
|
459
460
|
)
|
|
460
461
|
|
|
@@ -497,26 +498,39 @@ def buildFrameNode(provider, nodes, code_object, source_ref):
|
|
|
497
498
|
|
|
498
499
|
if provider.isExpressionFunctionBody():
|
|
499
500
|
result = StatementsFrameFunction(
|
|
500
|
-
statements=statements,
|
|
501
|
+
statements=statements,
|
|
502
|
+
code_object=code_object,
|
|
503
|
+
owner_code_name=provider.getCodeName(),
|
|
504
|
+
source_ref=source_ref,
|
|
501
505
|
)
|
|
502
506
|
elif provider.isExpressionClassBodyBase():
|
|
503
507
|
result = StatementsFrameClass(
|
|
504
508
|
statements=statements,
|
|
505
509
|
code_object=code_object,
|
|
510
|
+
owner_code_name=provider.getCodeName(),
|
|
506
511
|
locals_scope=provider.getLocalsScope(),
|
|
507
512
|
source_ref=source_ref,
|
|
508
513
|
)
|
|
509
514
|
elif provider.isExpressionGeneratorObjectBody():
|
|
510
515
|
result = StatementsFrameGenerator(
|
|
511
|
-
statements=statements,
|
|
516
|
+
statements=statements,
|
|
517
|
+
code_object=code_object,
|
|
518
|
+
owner_code_name=provider.getCodeName(),
|
|
519
|
+
source_ref=source_ref,
|
|
512
520
|
)
|
|
513
521
|
elif provider.isExpressionCoroutineObjectBody():
|
|
514
522
|
result = StatementsFrameCoroutine(
|
|
515
|
-
statements=statements,
|
|
523
|
+
statements=statements,
|
|
524
|
+
code_object=code_object,
|
|
525
|
+
owner_code_name=provider.getCodeName(),
|
|
526
|
+
source_ref=source_ref,
|
|
516
527
|
)
|
|
517
528
|
elif provider.isExpressionAsyncgenObjectBody():
|
|
518
529
|
result = StatementsFrameAsyncgen(
|
|
519
|
-
statements=statements,
|
|
530
|
+
statements=statements,
|
|
531
|
+
code_object=code_object,
|
|
532
|
+
owner_code_name=provider.getCodeName(),
|
|
533
|
+
source_ref=source_ref,
|
|
520
534
|
)
|
|
521
535
|
else:
|
|
522
536
|
assert False, provider
|
nuitka/tree/VariableClosure.py
CHANGED
nuitka/tree/__init__.py
CHANGED
nuitka/utils/AppDirs.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Wrapper around appdirs from PyPI
|
|
@@ -24,7 +24,10 @@ from .Importing import importFromInlineCopy
|
|
|
24
24
|
appdirs = importFromInlineCopy("appdirs", must_exist=False, delete_module=True)
|
|
25
25
|
|
|
26
26
|
if appdirs is None:
|
|
27
|
-
|
|
27
|
+
try:
|
|
28
|
+
import appdirs # pylint: disable=I0021,import-error
|
|
29
|
+
except ImportError:
|
|
30
|
+
appdirs = None
|
|
28
31
|
|
|
29
32
|
|
|
30
33
|
def getAppdirsModule():
|
nuitka/utils/CStrings.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Tools for command line options."""
|
|
@@ -42,7 +42,7 @@ class OurOptionGroup(OptionGroup):
|
|
|
42
42
|
require_compiling = kwargs.pop("require_compiling", True)
|
|
43
43
|
github_action = kwargs.pop("github_action", True)
|
|
44
44
|
github_action_default = kwargs.pop("github_action_default", None)
|
|
45
|
-
link = kwargs.pop("
|
|
45
|
+
link = kwargs.pop("link", None)
|
|
46
46
|
|
|
47
47
|
result = OptionGroup.add_option(self, *args, **kwargs)
|
|
48
48
|
|
nuitka/utils/Distributions.py
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Tools for accessing distributions and resolving package names for them. """
|
|
5
5
|
|
|
6
|
+
import base64
|
|
7
|
+
import hashlib
|
|
6
8
|
import os
|
|
9
|
+
import sys
|
|
7
10
|
|
|
8
11
|
from nuitka.__past__ import ( # pylint: disable=redefined-builtin
|
|
9
12
|
FileNotFoundError,
|
|
@@ -17,16 +20,59 @@ from nuitka.PythonFlavors import (
|
|
|
17
20
|
isMSYS2MingwPython,
|
|
18
21
|
isPosixWindows,
|
|
19
22
|
)
|
|
20
|
-
from nuitka.PythonVersions import python_version
|
|
23
|
+
from nuitka.PythonVersions import python_version, python_version_str
|
|
21
24
|
from nuitka.Tracing import metadata_logger
|
|
22
25
|
|
|
23
|
-
from .FileOperations import
|
|
26
|
+
from .FileOperations import (
|
|
27
|
+
getFileContentByLine,
|
|
28
|
+
getFileList,
|
|
29
|
+
isFilenameBelowPath,
|
|
30
|
+
searchPrefixPath,
|
|
31
|
+
)
|
|
24
32
|
from .Importing import getModuleNameAndKindFromFilenameSuffix
|
|
33
|
+
from .Json import loadJsonFromFilename
|
|
25
34
|
from .ModuleNames import ModuleName, checkModuleName
|
|
26
35
|
from .Utils import isMacOS, isWin32Windows
|
|
27
36
|
|
|
28
37
|
_package_to_distribution = None
|
|
29
38
|
|
|
39
|
+
_conda_package_infos = None
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def _getCondaMetaDataFiles(distribution_name):
|
|
43
|
+
# Cached result, pylint: disable=global-statement
|
|
44
|
+
global _conda_package_infos
|
|
45
|
+
|
|
46
|
+
if _conda_package_infos is None:
|
|
47
|
+
_conda_package_infos = {}
|
|
48
|
+
|
|
49
|
+
conda_meta_dir = os.path.join(sys.prefix, "conda-meta")
|
|
50
|
+
|
|
51
|
+
for filename in getFileList(conda_meta_dir, only_suffixes=".json"):
|
|
52
|
+
conda_data = loadJsonFromFilename(filename)
|
|
53
|
+
|
|
54
|
+
if conda_data is not None:
|
|
55
|
+
for contained_filename in conda_data["files"]:
|
|
56
|
+
if contained_filename.endswith(".dist-info/METADATA"):
|
|
57
|
+
contained_filename_full = os.path.join(
|
|
58
|
+
sys.prefix, contained_filename
|
|
59
|
+
)
|
|
60
|
+
if os.path.exists(contained_filename_full):
|
|
61
|
+
for line in getFileContentByLine(
|
|
62
|
+
contained_filename_full, encoding="utf8"
|
|
63
|
+
):
|
|
64
|
+
if line.startswith("Name:"):
|
|
65
|
+
contained_distribution_name = line.split(" ", 1)[1]
|
|
66
|
+
_conda_package_infos[
|
|
67
|
+
contained_distribution_name
|
|
68
|
+
] = conda_data
|
|
69
|
+
break
|
|
70
|
+
|
|
71
|
+
if distribution_name in _conda_package_infos:
|
|
72
|
+
return _conda_package_infos[distribution_name]["files"]
|
|
73
|
+
else:
|
|
74
|
+
return ()
|
|
75
|
+
|
|
30
76
|
|
|
31
77
|
def getDistributionFiles(distribution):
|
|
32
78
|
try:
|
|
@@ -40,8 +86,8 @@ is typically caused by corruption of its installation."""
|
|
|
40
86
|
)
|
|
41
87
|
hasattr_files = False
|
|
42
88
|
|
|
43
|
-
if hasattr_files:
|
|
44
|
-
for filename in distribution.files
|
|
89
|
+
if hasattr_files and distribution.files is not None:
|
|
90
|
+
for filename in distribution.files:
|
|
45
91
|
filename = filename.as_posix()
|
|
46
92
|
|
|
47
93
|
yield filename
|
|
@@ -49,10 +95,79 @@ is typically caused by corruption of its installation."""
|
|
|
49
95
|
record_data = _getDistributionMetadataFileContents(distribution, "RECORD")
|
|
50
96
|
|
|
51
97
|
if record_data is not None:
|
|
52
|
-
for
|
|
53
|
-
|
|
98
|
+
for record in _getDistributionMetadataRecordData(distribution):
|
|
99
|
+
yield record[0]
|
|
100
|
+
else:
|
|
101
|
+
if isAnacondaPython():
|
|
102
|
+
# On different OSes, different Python versions, different
|
|
103
|
+
# prefixes are used by Anaconda.
|
|
104
|
+
candidate_prefixes = (
|
|
105
|
+
"lib/site-packages/",
|
|
106
|
+
"lib/python%s/site-packages/" % python_version_str,
|
|
107
|
+
)
|
|
54
108
|
|
|
55
|
-
|
|
109
|
+
for filename in _getCondaMetaDataFiles(
|
|
110
|
+
distribution_name=getDistributionName(distribution)
|
|
111
|
+
):
|
|
112
|
+
for candidate_prefix in candidate_prefixes:
|
|
113
|
+
if filename.lower().startswith(candidate_prefix):
|
|
114
|
+
yield filename[len(candidate_prefix) :]
|
|
115
|
+
break
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
def _getDistributionMetadataRecordData(distribution):
|
|
119
|
+
record_data = _getDistributionMetadataFileContents(distribution, "RECORD")
|
|
120
|
+
|
|
121
|
+
if record_data is not None:
|
|
122
|
+
for line in record_data.splitlines():
|
|
123
|
+
yield line.split(",")
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
def _readChunks(file_handle):
|
|
127
|
+
while True:
|
|
128
|
+
chunk = file_handle.read(1 << 20)
|
|
129
|
+
if not chunk:
|
|
130
|
+
break
|
|
131
|
+
yield chunk
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
def _makeRecordData(filename):
|
|
135
|
+
h = hashlib.sha256()
|
|
136
|
+
length = 0
|
|
137
|
+
|
|
138
|
+
try:
|
|
139
|
+
with open(filename, "rb") as file_handle:
|
|
140
|
+
for block in _readChunks(file_handle):
|
|
141
|
+
length += len(block)
|
|
142
|
+
h.update(block)
|
|
143
|
+
except IOError:
|
|
144
|
+
pass
|
|
145
|
+
|
|
146
|
+
digest = "sha256=" + base64.urlsafe_b64encode(h.digest()).decode("latin1").rstrip(
|
|
147
|
+
"="
|
|
148
|
+
)
|
|
149
|
+
|
|
150
|
+
return digest, str(length)
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
def checkDistributionMetadataRecord(package_dir, distribution):
|
|
154
|
+
problems = 0
|
|
155
|
+
ok = 0
|
|
156
|
+
|
|
157
|
+
for record in _getDistributionMetadataRecordData(distribution):
|
|
158
|
+
filename = os.path.join(package_dir, "..", record[0])
|
|
159
|
+
|
|
160
|
+
if not isFilenameBelowPath(path=package_dir, filename=filename):
|
|
161
|
+
continue
|
|
162
|
+
|
|
163
|
+
checksum, size = _makeRecordData(filename)
|
|
164
|
+
|
|
165
|
+
if checksum != record[1] or size != record[2]:
|
|
166
|
+
problems += 1
|
|
167
|
+
else:
|
|
168
|
+
ok += 1
|
|
169
|
+
|
|
170
|
+
return ok, problems
|
|
56
171
|
|
|
57
172
|
|
|
58
173
|
def _getDistributionMetadataFileContents(distribution, filename):
|
|
@@ -76,10 +191,14 @@ is typically caused by corruption of its installation."""
|
|
|
76
191
|
|
|
77
192
|
|
|
78
193
|
def _getDistributionInstallerFileContents(distribution):
|
|
79
|
-
|
|
194
|
+
installer_file_contents = _getDistributionMetadataFileContents(
|
|
195
|
+
distribution, "INSTALLER"
|
|
196
|
+
)
|
|
80
197
|
|
|
81
|
-
if
|
|
82
|
-
installer_name =
|
|
198
|
+
if installer_file_contents:
|
|
199
|
+
installer_name = installer_file_contents.strip().lower()
|
|
200
|
+
else:
|
|
201
|
+
installer_name = None
|
|
83
202
|
|
|
84
203
|
return installer_name
|
|
85
204
|
|
|
@@ -101,7 +220,7 @@ def getDistributionTopLevelPackageNames(distribution):
|
|
|
101
220
|
|
|
102
221
|
first_path_element, _, remainder = filename.partition("/")
|
|
103
222
|
|
|
104
|
-
if first_path_element.endswith("dist-info"):
|
|
223
|
+
if first_path_element.endswith((".dist-info", ".egg-info")):
|
|
105
224
|
continue
|
|
106
225
|
if first_path_element == "__pycache__":
|
|
107
226
|
continue
|
|
@@ -227,8 +346,8 @@ def getDistributionsFromModuleName(module_name):
|
|
|
227
346
|
"""
|
|
228
347
|
|
|
229
348
|
# Cached result, pylint: disable=global-statement
|
|
230
|
-
|
|
231
349
|
global _package_to_distribution
|
|
350
|
+
|
|
232
351
|
if _package_to_distribution is None:
|
|
233
352
|
_package_to_distribution = _initPackageToDistributionName()
|
|
234
353
|
|
|
@@ -249,16 +368,65 @@ def getDistributionsFromModuleName(module_name):
|
|
|
249
368
|
)
|
|
250
369
|
|
|
251
370
|
|
|
252
|
-
def
|
|
371
|
+
def _getDistributionFromModuleName(module_name, prefer_shorter_distribution_name):
|
|
253
372
|
"""Get the distribution name associated with a module name."""
|
|
373
|
+
|
|
254
374
|
distributions = getDistributionsFromModuleName(module_name)
|
|
255
375
|
|
|
256
376
|
if not distributions:
|
|
257
377
|
return None
|
|
258
378
|
elif len(distributions) == 1:
|
|
259
379
|
return distributions[0]
|
|
380
|
+
elif prefer_shorter_distribution_name:
|
|
381
|
+
|
|
382
|
+
def sortDist(dist):
|
|
383
|
+
return len(getDistributionName(dist))
|
|
384
|
+
|
|
385
|
+
return min(distributions, key=sortDist)
|
|
260
386
|
else:
|
|
261
|
-
|
|
387
|
+
# Cyclic dependency here.
|
|
388
|
+
from nuitka.importing.Importing import locateModule
|
|
389
|
+
|
|
390
|
+
_used_module_name, filename, _module_kind, _finding = locateModule(
|
|
391
|
+
module_name=module_name,
|
|
392
|
+
parent_package=None,
|
|
393
|
+
level=0,
|
|
394
|
+
)
|
|
395
|
+
|
|
396
|
+
# Sometimes competing distributions are installed. In that case we try
|
|
397
|
+
# and guess which one is the most correct here by compare the records
|
|
398
|
+
# if they are available and otherwise just picking the shortest name.
|
|
399
|
+
check_data = dict(
|
|
400
|
+
(dist, checkDistributionMetadataRecord(filename, dist))
|
|
401
|
+
for dist in distributions
|
|
402
|
+
)
|
|
403
|
+
|
|
404
|
+
if all(d[0] == 0 for d in check_data.values()):
|
|
405
|
+
|
|
406
|
+
def sortDist(dist):
|
|
407
|
+
return len(getDistributionName(dist))
|
|
408
|
+
|
|
409
|
+
else:
|
|
410
|
+
|
|
411
|
+
def sortDist(dist):
|
|
412
|
+
return check_data[dist][1]
|
|
413
|
+
|
|
414
|
+
return min(distributions, key=sortDist)
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
_distribution_from_name_cache = {}
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
def getDistributionFromModuleName(module_name, prefer_shorter_distribution_name=False):
|
|
421
|
+
"""Get the distribution name associated with a module name."""
|
|
422
|
+
|
|
423
|
+
if module_name not in _distribution_from_name_cache:
|
|
424
|
+
_distribution_from_name_cache[module_name] = _getDistributionFromModuleName(
|
|
425
|
+
module_name=module_name,
|
|
426
|
+
prefer_shorter_distribution_name=prefer_shorter_distribution_name,
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
return _distribution_from_name_cache[module_name]
|
|
262
430
|
|
|
263
431
|
|
|
264
432
|
def getDistribution(distribution_name):
|
|
@@ -300,6 +468,20 @@ def isDistributionCondaPackage(distribution_name):
|
|
|
300
468
|
return getDistributionInstallerName(distribution_name) == "conda"
|
|
301
469
|
|
|
302
470
|
|
|
471
|
+
def isDistributionVendored(distribution_name):
|
|
472
|
+
# Only observed case with setuptools so far.
|
|
473
|
+
if getDistributionInstallerName(distribution_name) == "uv":
|
|
474
|
+
path = _getDistributionPath(getDistribution(distribution_name))
|
|
475
|
+
|
|
476
|
+
if path is not None:
|
|
477
|
+
if os.path.dirname(path).endswith(
|
|
478
|
+
(r"setuptools\_vendor", "setuptools/vendor")
|
|
479
|
+
):
|
|
480
|
+
return True
|
|
481
|
+
|
|
482
|
+
return False
|
|
483
|
+
|
|
484
|
+
|
|
303
485
|
def isDistributionMsys2Package(distribution_name):
|
|
304
486
|
if not isAnacondaPython():
|
|
305
487
|
return False
|
nuitka/utils/Download.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Download utilities and extract locally when allowed.
|
|
@@ -16,6 +16,7 @@ from .AppDirs import getCacheDir
|
|
|
16
16
|
from .FileOperations import (
|
|
17
17
|
addFileExecutablePermission,
|
|
18
18
|
deleteFile,
|
|
19
|
+
getNormalizedPath,
|
|
19
20
|
makePath,
|
|
20
21
|
queryUser,
|
|
21
22
|
)
|
|
@@ -59,9 +60,10 @@ def getCachedDownload(
|
|
|
59
60
|
message,
|
|
60
61
|
reject,
|
|
61
62
|
assume_yes_for_downloads,
|
|
63
|
+
download_ok,
|
|
62
64
|
):
|
|
63
65
|
# Many branches to deal with.
|
|
64
|
-
# pylint: disable=too-many-branches,too-many-locals
|
|
66
|
+
# pylint: disable=too-many-branches,too-many-locals,too-many-statements
|
|
65
67
|
|
|
66
68
|
nuitka_download_dir = getDownloadCacheDir()
|
|
67
69
|
|
|
@@ -81,7 +83,9 @@ def getCachedDownload(
|
|
|
81
83
|
makePath(nuitka_download_dir)
|
|
82
84
|
|
|
83
85
|
if not os.path.isfile(download_path) and not os.path.isfile(exe_path):
|
|
84
|
-
if
|
|
86
|
+
if not download_ok:
|
|
87
|
+
reply = "no"
|
|
88
|
+
elif assume_yes_for_downloads:
|
|
85
89
|
reply = "yes"
|
|
86
90
|
else:
|
|
87
91
|
reply = queryUser(
|
|
@@ -99,6 +103,9 @@ Fully automatic, cached. Proceed and download"""
|
|
|
99
103
|
|
|
100
104
|
if reply != "yes":
|
|
101
105
|
if reject is not None:
|
|
106
|
+
if not download_ok:
|
|
107
|
+
reject += " Make sure to allow downloading it when prompted."
|
|
108
|
+
|
|
102
109
|
Tracing.general.sysexit(reject)
|
|
103
110
|
else:
|
|
104
111
|
Tracing.general.info("Downloading '%s'." % url)
|
|
@@ -158,12 +165,12 @@ Fully automatic, cached. Proceed and download"""
|
|
|
158
165
|
|
|
159
166
|
exe_path = None
|
|
160
167
|
|
|
161
|
-
return exe_path
|
|
168
|
+
return getNormalizedPath(exe_path)
|
|
162
169
|
else:
|
|
163
|
-
return download_path
|
|
170
|
+
return getNormalizedPath(download_path)
|
|
164
171
|
|
|
165
172
|
|
|
166
|
-
def getCachedDownloadedMinGW64(target_arch, assume_yes_for_downloads):
|
|
173
|
+
def getCachedDownloadedMinGW64(target_arch, assume_yes_for_downloads, download_ok):
|
|
167
174
|
# Large URLs, pylint: disable=line-too-long
|
|
168
175
|
|
|
169
176
|
if target_arch == "x86_64":
|
|
@@ -188,6 +195,7 @@ def getCachedDownloadedMinGW64(target_arch, assume_yes_for_downloads):
|
|
|
188
195
|
message="Nuitka will use gcc from MinGW64 of winlibs to compile on Windows.",
|
|
189
196
|
reject="Only this specific gcc is supported with Nuitka.",
|
|
190
197
|
assume_yes_for_downloads=assume_yes_for_downloads,
|
|
198
|
+
download_ok=download_ok,
|
|
191
199
|
)
|
|
192
200
|
|
|
193
201
|
return gcc_binary
|
nuitka/utils/Execution.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
""" Program execution related stuff.
|
|
@@ -255,11 +255,11 @@ def withEnvironmentVarsOverridden(mapping):
|
|
|
255
255
|
os.environ[env_var_name] = old_values[env_var_name]
|
|
256
256
|
|
|
257
257
|
|
|
258
|
-
def wrapCommandForDebuggerForExec(
|
|
258
|
+
def wrapCommandForDebuggerForExec(command, debugger=None):
|
|
259
259
|
"""Wrap a command for system debugger to call exec
|
|
260
260
|
|
|
261
261
|
Args:
|
|
262
|
-
|
|
262
|
+
command: (iterable of str) args for call to be debugged
|
|
263
263
|
Returns:
|
|
264
264
|
args tuple with debugger command inserted
|
|
265
265
|
|
|
@@ -268,28 +268,48 @@ def wrapCommandForDebuggerForExec(*args):
|
|
|
268
268
|
debuggers would be very welcome.
|
|
269
269
|
"""
|
|
270
270
|
|
|
271
|
+
command = tuple(command)
|
|
272
|
+
|
|
271
273
|
gdb_path = getExecutablePath("gdb")
|
|
272
|
-
lldb_path =
|
|
274
|
+
lldb_path = getExecutablePath("lldb")
|
|
275
|
+
|
|
276
|
+
# Default from environment variable.
|
|
277
|
+
if debugger is None:
|
|
278
|
+
debugger = os.getenv("NUITKA_DEBUGGER_CHOICE")
|
|
279
|
+
|
|
280
|
+
if debugger not in ("gdb", "lldb", None):
|
|
281
|
+
general.sysexit("Error, the selected debugger name '%s' is not supported.")
|
|
273
282
|
|
|
274
283
|
# Windows extra ball, attempt the downloaded one.
|
|
275
|
-
if isWin32Windows() and gdb_path is None:
|
|
284
|
+
if isWin32Windows() and gdb_path is None and lldb_path is None:
|
|
276
285
|
from nuitka.Options import assumeYesForDownloads
|
|
277
286
|
|
|
278
287
|
mingw64_gcc_path = getCachedDownloadedMinGW64(
|
|
279
288
|
target_arch=getArchitecture(),
|
|
280
289
|
assume_yes_for_downloads=assumeYesForDownloads(),
|
|
290
|
+
download_ok=True,
|
|
281
291
|
)
|
|
282
292
|
|
|
283
293
|
with withEnvironmentPathAdded("PATH", os.path.dirname(mingw64_gcc_path)):
|
|
284
294
|
lldb_path = getExecutablePath("lldb")
|
|
285
295
|
|
|
286
296
|
if gdb_path is None and lldb_path is None:
|
|
287
|
-
lldb_path = getExecutablePath("lldb")
|
|
288
|
-
|
|
289
297
|
if lldb_path is None:
|
|
290
298
|
general.sysexit("Error, no 'gdb' or 'lldb' binary found in path.")
|
|
291
299
|
|
|
292
|
-
if
|
|
300
|
+
if lldb_path is not None and debugger != "gdb":
|
|
301
|
+
args = (
|
|
302
|
+
lldb_path,
|
|
303
|
+
"lldb",
|
|
304
|
+
"-o",
|
|
305
|
+
"run",
|
|
306
|
+
"-o",
|
|
307
|
+
"bt",
|
|
308
|
+
"-o",
|
|
309
|
+
"quit",
|
|
310
|
+
"--",
|
|
311
|
+
) + command
|
|
312
|
+
elif gdb_path is not None and debugger != "lldb":
|
|
293
313
|
args = (
|
|
294
314
|
gdb_path,
|
|
295
315
|
"gdb",
|
|
@@ -300,14 +320,14 @@ def wrapCommandForDebuggerForExec(*args):
|
|
|
300
320
|
"-ex=where",
|
|
301
321
|
"-ex=quit",
|
|
302
322
|
"--args",
|
|
303
|
-
) +
|
|
323
|
+
) + command
|
|
304
324
|
else:
|
|
305
|
-
|
|
325
|
+
general.sysexit("Error, the selected debugger '%s' was not found in path.")
|
|
306
326
|
|
|
307
327
|
return args
|
|
308
328
|
|
|
309
329
|
|
|
310
|
-
def wrapCommandForDebuggerForSubprocess(
|
|
330
|
+
def wrapCommandForDebuggerForSubprocess(command, debugger=None):
|
|
311
331
|
"""Wrap a command for system debugger with subprocess module.
|
|
312
332
|
|
|
313
333
|
Args:
|
|
@@ -320,7 +340,7 @@ def wrapCommandForDebuggerForSubprocess(*args):
|
|
|
320
340
|
debuggers would be very welcome.
|
|
321
341
|
"""
|
|
322
342
|
|
|
323
|
-
args = wrapCommandForDebuggerForExec(
|
|
343
|
+
args = wrapCommandForDebuggerForExec(command=command, debugger=debugger)
|
|
324
344
|
|
|
325
345
|
# Discard exec only argument.
|
|
326
346
|
args = args[0:1] + args[2:]
|
|
@@ -349,7 +369,7 @@ def getNullInput():
|
|
|
349
369
|
|
|
350
370
|
|
|
351
371
|
def executeToolChecked(
|
|
352
|
-
logger, command, absence_message, stderr_filter=None, optional=False
|
|
372
|
+
logger, command, absence_message, stderr_filter=None, optional=False, decoding=False
|
|
353
373
|
):
|
|
354
374
|
"""Execute external tool, checking for success and no error outputs, returning result."""
|
|
355
375
|
|
|
@@ -359,13 +379,19 @@ def executeToolChecked(
|
|
|
359
379
|
if not isExecutableCommand(tool):
|
|
360
380
|
if optional:
|
|
361
381
|
logger.warning(absence_message)
|
|
362
|
-
return ""
|
|
382
|
+
return b"" if decoding else ""
|
|
363
383
|
else:
|
|
364
384
|
logger.sysexit(absence_message)
|
|
365
385
|
|
|
366
386
|
# Allow to avoid repeated scans in PATH for the tool.
|
|
367
387
|
command[0] = getExecutablePath(tool)
|
|
368
388
|
|
|
389
|
+
if None in command:
|
|
390
|
+
logger.sysexit(
|
|
391
|
+
"Error, call to '%s' failed due to 'None' value: %s index %d."
|
|
392
|
+
% (tool, command, command.index(None))
|
|
393
|
+
)
|
|
394
|
+
|
|
369
395
|
with withEnvironmentVarOverridden("LC_ALL", "C"):
|
|
370
396
|
with getNullInput() as null_input:
|
|
371
397
|
process = subprocess.Popen(
|
|
@@ -394,6 +420,9 @@ def executeToolChecked(
|
|
|
394
420
|
"Error, call to '%s' gave warnings: %s -> %s." % (tool, command, stderr)
|
|
395
421
|
)
|
|
396
422
|
|
|
423
|
+
if decoding:
|
|
424
|
+
stdout = stdout.decode("utf8")
|
|
425
|
+
|
|
397
426
|
return stdout
|
|
398
427
|
|
|
399
428
|
|