Nuitka-winsvc 2.5.1__cp311-cp311-win_amd64.whl → 2.6__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.1.data → Nuitka_winsvc-2.6.data}/scripts/nuitka-run.cmd +1 -1
- {Nuitka_winsvc-2.5.1.data → Nuitka_winsvc-2.6.data}/scripts/nuitka.cmd +1 -1
- {Nuitka_winsvc-2.5.1.dist-info → Nuitka_winsvc-2.6.dist-info}/METADATA +80 -122
- Nuitka_winsvc-2.6.dist-info/RECORD +988 -0
- {Nuitka_winsvc-2.5.1.dist-info → Nuitka_winsvc-2.6.dist-info}/WHEEL +1 -1
- nuitka/Builtins.py +1 -1
- nuitka/BytecodeCaching.py +1 -1
- 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 +1 -1
- nuitka/OptionParsing.py +90 -20
- nuitka/Options.py +160 -53
- nuitka/OutputDirectories.py +5 -3
- nuitka/PostProcessing.py +76 -27
- nuitka/Progress.py +1 -1
- nuitka/PythonFlavors.py +9 -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 +54 -31
- nuitka/build/SconsHacks.py +3 -3
- nuitka/build/SconsInterface.py +86 -56
- 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 +5 -12
- 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 +7 -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 +1 -1
- 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 +11 -3
- 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 +13 -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 +11 -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 +1 -1
- nuitka/build/include/nuitka/unfreezing.h +1 -1
- nuitka/build/inline_copy/pefile/LICENSE.txt +21 -0
- nuitka/build/inline_copy/pefile/pefile.py +8034 -0
- nuitka/build/static_src/CompiledAsyncgenType.c +85 -71
- nuitka/build/static_src/CompiledCellType.c +2 -1
- nuitka/build/static_src/CompiledCodeHelpers.c +8 -26
- nuitka/build/static_src/CompiledCoroutineType.c +33 -35
- nuitka/build/static_src/CompiledFrameType.c +63 -5
- nuitka/build/static_src/CompiledFunctionType.c +11 -13
- nuitka/build/static_src/CompiledGeneratorType.c +64 -11
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +33 -24
- 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 +2 -2
- 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 +1 -1
- nuitka/build/static_src/HelpersConstantsBlob.c +199 -50
- nuitka/build/static_src/HelpersDeepcopy.c +4 -1
- nuitka/build/static_src/HelpersDictionaries.c +15 -3
- nuitka/build/static_src/HelpersDictionariesGenerated.c +13 -2
- 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 +2 -2
- nuitka/build/static_src/HelpersTypes.c +1 -1
- nuitka/build/static_src/InspectPatcher.c +2 -1
- nuitka/build/static_src/MainProgram.c +30 -9
- nuitka/build/static_src/MetaPathBasedLoader.c +2 -1
- 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 +3 -3
- 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 +1 -1
- 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 +24 -21
- 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 +5 -2
- 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 +1 -1
- nuitka/freezer/DllDependenciesPosix.py +1 -1
- nuitka/freezer/DllDependenciesWin32.py +111 -25
- nuitka/freezer/ImportDetection.py +5 -2
- nuitka/freezer/IncludedDataFiles.py +11 -2
- nuitka/freezer/IncludedEntryPoints.py +1 -1
- nuitka/freezer/Onefile.py +14 -15
- nuitka/freezer/Standalone.py +6 -3
- 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 +4 -3
- 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 +2 -2
- 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 +227 -3
- 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 +2 -2
- 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 +1 -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 +2 -2
- 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 +1 -1
- 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 +1 -1
- nuitka/nodes/VariableAssignNodes.py +3 -2
- 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 +71 -0
- nuitka/nodes/shapes/ShapeMixins.py +4 -3
- nuitka/nodes/shapes/StandardShapes.py +2 -51
- 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 +24 -3
- nuitka/plugins/Plugins.py +67 -14
- nuitka/plugins/YamlPluginBase.py +1 -1
- nuitka/plugins/__init__.py +1 -1
- nuitka/plugins/standard/AntiBloatPlugin.py +2 -1
- 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 +80 -14
- 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 +8 -6
- nuitka/plugins/standard/KivyPlugin.py +2 -1
- nuitka/plugins/standard/MatplotlibPlugin.py +3 -2
- nuitka/plugins/standard/MultiprocessingPlugin.py +2 -1
- nuitka/plugins/standard/NumpyPlugin.py +2 -1
- nuitka/plugins/standard/OptionsNannyPlugin.py +7 -6
- 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 +12 -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 +38 -5
- 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 +173 -49
- nuitka/reports/CompilationReportReader.py +5 -1
- nuitka/reports/LicenseReport.rst.j2 +1 -1
- nuitka/reports/Reports.py +5 -1
- 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 +14 -6
- 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 +2 -2
- 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 +8 -4
- nuitka/tools/profiler/__init__.py +1 -1
- nuitka/tools/profiler/__main__.py +1 -1
- nuitka/tools/scanning/DisplayPackageDLLs.py +43 -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 +117 -264
- nuitka/tree/Building.py +1 -1
- nuitka/tree/ComplexCallHelperFunctions.py +1 -1
- nuitka/tree/Extractions.py +1 -1
- nuitka/tree/InternalModule.py +1 -1
- nuitka/tree/Operations.py +1 -1
- nuitka/tree/ReformulationAssertStatements.py +1 -1
- nuitka/tree/ReformulationAssignmentStatements.py +1 -1
- 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 +1 -1
- nuitka/tree/ReformulationExecStatements.py +1 -1
- nuitka/tree/ReformulationForLoopStatements.py +1 -1
- nuitka/tree/ReformulationFunctionStatements.py +1 -1
- nuitka/tree/ReformulationImportStatements.py +1 -1
- nuitka/tree/ReformulationLambdaExpressions.py +2 -1
- nuitka/tree/ReformulationMatchStatements.py +1 -1
- nuitka/tree/ReformulationMultidist.py +1 -1
- nuitka/tree/ReformulationNamespacePackages.py +1 -1
- 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 +1 -1
- 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 +177 -15
- nuitka/utils/Download.py +14 -6
- nuitka/utils/Execution.py +43 -14
- nuitka/utils/FileOperations.py +29 -5
- nuitka/utils/Hashing.py +6 -2
- 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 +76 -7
- nuitka/utils/Shebang.py +1 -1
- nuitka/utils/Signing.py +11 -5
- nuitka/utils/SlotMetaClasses.py +1 -1
- nuitka/utils/StaticLibraries.py +25 -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.1.dist-info/RECORD +0 -977
- {Nuitka_winsvc-2.5.1.dist-info → Nuitka_winsvc-2.6.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.5.1.dist-info → Nuitka_winsvc-2.6.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.5.1.dist-info → Nuitka_winsvc-2.6.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,644 @@
|
|
|
1
|
+
# -*- python -*-
|
|
2
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
"""
|
|
6
|
+
The Offset scons file. If you have Scons or platform knowledge, please be
|
|
7
|
+
especially invited and contribute improvements.
|
|
8
|
+
|
|
9
|
+
This file is used to build an executable that outputs data about offsets, it is
|
|
10
|
+
needed to make up for differences in offsets of structures for the Python
|
|
11
|
+
headers between MSVC and MinGW64, that can only be accounted for with a
|
|
12
|
+
structure that is generated and achieves same layout for MinGW64 despite the
|
|
13
|
+
internals being different. As of Python3.13, internal only structures do not
|
|
14
|
+
enforce layouts of all structures anymore.
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
# Make nuitka package importable from calling installation
|
|
18
|
+
|
|
19
|
+
import sys
|
|
20
|
+
import os
|
|
21
|
+
import types
|
|
22
|
+
|
|
23
|
+
sys.modules["nuitka"] = types.ModuleType("nuitka")
|
|
24
|
+
sys.modules["nuitka"].__path__ = [os.environ["NUITKA_PACKAGE_DIR"]]
|
|
25
|
+
|
|
26
|
+
# We are in the build.build package really.
|
|
27
|
+
import nuitka.build # pylint: disable=unused-import
|
|
28
|
+
|
|
29
|
+
__package__ = "nuitka.build" # pylint: disable=redefined-builtin
|
|
30
|
+
|
|
31
|
+
# isort:start
|
|
32
|
+
|
|
33
|
+
from SCons.Script import ( # pylint: disable=I0021,import-error
|
|
34
|
+
ARGUMENTS,
|
|
35
|
+
Environment,
|
|
36
|
+
GetOption,
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
from nuitka.Tracing import (
|
|
40
|
+
my_print,
|
|
41
|
+
scons_details_logger,
|
|
42
|
+
scons_logger,
|
|
43
|
+
setQuiet,
|
|
44
|
+
)
|
|
45
|
+
from nuitka.utils.FileOperations import getExternalUsePath
|
|
46
|
+
|
|
47
|
+
from .SconsCaching import enableCcache, enableClcache
|
|
48
|
+
from .SconsCompilerSettings import (
|
|
49
|
+
checkWindowsCompilerFound,
|
|
50
|
+
importEnvironmentVariableSettings,
|
|
51
|
+
reportCCompiler,
|
|
52
|
+
setupCCompiler,
|
|
53
|
+
switchFromGccToGpp,
|
|
54
|
+
)
|
|
55
|
+
from .SconsHacks import getEnhancedToolDetect
|
|
56
|
+
from .SconsProgress import enableSconsProgressBar, setSconsProgressBarTotal
|
|
57
|
+
from .SconsSpawn import enableSpawnMonitoring
|
|
58
|
+
from .SconsUtils import (
|
|
59
|
+
addClangClPathFromMSVC,
|
|
60
|
+
changeKeyboardInterruptToErrorExit,
|
|
61
|
+
createEnvironment,
|
|
62
|
+
getArgumentBool,
|
|
63
|
+
getArgumentDefaulted,
|
|
64
|
+
getArgumentList,
|
|
65
|
+
getArgumentRequired,
|
|
66
|
+
getExecutablePath,
|
|
67
|
+
getMsvcVersionString,
|
|
68
|
+
initScons,
|
|
69
|
+
isClangName,
|
|
70
|
+
isGccName,
|
|
71
|
+
makeResultPathFileSystemEncodable,
|
|
72
|
+
prepareEnvironment,
|
|
73
|
+
provideStaticSourceFile,
|
|
74
|
+
raiseNoCompilerFoundErrorExit,
|
|
75
|
+
setArguments,
|
|
76
|
+
setupScons,
|
|
77
|
+
writeSconsReport,
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
# spell-checker: ignore ccversion,cflags,ccflags,werror,cppdefines,cpppath,linkflags,libpath
|
|
81
|
+
|
|
82
|
+
# Set the arguments.
|
|
83
|
+
setArguments(ARGUMENTS)
|
|
84
|
+
|
|
85
|
+
# Set up the basic stuff.
|
|
86
|
+
initScons()
|
|
87
|
+
|
|
88
|
+
# The directory used for building.
|
|
89
|
+
source_dir = getArgumentRequired("source_dir")
|
|
90
|
+
|
|
91
|
+
# The directory containing Nuitka provided C files to be built and where it
|
|
92
|
+
# should be used.
|
|
93
|
+
nuitka_src = getArgumentRequired("nuitka_src")
|
|
94
|
+
|
|
95
|
+
# The name of executable that we are supposed to produce.
|
|
96
|
+
result_exe = getArgumentRequired("result_exe")
|
|
97
|
+
|
|
98
|
+
# Python version to target.
|
|
99
|
+
python_version_str = getArgumentRequired("python_version")
|
|
100
|
+
python_version = tuple(int(d) for d in python_version_str.split("."))
|
|
101
|
+
|
|
102
|
+
gil_mode = getArgumentBool("gil_mode")
|
|
103
|
+
|
|
104
|
+
# The ABI flags to target.
|
|
105
|
+
abiflags = getArgumentDefaulted("abiflags", "")
|
|
106
|
+
|
|
107
|
+
if not gil_mode and "t" not in abiflags:
|
|
108
|
+
abiflags = "t" + abiflags
|
|
109
|
+
|
|
110
|
+
python_abi_version = python_version_str + abiflags
|
|
111
|
+
|
|
112
|
+
# Python debug mode: reference count checking, assertions in CPython core.
|
|
113
|
+
python_debug = getArgumentBool("python_debug", False)
|
|
114
|
+
|
|
115
|
+
# LTO mode: Use link time optimizations of C compiler if available and known
|
|
116
|
+
# good with the compiler in question.
|
|
117
|
+
lto_mode = getArgumentDefaulted("lto_mode", "auto")
|
|
118
|
+
|
|
119
|
+
# Target arch, uses for compiler choice and quick linking of constants binary
|
|
120
|
+
# data.
|
|
121
|
+
target_arch = getArgumentRequired("target_arch")
|
|
122
|
+
|
|
123
|
+
# MinGW compiler mode, optional and interesting to Windows only.
|
|
124
|
+
mingw_mode = getArgumentBool("mingw_mode", False)
|
|
125
|
+
|
|
126
|
+
# Clang compiler mode, forced on macOS and FreeBSD (excluding PowerPC), optional on Linux.
|
|
127
|
+
clang_mode = getArgumentBool("clang_mode", False)
|
|
128
|
+
|
|
129
|
+
# Clang on Windows with no requirement to use MinGW64 or using MSYS2 MinGW flavor,
|
|
130
|
+
# is changed to ClangCL from Visual Studio.
|
|
131
|
+
clangcl_mode = False
|
|
132
|
+
if os.name == "nt" and not mingw_mode and clang_mode:
|
|
133
|
+
clang_mode = False
|
|
134
|
+
clangcl_mode = True
|
|
135
|
+
|
|
136
|
+
# Show scons mode, output information about Scons operation
|
|
137
|
+
show_scons_mode = getArgumentBool("show_scons", False)
|
|
138
|
+
scons_details_logger.is_quiet = not show_scons_mode
|
|
139
|
+
|
|
140
|
+
if int(os.getenv("NUITKA_QUIET", "0")):
|
|
141
|
+
setQuiet()
|
|
142
|
+
|
|
143
|
+
# Home of Python to be compiled against, used to find include files and
|
|
144
|
+
# libraries to link against.
|
|
145
|
+
python_prefix = getArgumentRequired("python_prefix")
|
|
146
|
+
|
|
147
|
+
python_prefix_external = getExternalUsePath(python_prefix)
|
|
148
|
+
|
|
149
|
+
# Forced MSVC version (windows-only)
|
|
150
|
+
msvc_version = getArgumentDefaulted("msvc_version", None)
|
|
151
|
+
|
|
152
|
+
# Disable ccache/clcache usage if that is requested
|
|
153
|
+
disable_ccache = getArgumentBool("disable_ccache", False)
|
|
154
|
+
|
|
155
|
+
# Preprocessor defines from plugins
|
|
156
|
+
cpp_defines = getArgumentList("cpp_defines", "")
|
|
157
|
+
cpp_include_dirs = getArgumentList("cpp_include_dirs", "")
|
|
158
|
+
link_dirs = getArgumentList("link_dirs", "")
|
|
159
|
+
link_libraries = getArgumentList("link_libraries", "")
|
|
160
|
+
|
|
161
|
+
# From statically compiled modules of the Python
|
|
162
|
+
link_module_libs = getArgumentList("link_module_libs", "")
|
|
163
|
+
|
|
164
|
+
# Allow automatic downloads for ccache, etc.
|
|
165
|
+
assume_yes_for_downloads = getArgumentBool("assume_yes_for_downloads", False)
|
|
166
|
+
|
|
167
|
+
# Minimum version required on macOS.
|
|
168
|
+
macos_min_version = getArgumentDefaulted("macos_min_version", "")
|
|
169
|
+
|
|
170
|
+
# Target arch for macOS.
|
|
171
|
+
macos_target_arch = getArgumentDefaulted("macos_target_arch", "")
|
|
172
|
+
|
|
173
|
+
# gcc compiler cf_protection option
|
|
174
|
+
cf_protection = getArgumentDefaulted("cf_protection", "auto")
|
|
175
|
+
|
|
176
|
+
if getArgumentBool("progress_bar", True) and not show_scons_mode:
|
|
177
|
+
enableSconsProgressBar()
|
|
178
|
+
|
|
179
|
+
# Amount of jobs to use.
|
|
180
|
+
job_count = GetOption("num_jobs")
|
|
181
|
+
|
|
182
|
+
# Prepare environment for compiler detection.
|
|
183
|
+
mingw_mode = prepareEnvironment(mingw_mode=mingw_mode)
|
|
184
|
+
|
|
185
|
+
# Patch the compiler detection.
|
|
186
|
+
Environment.Detect = getEnhancedToolDetect()
|
|
187
|
+
|
|
188
|
+
# Create Scons environment, the main control tool. Don't include "mingw" on
|
|
189
|
+
# Windows immediately, we will default to MSVC if available.
|
|
190
|
+
env = createEnvironment(
|
|
191
|
+
mingw_mode=mingw_mode,
|
|
192
|
+
msvc_version=msvc_version,
|
|
193
|
+
target_arch=target_arch,
|
|
194
|
+
experimental=[],
|
|
195
|
+
no_deployment=[],
|
|
196
|
+
debug_modes=[],
|
|
197
|
+
)
|
|
198
|
+
|
|
199
|
+
scons_details_logger.info("Initial CC: %r" % env.get("CC"))
|
|
200
|
+
scons_details_logger.info(
|
|
201
|
+
"Initial CCVERSION: %r" % (env.get("CCVERSION"),),
|
|
202
|
+
)
|
|
203
|
+
|
|
204
|
+
if "CC" in os.environ:
|
|
205
|
+
# If the environment variable CC is set, use that.
|
|
206
|
+
env["CC"] = os.environ["CC"]
|
|
207
|
+
env["CCVERSION"] = None
|
|
208
|
+
|
|
209
|
+
scons_details_logger.info("Overridden with environment CC: %r" % env["CC"])
|
|
210
|
+
elif clangcl_mode:
|
|
211
|
+
# If possible, add Clang directory from MSVC if available.
|
|
212
|
+
addClangClPathFromMSVC(env=env)
|
|
213
|
+
elif clang_mode and not mingw_mode:
|
|
214
|
+
# If requested by the user, use the clang compiler, overriding what was
|
|
215
|
+
# said in environment.
|
|
216
|
+
|
|
217
|
+
env["CC"] = "clang"
|
|
218
|
+
env["CCVERSION"] = None
|
|
219
|
+
|
|
220
|
+
# On Windows, in case MSVC was not found and not previously forced, use the
|
|
221
|
+
# winlibs MinGW64 as a download, and use it as a fallback.
|
|
222
|
+
env = checkWindowsCompilerFound(
|
|
223
|
+
env=env,
|
|
224
|
+
target_arch=target_arch,
|
|
225
|
+
clang_mode=clang_mode,
|
|
226
|
+
msvc_version=msvc_version,
|
|
227
|
+
assume_yes_for_downloads=assume_yes_for_downloads,
|
|
228
|
+
download_ok=True,
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
env.the_compiler = env["CC"]
|
|
232
|
+
env.the_cc_name = os.path.normcase(os.path.basename(env.the_compiler))
|
|
233
|
+
env.module_mode = False
|
|
234
|
+
env.standalone_mode = False
|
|
235
|
+
env.debug_mode = False
|
|
236
|
+
env.debugger_mode = False
|
|
237
|
+
env.unstripped_mode = False
|
|
238
|
+
env.console_mode = "force"
|
|
239
|
+
env.source_dir = source_dir
|
|
240
|
+
env.nuitka_src = nuitka_src
|
|
241
|
+
env.low_memory = False
|
|
242
|
+
env.macos_min_version = macos_min_version
|
|
243
|
+
env.macos_target_arch = macos_target_arch
|
|
244
|
+
|
|
245
|
+
# Requested or user provided, detect if it's clang even from environment
|
|
246
|
+
if isClangName(env.the_cc_name):
|
|
247
|
+
clang_mode = True
|
|
248
|
+
env["CCVERSION"] = None
|
|
249
|
+
|
|
250
|
+
# We consider clang to be a form of gcc for the most things, they strive to
|
|
251
|
+
# be compatible.
|
|
252
|
+
env.gcc_mode = isGccName(env.the_cc_name) or clang_mode
|
|
253
|
+
env.clang_mode = clang_mode
|
|
254
|
+
|
|
255
|
+
# Only use MSVC if not already clear, we are using MinGW.
|
|
256
|
+
env.msvc_mode = os.name == "nt" and not env.gcc_mode
|
|
257
|
+
env.mingw_mode = os.name == "nt" and env.gcc_mode
|
|
258
|
+
env.clangcl_mode = clangcl_mode
|
|
259
|
+
|
|
260
|
+
# For Python3.13, we need to enforce it for now to use MSVC
|
|
261
|
+
if os.name == "nt" and not env.msvc_mode and python_version >= (3, 13):
|
|
262
|
+
scons_logger.sysexit(
|
|
263
|
+
"""\
|
|
264
|
+
Sorry, non-MSVC is not currently supported with Python 3.13,
|
|
265
|
+
due to differences in layout internal structures of Python.
|
|
266
|
+
|
|
267
|
+
Newer Nuitka will work to solve this. Use Python 3.12 or
|
|
268
|
+
option "--msvc=latest" as a workaround for now and wait
|
|
269
|
+
for updates of Nuitka to add MinGW64 support back."""
|
|
270
|
+
)
|
|
271
|
+
|
|
272
|
+
# gcc compiler cf_protection option
|
|
273
|
+
env.cf_protection = cf_protection
|
|
274
|
+
|
|
275
|
+
# Consider switching from gcc to its g++ compiler as a workaround that makes us work without C11.
|
|
276
|
+
switchFromGccToGpp(
|
|
277
|
+
env=env,
|
|
278
|
+
)
|
|
279
|
+
|
|
280
|
+
if env.the_compiler is None or getExecutablePath(env.the_compiler, env=env) is None:
|
|
281
|
+
raiseNoCompilerFoundErrorExit()
|
|
282
|
+
|
|
283
|
+
no_import_lib = False
|
|
284
|
+
|
|
285
|
+
if show_scons_mode:
|
|
286
|
+
my_print("Scons: Compiler used", end=" ")
|
|
287
|
+
my_print(getExecutablePath(env.the_compiler, env=env), end=" ")
|
|
288
|
+
|
|
289
|
+
if os.name == "nt" and env.msvc_mode:
|
|
290
|
+
my_print("(MSVC %s)" % getMsvcVersionString(env))
|
|
291
|
+
|
|
292
|
+
my_print()
|
|
293
|
+
|
|
294
|
+
# Set build directory and scons general settings.
|
|
295
|
+
setupScons(env, source_dir)
|
|
296
|
+
|
|
297
|
+
# Report the C compiler used.
|
|
298
|
+
reportCCompiler(env, "Backend", scons_logger.info)
|
|
299
|
+
|
|
300
|
+
# Set up C compiler settings.
|
|
301
|
+
setupCCompiler(
|
|
302
|
+
env=env,
|
|
303
|
+
lto_mode=lto_mode,
|
|
304
|
+
pgo_mode="no",
|
|
305
|
+
job_count=job_count,
|
|
306
|
+
onefile_compile=False,
|
|
307
|
+
)
|
|
308
|
+
|
|
309
|
+
if env.msvc_mode:
|
|
310
|
+
# With Clang on Windows, there is also an linker to use. spell-checker: ignore bigobj
|
|
311
|
+
env.Append(
|
|
312
|
+
CCFLAGS=[
|
|
313
|
+
"/EHsc", # No C++ exception handling code.
|
|
314
|
+
"/J", # default char type is unsigned.
|
|
315
|
+
"/Gd", # Use C calling convention by default.
|
|
316
|
+
"/bigobj", # Product object files with larger internal limits.
|
|
317
|
+
]
|
|
318
|
+
)
|
|
319
|
+
|
|
320
|
+
# No incremental linking.
|
|
321
|
+
env.Append(LINKFLAGS=["/INCREMENTAL:NO"])
|
|
322
|
+
|
|
323
|
+
if env.debug_mode:
|
|
324
|
+
if env.gcc_mode:
|
|
325
|
+
# Allow gcc/clang to point out all kinds of inconsistency to us by
|
|
326
|
+
# raising an error.
|
|
327
|
+
|
|
328
|
+
if "allow-c-warnings" not in env.experimental_flags and not env.debugger_mode:
|
|
329
|
+
env.Append(
|
|
330
|
+
CCFLAGS=[
|
|
331
|
+
"-Wall",
|
|
332
|
+
"-Werror",
|
|
333
|
+
]
|
|
334
|
+
)
|
|
335
|
+
else:
|
|
336
|
+
env.Append(CCFLAGS=["-Wno-unused-but-set-variable"])
|
|
337
|
+
|
|
338
|
+
env.Append(
|
|
339
|
+
CCFLAGS=[
|
|
340
|
+
# Unfortunately Py_INCREF(Py_False) triggers aliasing warnings,
|
|
341
|
+
# which are unfounded, so disable them.
|
|
342
|
+
"-Wno-error=strict-aliasing",
|
|
343
|
+
"-Wno-strict-aliasing",
|
|
344
|
+
# At least for self-compiled Python3.2, and MinGW this happens
|
|
345
|
+
# and has little use anyway.
|
|
346
|
+
"-Wno-error=format",
|
|
347
|
+
"-Wno-format",
|
|
348
|
+
]
|
|
349
|
+
)
|
|
350
|
+
|
|
351
|
+
elif env.msvc_mode:
|
|
352
|
+
if "allow-c-warnings" not in env.experimental_flags and not env.debugger_mode:
|
|
353
|
+
env.Append(CCFLAGS=["/WX"])
|
|
354
|
+
|
|
355
|
+
# Disable warnings that system headers already show.
|
|
356
|
+
env.Append(
|
|
357
|
+
CCFLAGS=[
|
|
358
|
+
"/W4",
|
|
359
|
+
"/wd4505",
|
|
360
|
+
"/wd4127",
|
|
361
|
+
"/wd4100",
|
|
362
|
+
"/wd4702",
|
|
363
|
+
"/wd4189",
|
|
364
|
+
"/wd4211",
|
|
365
|
+
"/wd4115",
|
|
366
|
+
]
|
|
367
|
+
)
|
|
368
|
+
|
|
369
|
+
# Disable warnings, that CPython headers already show.
|
|
370
|
+
if python_version >= (3,):
|
|
371
|
+
env.Append(CCFLAGS=["/wd4512", "/wd4510", "/wd4610"])
|
|
372
|
+
|
|
373
|
+
if python_version >= (3, 13):
|
|
374
|
+
env.Append(CCFLAGS=["/wd4324"])
|
|
375
|
+
|
|
376
|
+
# We use null arrays in our structure Python declarations, which C11 does
|
|
377
|
+
# not really allow, but should work.
|
|
378
|
+
env.Append(CCFLAGS=["/wd4200"])
|
|
379
|
+
|
|
380
|
+
# Do not show deprecation warnings, we will use methods for as long
|
|
381
|
+
# as they work.
|
|
382
|
+
env.Append(CCFLAGS=["/wd4996"])
|
|
383
|
+
|
|
384
|
+
if not env.msvc_mode:
|
|
385
|
+
env.Append(LIBS=["m"])
|
|
386
|
+
|
|
387
|
+
if python_debug:
|
|
388
|
+
env.Append(CPPDEFINES=["Py_DEBUG"])
|
|
389
|
+
|
|
390
|
+
if env.static_libpython:
|
|
391
|
+
env.Append(CPPDEFINES=["Py_NO_ENABLE_SHARED"])
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
def _detectPythonHeaderPath():
|
|
395
|
+
if os.name == "nt":
|
|
396
|
+
# On Windows, the CPython installation layout is relatively fixed, but on MSYS2
|
|
397
|
+
# compiled for mingw64, it's more standard.
|
|
398
|
+
|
|
399
|
+
candidates = [
|
|
400
|
+
os.path.join(python_prefix_external, "include"),
|
|
401
|
+
# On MSYS2 with MinGW64 Python, it is also the other form.
|
|
402
|
+
os.path.join(
|
|
403
|
+
python_prefix_external, "include", "python" + python_abi_version
|
|
404
|
+
),
|
|
405
|
+
]
|
|
406
|
+
else:
|
|
407
|
+
# The python header path is a combination of python version and debug
|
|
408
|
+
# indication, we make sure the headers are found by adding it to the C
|
|
409
|
+
# include path.
|
|
410
|
+
|
|
411
|
+
candidates = [
|
|
412
|
+
os.path.join(
|
|
413
|
+
python_prefix_external, "include", "python" + python_abi_version
|
|
414
|
+
),
|
|
415
|
+
# CPython source code checkout
|
|
416
|
+
os.path.join(python_prefix_external, "Include"),
|
|
417
|
+
# Haiku specific paths:
|
|
418
|
+
os.path.join(
|
|
419
|
+
python_prefix_external, "develop/headers", "python" + python_abi_version
|
|
420
|
+
),
|
|
421
|
+
]
|
|
422
|
+
|
|
423
|
+
# Not all Python versions, have the ABI version to use for the debug version.
|
|
424
|
+
if python_debug and "d" in python_abi_version:
|
|
425
|
+
candidates.append(
|
|
426
|
+
os.path.join(
|
|
427
|
+
python_prefix_external,
|
|
428
|
+
"include",
|
|
429
|
+
"python" + python_abi_version.replace("d", ""),
|
|
430
|
+
)
|
|
431
|
+
)
|
|
432
|
+
|
|
433
|
+
for candidate in candidates:
|
|
434
|
+
if os.path.exists(os.path.join(candidate, "Python.h")):
|
|
435
|
+
yield candidate
|
|
436
|
+
break
|
|
437
|
+
else:
|
|
438
|
+
if os.name == "nt":
|
|
439
|
+
scons_logger.sysexit(
|
|
440
|
+
"""\
|
|
441
|
+
Error, you seem to be using the unsupported embeddable CPython distribution \
|
|
442
|
+
use a full Python instead."""
|
|
443
|
+
)
|
|
444
|
+
else:
|
|
445
|
+
scons_logger.sysexit(
|
|
446
|
+
"""\
|
|
447
|
+
Error, no 'Python.h' %s headers can be found at '%s', dependency \
|
|
448
|
+
not satisfied!"""
|
|
449
|
+
% ("debug" if python_debug else "development", candidates)
|
|
450
|
+
)
|
|
451
|
+
|
|
452
|
+
if python_version >= (3, 13):
|
|
453
|
+
yield os.path.join(candidate, "internal", "mimalloc")
|
|
454
|
+
|
|
455
|
+
if env.self_compiled_python_uninstalled:
|
|
456
|
+
yield python_prefix_external
|
|
457
|
+
|
|
458
|
+
|
|
459
|
+
env.Append(CPPPATH=list(_detectPythonHeaderPath()))
|
|
460
|
+
|
|
461
|
+
# To support self-built Python on Windows, need to also add the "PC" directory,
|
|
462
|
+
# that a normal install won't have.
|
|
463
|
+
if os.name == "nt":
|
|
464
|
+
python_header_path = os.path.join(python_prefix_external, "PC")
|
|
465
|
+
|
|
466
|
+
if os.path.exists(python_header_path):
|
|
467
|
+
env.Append(CPPPATH=[python_header_path])
|
|
468
|
+
|
|
469
|
+
if env.nuitka_python:
|
|
470
|
+
env.Append(CPPDEFINES=["_NUITKA_PYTHON"])
|
|
471
|
+
|
|
472
|
+
if env.static_libpython:
|
|
473
|
+
env.Append(CPPDEFINES=["_NUITKA_STATIC_LIBPYTHON"])
|
|
474
|
+
|
|
475
|
+
if not gil_mode:
|
|
476
|
+
env.Append(CPPDEFINES="Py_GIL_DISABLED")
|
|
477
|
+
|
|
478
|
+
if env.static_libpython and python_version >= (3, 12):
|
|
479
|
+
env.Append(
|
|
480
|
+
CPPPATH=[
|
|
481
|
+
os.path.join(env.nuitka_src, "inline_copy", "python_hacl", "hacl_312"),
|
|
482
|
+
os.path.join(
|
|
483
|
+
env.nuitka_src, "inline_copy", "python_hacl", "hacl_312", "include"
|
|
484
|
+
),
|
|
485
|
+
]
|
|
486
|
+
)
|
|
487
|
+
|
|
488
|
+
env.Append(CPPDEFINES=["_NUITKA_INLINE_COPY_HACL"])
|
|
489
|
+
|
|
490
|
+
# Remove it from static link libraries as well, if present, so far they are
|
|
491
|
+
# bugs and do not exist.
|
|
492
|
+
link_module_libs = [
|
|
493
|
+
link_module_lib
|
|
494
|
+
for link_module_lib in link_module_libs
|
|
495
|
+
if "libHacl_Hash_SHA2" not in link_module_libs
|
|
496
|
+
]
|
|
497
|
+
|
|
498
|
+
# TODO: Make backend libpython handling reusable.
|
|
499
|
+
if env.gcc_mode and env.static_libpython:
|
|
500
|
+
env.Append(LIBS=[env.File(env.static_libpython)])
|
|
501
|
+
else:
|
|
502
|
+
# Some non CPython flavors on Windows have this.
|
|
503
|
+
def addWinLib():
|
|
504
|
+
# Make sure to locate the Python link library from multiple potential
|
|
505
|
+
# locations (installed vs. self-built).
|
|
506
|
+
if python_debug:
|
|
507
|
+
win_lib_name = "python" + python_abi_version.replace(".", "") + "_d"
|
|
508
|
+
else:
|
|
509
|
+
win_lib_name = "python" + python_abi_version.replace(".", "")
|
|
510
|
+
|
|
511
|
+
if python_version >= (3,):
|
|
512
|
+
pc_build_dir = (
|
|
513
|
+
"PCBuild/amd64" if target_arch == "x86_64" else "PCBuild/win32"
|
|
514
|
+
)
|
|
515
|
+
else:
|
|
516
|
+
pc_build_dir = "PCBuild"
|
|
517
|
+
|
|
518
|
+
for candidate in ("libs", pc_build_dir):
|
|
519
|
+
win_lib_path = os.path.join(python_prefix_external, candidate)
|
|
520
|
+
|
|
521
|
+
if os.path.exists(os.path.join(win_lib_path, win_lib_name + ".lib")):
|
|
522
|
+
break
|
|
523
|
+
else:
|
|
524
|
+
scons_logger.sysexit("Error, cannot find '%s.lib' file." % win_lib_name)
|
|
525
|
+
|
|
526
|
+
env.Append(LIBPATH=[win_lib_path])
|
|
527
|
+
env.Append(LIBS=[win_lib_name])
|
|
528
|
+
|
|
529
|
+
if not env.msys2_mingw_python:
|
|
530
|
+
addWinLib()
|
|
531
|
+
|
|
532
|
+
# The static include files reside in Nuitka installation, which may be where
|
|
533
|
+
# the "nuitka.build" package lives.
|
|
534
|
+
nuitka_include = os.path.join(env.nuitka_src, "include")
|
|
535
|
+
|
|
536
|
+
if not os.path.exists(os.path.join(nuitka_include, "nuitka", "prelude.h")):
|
|
537
|
+
scons_logger.sysexit(
|
|
538
|
+
"Error, cannot locate Nuitka includes at '%s', this is a broken Nuitka installation."
|
|
539
|
+
% nuitka_include
|
|
540
|
+
)
|
|
541
|
+
|
|
542
|
+
# We have include files in the build directory and the static include directory
|
|
543
|
+
# that is located inside Nuitka installation.
|
|
544
|
+
env.Append(
|
|
545
|
+
CPPPATH=[
|
|
546
|
+
source_dir,
|
|
547
|
+
nuitka_include,
|
|
548
|
+
os.path.join(env.nuitka_src, "static_src"),
|
|
549
|
+
os.path.join(env.nuitka_src, "inline_copy", "libbacktrace"),
|
|
550
|
+
]
|
|
551
|
+
)
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
# TODO: Make this more easily reusable across scons files by fixed names as
|
|
555
|
+
# arguments to a general scan.
|
|
556
|
+
def discoverSourceFiles():
|
|
557
|
+
result = []
|
|
558
|
+
|
|
559
|
+
static_src_filenames = ["GenerateHeadersMain.c"]
|
|
560
|
+
|
|
561
|
+
result += [
|
|
562
|
+
provideStaticSourceFile(
|
|
563
|
+
env=env,
|
|
564
|
+
sub_path=filename,
|
|
565
|
+
c11_mode=env.c11_mode,
|
|
566
|
+
)
|
|
567
|
+
for filename in static_src_filenames
|
|
568
|
+
]
|
|
569
|
+
|
|
570
|
+
return result
|
|
571
|
+
|
|
572
|
+
|
|
573
|
+
source_files = discoverSourceFiles()
|
|
574
|
+
|
|
575
|
+
# Remove the target file to avoid cases where it falsely doesn't get rebuild and
|
|
576
|
+
# then lingers from previous builds, and also workaround for MinGW64 not
|
|
577
|
+
# supporting unicode result paths for "-o" basename.
|
|
578
|
+
result_exe = makeResultPathFileSystemEncodable(env=env, result_exe=result_exe)
|
|
579
|
+
|
|
580
|
+
target = env.Program(result_exe, source_files)
|
|
581
|
+
|
|
582
|
+
# Use compiler/linker flags provided via environment variables
|
|
583
|
+
importEnvironmentVariableSettings(env)
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
if job_count:
|
|
587
|
+
scons_details_logger.info("Told to run compilation on %d CPUs." % job_count)
|
|
588
|
+
|
|
589
|
+
# Plugin contributed C defines should be used too.
|
|
590
|
+
env.Append(CPPDEFINES=cpp_defines)
|
|
591
|
+
# Plugin contributed C include directories should be used too.
|
|
592
|
+
env.Append(CPPPATH=cpp_include_dirs)
|
|
593
|
+
# Plugin contributed link dirs should be used too.
|
|
594
|
+
env.Append(LIBPATH=link_dirs)
|
|
595
|
+
# Plugin contributed link libraries should be used too.
|
|
596
|
+
env.Append(LIBS=link_libraries)
|
|
597
|
+
|
|
598
|
+
# Work around windows bugs and use watchdogs to track progress of compilation.
|
|
599
|
+
enableSpawnMonitoring(
|
|
600
|
+
env=env,
|
|
601
|
+
source_files=source_files,
|
|
602
|
+
)
|
|
603
|
+
|
|
604
|
+
# Before we go, also lets turn KeyboardInterrupt into a mere error exit as the
|
|
605
|
+
# scons traceback is not going to be very interesting to us.
|
|
606
|
+
changeKeyboardInterruptToErrorExit()
|
|
607
|
+
|
|
608
|
+
# Check if ccache is installed, and complain if it is not.
|
|
609
|
+
if env.gcc_mode:
|
|
610
|
+
enableCcache(
|
|
611
|
+
env=env,
|
|
612
|
+
source_dir=source_dir,
|
|
613
|
+
python_prefix=python_prefix_external,
|
|
614
|
+
assume_yes_for_downloads=assume_yes_for_downloads,
|
|
615
|
+
disable_ccache=disable_ccache,
|
|
616
|
+
)
|
|
617
|
+
|
|
618
|
+
if env.msvc_mode and not disable_ccache:
|
|
619
|
+
enableClcache(
|
|
620
|
+
env=env,
|
|
621
|
+
source_dir=source_dir,
|
|
622
|
+
)
|
|
623
|
+
|
|
624
|
+
writeSconsReport(env=env, target=target)
|
|
625
|
+
|
|
626
|
+
setSconsProgressBarTotal(name=env.progressbar_name, total=len(source_files))
|
|
627
|
+
|
|
628
|
+
scons_details_logger.info("Launching Scons target: %s" % target)
|
|
629
|
+
env.Default(target)
|
|
630
|
+
|
|
631
|
+
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
632
|
+
# integrates with CPython, but also works on its own.
|
|
633
|
+
#
|
|
634
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
635
|
+
# you may not use this file except in compliance with the License.
|
|
636
|
+
# You may obtain a copy of the License at
|
|
637
|
+
#
|
|
638
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
639
|
+
#
|
|
640
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
641
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
642
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
643
|
+
# See the License for the specific language governing permissions and
|
|
644
|
+
# limitations under the License.
|
nuitka/build/Onefile.scons
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# -*- python -*-
|
|
2
|
-
# Copyright
|
|
2
|
+
# Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
"""
|
|
@@ -51,7 +51,7 @@ from .SconsCompilerSettings import (
|
|
|
51
51
|
setupCCompiler,
|
|
52
52
|
switchFromGccToGpp,
|
|
53
53
|
)
|
|
54
|
-
from .SconsHacks import getEnhancedToolDetect
|
|
54
|
+
from .SconsHacks import getEnhancedToolDetect
|
|
55
55
|
from .SconsProgress import enableSconsProgressBar, setSconsProgressBarTotal
|
|
56
56
|
from .SconsSpawn import enableSpawnMonitoring
|
|
57
57
|
from .SconsUtils import (
|
|
@@ -267,10 +267,12 @@ env = checkWindowsCompilerFound(
|
|
|
267
267
|
clang_mode=clang_mode,
|
|
268
268
|
msvc_version=msvc_version,
|
|
269
269
|
assume_yes_for_downloads=assume_yes_for_downloads,
|
|
270
|
+
download_ok=True,
|
|
270
271
|
)
|
|
271
272
|
|
|
272
273
|
env.the_compiler = env["CC"] or env["CXX"]
|
|
273
274
|
env.the_cc_name = os.path.normcase(os.path.basename(env.the_compiler))
|
|
275
|
+
env.module_mode = False # We are only used in this case.
|
|
274
276
|
env.standalone_mode = True # We are only used in this case.
|
|
275
277
|
env.debug_mode = debug_mode
|
|
276
278
|
env.debugger_mode = debugger_mode
|
|
@@ -357,7 +359,7 @@ if env.msvc_mode:
|
|
|
357
359
|
"/J", # default char type is unsigned.
|
|
358
360
|
"/Gd", # Use C calling convention by default.
|
|
359
361
|
"/bigobj", # Product object files with larger internal limits.
|
|
360
|
-
"/source-charset:utf-8",
|
|
362
|
+
"/source-charset:utf-8", # Source files are UTF-8.
|
|
361
363
|
]
|
|
362
364
|
)
|
|
363
365
|
|
|
@@ -497,7 +499,6 @@ env.Append(LIBS=link_libraries)
|
|
|
497
499
|
# Work around windows bugs and use watchdogs to track progress of compilation.
|
|
498
500
|
enableSpawnMonitoring(
|
|
499
501
|
env=env,
|
|
500
|
-
module_mode=module_mode,
|
|
501
502
|
source_files=source_files,
|
|
502
503
|
)
|
|
503
504
|
|
|
@@ -537,15 +538,6 @@ def createBuildDefinitionsFile():
|
|
|
537
538
|
|
|
538
539
|
createBuildDefinitionsFile()
|
|
539
540
|
|
|
540
|
-
# Hack to make Scons use tempfile for gcc linking, to avoid line length limits,
|
|
541
|
-
# which can make linking fail with many modules otherwise. Most needed on Windows,
|
|
542
|
-
# but useful on other platforms too.
|
|
543
|
-
if env.gcc_mode:
|
|
544
|
-
makeGccUseLinkerFile(
|
|
545
|
-
source_files=source_files,
|
|
546
|
-
module_mode=module_mode,
|
|
547
|
-
env=env,
|
|
548
|
-
)
|
|
549
541
|
|
|
550
542
|
writeSconsReport(env=env, target=target)
|
|
551
543
|
|