Nuitka-winsvc 2.1.5__cp311-cp311-win_amd64.whl → 2.2.1__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.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/METADATA +1 -1
- {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/RECORD +234 -225
- nuitka/Errors.py +4 -0
- nuitka/HardImportRegistry.py +18 -1
- nuitka/MainControl.py +27 -30
- nuitka/OptionParsing.py +32 -30
- nuitka/Options.py +26 -13
- nuitka/OutputDirectories.py +7 -4
- nuitka/PostProcessing.py +9 -7
- nuitka/Progress.py +3 -3
- nuitka/PythonVersions.py +2 -2
- nuitka/TreeXML.py +1 -1
- nuitka/Version.py +1 -1
- nuitka/build/Backend.scons +2 -1
- nuitka/build/DataComposerInterface.py +1 -0
- nuitka/build/Onefile.scons +2 -1
- nuitka/build/SconsCaching.py +64 -46
- nuitka/build/SconsCompilerSettings.py +19 -6
- nuitka/build/SconsHacks.py +0 -1
- nuitka/build/SconsInterface.py +84 -5
- nuitka/build/SconsProgress.py +0 -1
- nuitka/build/SconsUtils.py +9 -5
- nuitka/build/include/nuitka/allocator.h +8 -3
- nuitka/build/include/nuitka/compiled_cell.h +8 -0
- nuitka/build/include/nuitka/constants.h +2 -0
- nuitka/build/include/nuitka/exceptions.h +554 -179
- nuitka/build/include/nuitka/helper/dictionaries.h +1 -1
- nuitka/build/include/nuitka/helper/import_hard.h +3 -0
- nuitka/build/include/nuitka/helper/ints.h +15 -2
- nuitka/build/include/nuitka/helper/lists.h +4 -1
- nuitka/build/include/nuitka/helper/raising.h +12 -0
- nuitka/build/include/nuitka/helper/tuples.h +5 -1
- nuitka/build/include/nuitka/helpers.h +5 -0
- nuitka/build/include/nuitka/importing.h +3 -4
- nuitka/build/include/nuitka/jit_sources.h +25 -0
- nuitka/build/include/nuitka/prelude.h +38 -11
- nuitka/build/include/nuitka/printing.h +3 -0
- nuitka/build/include/nuitka/threading.h +2 -6
- nuitka/build/include/nuitka/type_aliases.h +27 -0
- nuitka/build/inline_copy/pkg_resources/pkg_resources/__init__.py +0 -3
- nuitka/build/inline_copy/tqdm/tqdm/version.py +1 -4
- nuitka/build/static_src/CompiledAsyncgenType.c +99 -114
- nuitka/build/static_src/CompiledCodeHelpers.c +24 -14
- nuitka/build/static_src/CompiledCoroutineType.c +96 -114
- nuitka/build/static_src/CompiledFrameType.c +14 -11
- nuitka/build/static_src/CompiledFunctionType.c +34 -7
- nuitka/build/static_src/CompiledGeneratorType.c +248 -142
- nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +60 -70
- nuitka/build/static_src/CompiledMethodType.c +8 -7
- nuitka/build/static_src/HelpersAttributes.c +2 -19
- nuitka/build/static_src/HelpersBuiltin.c +2 -1
- nuitka/build/static_src/HelpersComparisonEq.c +32 -18
- nuitka/build/static_src/HelpersComparisonGe.c +50 -36
- nuitka/build/static_src/HelpersComparisonGt.c +50 -36
- nuitka/build/static_src/HelpersComparisonLe.c +50 -36
- nuitka/build/static_src/HelpersComparisonLt.c +50 -36
- nuitka/build/static_src/HelpersComparisonNe.c +32 -18
- nuitka/build/static_src/HelpersDeepcopy.c +6 -8
- nuitka/build/static_src/HelpersDictionaries.c +8 -3
- nuitka/build/static_src/HelpersExceptions.c +36 -22
- nuitka/build/static_src/HelpersFiles.c +9 -0
- nuitka/build/static_src/HelpersFilesystemPaths.c +7 -7
- nuitka/build/static_src/HelpersImportHard.c +15 -0
- nuitka/build/static_src/HelpersJitSources.c +46 -0
- nuitka/build/static_src/HelpersLists.c +40 -0
- nuitka/build/static_src/HelpersOperationBinaryAdd.c +66 -66
- nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +80 -33
- nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +16 -13
- nuitka/build/static_src/HelpersOperationBinarySub.c +39 -39
- nuitka/build/static_src/HelpersOperationInplaceAdd.c +54 -54
- nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +1 -1
- nuitka/build/static_src/HelpersOperationInplaceSub.c +50 -50
- nuitka/build/static_src/HelpersProfiling.c +3 -4
- nuitka/build/static_src/HelpersRaising.c +62 -1
- nuitka/build/static_src/HelpersStrings.c +203 -8
- nuitka/build/static_src/HelpersTypes.c +42 -0
- nuitka/build/static_src/MainProgram.c +1 -1
- nuitka/build/static_src/MetaPathBasedLoader.c +2 -1
- nuitka/build/static_src/OnefileBootstrap.c +3 -3
- nuitka/code_generation/BinaryOperationHelperDefinitions.py +5 -3
- nuitka/code_generation/BuiltinCodes.py +1 -0
- nuitka/code_generation/CodeGeneration.py +11 -0
- nuitka/code_generation/CodeHelpers.py +5 -3
- nuitka/code_generation/CodeObjectCodes.py +10 -6
- nuitka/code_generation/ComparisonCodes.py +19 -3
- nuitka/code_generation/ConstantCodes.py +5 -0
- nuitka/code_generation/Contexts.py +22 -6
- nuitka/code_generation/Emission.py +1 -0
- nuitka/code_generation/ErrorCodes.py +8 -16
- nuitka/code_generation/EvalCodes.py +5 -3
- nuitka/code_generation/ExceptionCodes.py +8 -1
- nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +1 -0
- nuitka/code_generation/FrameCodes.py +5 -3
- nuitka/code_generation/FunctionCodes.py +0 -1
- nuitka/code_generation/GeneratorCodes.py +3 -3
- nuitka/code_generation/GlobalConstants.py +1 -2
- nuitka/code_generation/ImportCodes.py +2 -0
- nuitka/code_generation/JitCodes.py +44 -0
- nuitka/code_generation/ListCodes.py +11 -17
- nuitka/code_generation/MatchCodes.py +0 -1
- nuitka/code_generation/ModuleCodes.py +2 -1
- nuitka/code_generation/Namify.py +0 -1
- nuitka/code_generation/NetworkxCodes.py +51 -0
- nuitka/code_generation/OperationCodes.py +8 -6
- nuitka/code_generation/PackageResourceCodes.py +7 -5
- nuitka/code_generation/TensorflowCodes.py +54 -0
- nuitka/code_generation/TypeAliasCodes.py +71 -0
- nuitka/code_generation/VariableCodes.py +7 -5
- nuitka/code_generation/VariableDeclarations.py +1 -0
- nuitka/code_generation/c_types/CTypeCLongs.py +0 -1
- nuitka/code_generation/c_types/CTypeNuitkaInts.py +0 -1
- nuitka/code_generation/c_types/CTypeVoids.py +1 -0
- nuitka/code_generation/templates/CodeTemplatesConstants.py +15 -0
- nuitka/code_generation/templates/CodeTemplatesExceptions.py +1 -1
- nuitka/code_generation/templates/CodeTemplatesIterators.py +0 -1
- nuitka/code_generation/templates/CodeTemplatesLoader.py +0 -1
- nuitka/code_generation/templates/CodeTemplatesModules.py +4 -1
- nuitka/code_generation/templates/CodeTemplatesVariables.py +8 -8
- nuitka/code_generation/templates/TemplateDebugWrapper.py +0 -1
- nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +4 -0
- nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +9 -7
- nuitka/containers/Namedtuples.py +0 -1
- nuitka/finalizations/Finalization.py +1 -0
- nuitka/finalizations/FinalizeMarkups.py +0 -1
- nuitka/freezer/DllDependenciesMacOS.py +60 -13
- nuitka/freezer/DllDependenciesPosix.py +0 -1
- nuitka/freezer/IncludedDataFiles.py +46 -15
- nuitka/freezer/IncludedEntryPoints.py +5 -3
- nuitka/freezer/Standalone.py +6 -1
- nuitka/importing/ImportCache.py +2 -2
- nuitka/importing/ImportResolving.py +80 -78
- nuitka/importing/Importing.py +34 -1
- nuitka/nodes/AttributeNodesGenerated.py +21 -6
- nuitka/nodes/BuiltinComplexNodes.py +1 -0
- nuitka/nodes/BuiltinFormatNodes.py +1 -0
- nuitka/nodes/BuiltinIteratorNodes.py +5 -3
- nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +21 -6
- nuitka/nodes/BuiltinRefNodes.py +8 -1
- nuitka/nodes/BuiltinVarsNodes.py +0 -1
- nuitka/nodes/ChildrenHavingMixins.py +906 -186
- nuitka/nodes/CodeObjectSpecs.py +1 -1
- nuitka/nodes/ConstantRefNodes.py +38 -0
- nuitka/nodes/CtypesNodes.py +0 -1
- nuitka/nodes/DictionaryNodes.py +0 -1
- nuitka/nodes/ExceptionNodes.py +10 -0
- nuitka/nodes/ExpressionBases.py +15 -9
- nuitka/nodes/ExpressionBasesGenerated.py +32 -15
- nuitka/nodes/FunctionNodes.py +50 -5
- nuitka/nodes/HardImportNodesGenerated.py +245 -60
- nuitka/nodes/ImportHardNodes.py +27 -13
- nuitka/nodes/ImportNodes.py +90 -70
- nuitka/nodes/InjectCNodes.py +0 -1
- nuitka/nodes/ModuleNodes.py +10 -5
- nuitka/nodes/NetworkxNodes.py +45 -0
- nuitka/nodes/OperatorNodesUnary.py +1 -0
- nuitka/nodes/OsSysNodes.py +0 -1
- nuitka/nodes/PackageMetadataNodes.py +0 -1
- nuitka/nodes/PackageResourceNodes.py +10 -6
- nuitka/nodes/StatementBasesGenerated.py +107 -60
- nuitka/nodes/StringConcatenationNodes.py +1 -0
- nuitka/nodes/TensorflowNodes.py +38 -0
- nuitka/nodes/TypeNodes.py +21 -0
- nuitka/nodes/VariableRefNodes.py +1 -0
- nuitka/nodes/shapes/BuiltinTypeShapes.py +25 -15
- nuitka/optimizations/Optimization.py +7 -6
- nuitka/optimizations/OptimizeBuiltinCalls.py +11 -9
- nuitka/optimizations/Tags.py +0 -1
- nuitka/optimizations/TraceCollections.py +6 -55
- nuitka/optimizations/ValueTraces.py +49 -1
- nuitka/plugins/PluginBase.py +26 -4
- nuitka/plugins/Plugins.py +49 -12
- nuitka/plugins/standard/AntiBloatPlugin.py +12 -2
- nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +0 -1
- nuitka/plugins/standard/DataFilesPlugin.py +2 -6
- nuitka/plugins/standard/DillPlugin.py +3 -3
- nuitka/plugins/standard/DllFilesPlugin.py +29 -23
- nuitka/plugins/standard/GiPlugin.py +1 -0
- nuitka/plugins/standard/ImplicitImports.py +9 -7
- nuitka/plugins/standard/MatplotlibPlugin.py +1 -0
- nuitka/plugins/standard/OptionsNannyPlugin.py +3 -7
- nuitka/plugins/standard/PkgResourcesPlugin.py +0 -1
- nuitka/plugins/standard/PmwPlugin.py +10 -9
- nuitka/plugins/standard/PySidePyQtPlugin.py +0 -28
- nuitka/plugins/standard/TensorflowPlugin.py +1 -0
- nuitka/plugins/standard/TorchPlugin.py +1 -0
- nuitka/plugins/standard/TrioPlugin.py +1 -0
- nuitka/plugins/standard/standard.nuitka-package.config.yml +242 -54
- nuitka/reports/CompilationReportReader.py +0 -1
- nuitka/reports/Reports.py +49 -5
- nuitka/specs/BuiltinParameterSpecs.py +10 -2
- nuitka/specs/BuiltinStrOperationSpecs.py +1 -1
- nuitka/specs/BuiltinTypeOperationSpecs.py +0 -1
- nuitka/specs/HardImportSpecs.py +34 -1
- nuitka/specs/ParameterSpecs.py +11 -9
- nuitka/tools/environments/Virtualenv.py +0 -1
- nuitka/tools/specialize/CTypeDescriptions.py +15 -11
- nuitka/tools/specialize/SpecializeC.py +11 -9
- nuitka/tools/specialize/SpecializePython.py +57 -30
- nuitka/tools/testing/Common.py +24 -7
- nuitka/tools/testing/OutputComparison.py +4 -0
- nuitka/tools/testing/Pythons.py +0 -1
- nuitka/tools/testing/compare_with_cpython/__main__.py +0 -4
- nuitka/tools/watch/GitHub.py +4 -1
- nuitka/tools/watch/__main__.py +22 -1
- nuitka/tree/Building.py +3 -0
- nuitka/tree/InternalModule.py +0 -1
- nuitka/tree/ReformulationAssertStatements.py +1 -0
- nuitka/tree/ReformulationAssignmentStatements.py +26 -3
- nuitka/tree/ReformulationClasses3.py +23 -26
- nuitka/tree/ReformulationContractionExpressions.py +5 -3
- nuitka/tree/ReformulationDictionaryCreation.py +6 -5
- nuitka/tree/ReformulationExecStatements.py +8 -6
- nuitka/tree/ReformulationFunctionStatements.py +10 -6
- nuitka/tree/SourceHandling.py +8 -0
- nuitka/tree/TreeHelpers.py +6 -3
- nuitka/utils/AppDirs.py +6 -2
- nuitka/utils/CStrings.py +1 -1
- nuitka/utils/CommandLineOptions.py +0 -1
- nuitka/utils/Distributions.py +3 -3
- nuitka/utils/Download.py +5 -1
- nuitka/utils/Execution.py +6 -3
- nuitka/utils/FileOperations.py +62 -35
- nuitka/utils/Importing.py +4 -4
- nuitka/utils/InstanceCounters.py +1 -0
- nuitka/utils/MacOSApp.py +1 -0
- nuitka/utils/Shebang.py +1 -0
- nuitka/utils/Utils.py +39 -1
- nuitka/utils/WindowsFileUsage.py +4 -3
- {Nuitka_winsvc-2.1.5.data → Nuitka_winsvc-2.2.1.data}/scripts/nuitka-run.bat +0 -0
- {Nuitka_winsvc-2.1.5.data → Nuitka_winsvc-2.2.1.data}/scripts/nuitka.bat +0 -0
- {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/LICENSE.txt +0 -0
- {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/WHEEL +0 -0
- {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/entry_points.txt +0 -0
- {Nuitka_winsvc-2.1.5.dist-info → Nuitka_winsvc-2.2.1.dist-info}/top_level.txt +0 -0
nuitka/Errors.py
CHANGED
|
@@ -69,6 +69,10 @@ class NuitkaForbiddenDLLEncounter(Exception):
|
|
|
69
69
|
"""This DLL is not allowed to be included."""
|
|
70
70
|
|
|
71
71
|
|
|
72
|
+
class NuitkaSyntaxError(Exception):
|
|
73
|
+
"""The code cannot be read due to SyntaxError"""
|
|
74
|
+
|
|
75
|
+
|
|
72
76
|
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
73
77
|
# integrates with CPython, but also works on its own.
|
|
74
78
|
#
|
nuitka/HardImportRegistry.py
CHANGED
|
@@ -63,6 +63,10 @@ hard_modules_non_stdlib = set(
|
|
|
63
63
|
"pkg_resources",
|
|
64
64
|
"importlib_metadata",
|
|
65
65
|
"importlib_resources",
|
|
66
|
+
"tensorflow",
|
|
67
|
+
# TODO: Disabled for now, keyword only arguments and star list argument
|
|
68
|
+
# are having ordering issues for call matching and code generation.
|
|
69
|
+
# "networkx.utils.decorators",
|
|
66
70
|
)
|
|
67
71
|
)
|
|
68
72
|
|
|
@@ -109,7 +113,15 @@ def isHardModule(module_name):
|
|
|
109
113
|
|
|
110
114
|
|
|
111
115
|
# These modules can cause issues if imported during compile time.
|
|
112
|
-
hard_modules_trust_with_side_effects = set(
|
|
116
|
+
hard_modules_trust_with_side_effects = set(
|
|
117
|
+
[
|
|
118
|
+
"site",
|
|
119
|
+
"tensorflow",
|
|
120
|
+
# TODO: Disabled for now, keyword only arguments and star list argument are
|
|
121
|
+
# having ordering issues for call matching and code generation.
|
|
122
|
+
# "networkx.utils.decorators"
|
|
123
|
+
]
|
|
124
|
+
)
|
|
113
125
|
if not isWin32Windows():
|
|
114
126
|
# Crashing on anything but Windows.
|
|
115
127
|
hard_modules_trust_with_side_effects.add("ctypes.wintypes")
|
|
@@ -264,6 +276,10 @@ hard_modules_trust = {
|
|
|
264
276
|
"ctypes.wintypes": {},
|
|
265
277
|
"ctypes.macholib": {},
|
|
266
278
|
"builtins": module_builtins_trust,
|
|
279
|
+
"tensorflow": {"function": trust_node},
|
|
280
|
+
# TODO: Disabled for now, keyword only arguments and star list argument are
|
|
281
|
+
# having ordering issues for call matching and code generation.
|
|
282
|
+
# "networkx.utils.decorators": {"argmap": trust_node},
|
|
267
283
|
}
|
|
268
284
|
|
|
269
285
|
|
|
@@ -329,6 +345,7 @@ def addModuleDynamicHard(module_name):
|
|
|
329
345
|
hard_modules.add(module_name)
|
|
330
346
|
hard_modules_dynamic.add(module_name)
|
|
331
347
|
hard_modules_non_stdlib.add(module_name)
|
|
348
|
+
hard_modules_trust_with_side_effects.add(module_name)
|
|
332
349
|
|
|
333
350
|
if module_name not in hard_modules_trust:
|
|
334
351
|
hard_modules_trust[module_name] = {}
|
nuitka/MainControl.py
CHANGED
|
@@ -279,7 +279,7 @@ def dumpTreeXML():
|
|
|
279
279
|
filename = Options.getXMLDumpOutputFilename()
|
|
280
280
|
|
|
281
281
|
if filename is not None:
|
|
282
|
-
with openTextFile(filename, "
|
|
282
|
+
with openTextFile(filename, "wb") as output_file:
|
|
283
283
|
# XML output only.
|
|
284
284
|
for module in ModuleRegistry.getDoneModules():
|
|
285
285
|
dumpTreeXMLToFile(tree=module.asXml(), output_file=output_file)
|
|
@@ -759,12 +759,7 @@ def runSconsBackend():
|
|
|
759
759
|
return result
|
|
760
760
|
|
|
761
761
|
|
|
762
|
-
def callExecPython(args,
|
|
763
|
-
old_python_path = os.getenv("PYTHONPATH")
|
|
764
|
-
|
|
765
|
-
if clean_path and old_python_path is not None:
|
|
766
|
-
os.environ["PYTHONPATH"] = ""
|
|
767
|
-
|
|
762
|
+
def callExecPython(args, add_path):
|
|
768
763
|
if add_path:
|
|
769
764
|
if "PYTHONPATH" in os.environ:
|
|
770
765
|
os.environ["PYTHONPATH"] += ":" + Options.getOutputDir()
|
|
@@ -777,17 +772,17 @@ def callExecPython(args, clean_path, add_path):
|
|
|
777
772
|
callExecProcess(args)
|
|
778
773
|
|
|
779
774
|
|
|
780
|
-
def
|
|
775
|
+
def _executeMain(binary_filename):
|
|
781
776
|
# Wrap in debugger, unless the CMD file contains that call already.
|
|
782
777
|
if Options.shallRunInDebugger() and not Options.shallCreateCmdFileForExecution():
|
|
783
778
|
args = wrapCommandForDebuggerForExec(binary_filename)
|
|
784
779
|
else:
|
|
785
780
|
args = (binary_filename, binary_filename)
|
|
786
781
|
|
|
787
|
-
callExecPython(
|
|
782
|
+
callExecPython(add_path=False, args=args)
|
|
788
783
|
|
|
789
784
|
|
|
790
|
-
def
|
|
785
|
+
def _executeModule(tree):
|
|
791
786
|
"""Execute the extension module just created."""
|
|
792
787
|
|
|
793
788
|
if python_version < 0x340:
|
|
@@ -829,7 +824,7 @@ import sys; sys.path.insert(0, %(output_dir)r)
|
|
|
829
824
|
else:
|
|
830
825
|
args = (sys.executable, "python", "-c", python_command)
|
|
831
826
|
|
|
832
|
-
callExecPython(
|
|
827
|
+
callExecPython(add_path=True, args=args)
|
|
833
828
|
|
|
834
829
|
|
|
835
830
|
def compileTree():
|
|
@@ -842,9 +837,11 @@ def compileTree():
|
|
|
842
837
|
|
|
843
838
|
reportMemoryUsage(
|
|
844
839
|
"before_c_code_generation",
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
840
|
+
(
|
|
841
|
+
"Total memory usage before generating C code:"
|
|
842
|
+
if Options.isShowProgress() or Options.isShowMemory()
|
|
843
|
+
else None
|
|
844
|
+
),
|
|
848
845
|
)
|
|
849
846
|
|
|
850
847
|
# Now build the target language code for the whole tree.
|
|
@@ -870,9 +867,11 @@ def compileTree():
|
|
|
870
867
|
|
|
871
868
|
reportMemoryUsage(
|
|
872
869
|
"before_running_scons",
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
870
|
+
(
|
|
871
|
+
"Total memory usage before running scons"
|
|
872
|
+
if Options.isShowProgress() or Options.isShowMemory()
|
|
873
|
+
else None
|
|
874
|
+
),
|
|
876
875
|
)
|
|
877
876
|
|
|
878
877
|
if Options.isShowMemory():
|
|
@@ -953,9 +952,11 @@ def _main():
|
|
|
953
952
|
|
|
954
953
|
reportMemoryUsage(
|
|
955
954
|
"after_launch",
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
955
|
+
(
|
|
956
|
+
"Total memory usage before processing:"
|
|
957
|
+
if Options.isShowProgress() or Options.isShowMemory()
|
|
958
|
+
else None
|
|
959
|
+
),
|
|
959
960
|
)
|
|
960
961
|
|
|
961
962
|
# Initialize the importing layer from options, main filenames, debugging
|
|
@@ -1004,8 +1005,6 @@ def _main():
|
|
|
1004
1005
|
|
|
1005
1006
|
executePostProcessing()
|
|
1006
1007
|
|
|
1007
|
-
copyDataFiles()
|
|
1008
|
-
|
|
1009
1008
|
if Options.isStandaloneMode():
|
|
1010
1009
|
binary_filename = scons_options["result_exe"]
|
|
1011
1010
|
|
|
@@ -1026,6 +1025,10 @@ def _main():
|
|
|
1026
1025
|
standalone_entry_points=getStandaloneEntryPoints(),
|
|
1027
1026
|
)
|
|
1028
1027
|
|
|
1028
|
+
copyDataFiles(standalone_entry_points=getStandaloneEntryPoints())
|
|
1029
|
+
|
|
1030
|
+
if Options.isStandaloneMode():
|
|
1031
|
+
|
|
1029
1032
|
Plugins.onStandaloneDistributionFinished(dist_dir)
|
|
1030
1033
|
|
|
1031
1034
|
if Options.isOnefileMode():
|
|
@@ -1105,15 +1108,9 @@ not use compiled code while it exists."""
|
|
|
1105
1108
|
general.info("Launching '%s'." % run_filename)
|
|
1106
1109
|
|
|
1107
1110
|
if Options.shallMakeModule():
|
|
1108
|
-
|
|
1109
|
-
tree=main_module,
|
|
1110
|
-
clean_path=Options.shallClearPythonPathEnvironment(),
|
|
1111
|
-
)
|
|
1111
|
+
_executeModule(tree=main_module)
|
|
1112
1112
|
else:
|
|
1113
|
-
|
|
1114
|
-
binary_filename=run_filename,
|
|
1115
|
-
clean_path=Options.shallClearPythonPathEnvironment(),
|
|
1116
|
-
)
|
|
1113
|
+
_executeMain(run_filename)
|
|
1117
1114
|
else:
|
|
1118
1115
|
if run_filename != final_filename:
|
|
1119
1116
|
general.info(
|
nuitka/OptionParsing.py
CHANGED
|
@@ -577,18 +577,6 @@ Execute inside a debugger, e.g. "gdb" or "lldb" to automatically get a stack tra
|
|
|
577
577
|
Defaults to off.""",
|
|
578
578
|
)
|
|
579
579
|
|
|
580
|
-
execute_group.add_option(
|
|
581
|
-
"--execute-with-pythonpath",
|
|
582
|
-
action="store_true",
|
|
583
|
-
dest="keep_pythonpath",
|
|
584
|
-
default=False,
|
|
585
|
-
help="""\
|
|
586
|
-
When immediately executing the created binary or module using '--run',
|
|
587
|
-
don't reset 'PYTHONPATH' environment. When all modules are successfully
|
|
588
|
-
included, you ought to not need PYTHONPATH anymore, and definitely not
|
|
589
|
-
for standalone mode.""",
|
|
590
|
-
)
|
|
591
|
-
|
|
592
580
|
del execute_group
|
|
593
581
|
|
|
594
582
|
|
|
@@ -738,7 +726,19 @@ Keep deployment mode, but disable selectively parts of it. Errors from
|
|
|
738
726
|
deployment mode will output these identifiers. Default empty.""",
|
|
739
727
|
)
|
|
740
728
|
|
|
741
|
-
|
|
729
|
+
environment_group = parser.add_option_group("Environment control")
|
|
730
|
+
|
|
731
|
+
environment_group.add_option(
|
|
732
|
+
"--force-runtime-environment-variable",
|
|
733
|
+
action="append",
|
|
734
|
+
dest="forced_runtime_env_variables",
|
|
735
|
+
metavar="VARIABLE_SPEC",
|
|
736
|
+
default=[],
|
|
737
|
+
help="""\
|
|
738
|
+
Force an environment variables to a given value. Default empty.""",
|
|
739
|
+
)
|
|
740
|
+
|
|
741
|
+
del environment_group
|
|
742
742
|
|
|
743
743
|
debug_group = parser.add_option_group("Debug features")
|
|
744
744
|
|
|
@@ -1709,6 +1709,7 @@ plugin_group.add_option(
|
|
|
1709
1709
|
dest="plugins_disabled",
|
|
1710
1710
|
metavar="PLUGIN_NAME",
|
|
1711
1711
|
default=[],
|
|
1712
|
+
github_action=False,
|
|
1712
1713
|
help="""\
|
|
1713
1714
|
Disabled plugins. Must be plug-in names. Use '--plugin-list' to query the
|
|
1714
1715
|
full list and exit. Most standard plugins are not a good idea to disable.
|
|
@@ -1716,16 +1717,12 @@ Default empty.""",
|
|
|
1716
1717
|
)
|
|
1717
1718
|
|
|
1718
1719
|
plugin_group.add_option(
|
|
1719
|
-
"--plugin
|
|
1720
|
-
action="
|
|
1721
|
-
dest="
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
via "--disable-plugin=plugin-that-warned", or you can use this option to disable
|
|
1726
|
-
the mechanism entirely, which also speeds up compilation slightly of course as
|
|
1727
|
-
this detection code is run in vain once you are certain of which plugins to
|
|
1728
|
-
use. Defaults to off.""",
|
|
1720
|
+
"--user-plugin",
|
|
1721
|
+
action="append",
|
|
1722
|
+
dest="user_plugins",
|
|
1723
|
+
metavar="PATH",
|
|
1724
|
+
default=[],
|
|
1725
|
+
help="The file name of user plugin. Can be given multiple times. Default empty.",
|
|
1729
1726
|
)
|
|
1730
1727
|
|
|
1731
1728
|
plugin_group.add_option(
|
|
@@ -1734,17 +1731,22 @@ plugin_group.add_option(
|
|
|
1734
1731
|
dest="plugin_list",
|
|
1735
1732
|
default=False,
|
|
1736
1733
|
require_compiling=False,
|
|
1734
|
+
github_action=False,
|
|
1737
1735
|
help="""\
|
|
1738
1736
|
Show list of all available plugins and exit. Defaults to off.""",
|
|
1739
1737
|
)
|
|
1740
1738
|
|
|
1741
1739
|
plugin_group.add_option(
|
|
1742
|
-
"--
|
|
1743
|
-
action="
|
|
1744
|
-
dest="
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1740
|
+
"--plugin-no-detection",
|
|
1741
|
+
action="store_false",
|
|
1742
|
+
dest="detect_missing_plugins",
|
|
1743
|
+
default=True,
|
|
1744
|
+
help="""\
|
|
1745
|
+
Plugins can detect if they might be used, and the you can disable the warning
|
|
1746
|
+
via "--disable-plugin=plugin-that-warned", or you can use this option to disable
|
|
1747
|
+
the mechanism entirely, which also speeds up compilation slightly of course as
|
|
1748
|
+
this detection code is run in vain once you are certain of which plugins to
|
|
1749
|
+
use. Defaults to off.""",
|
|
1748
1750
|
)
|
|
1749
1751
|
|
|
1750
1752
|
plugin_group.add_option(
|
|
@@ -1759,12 +1761,12 @@ to provide extra decisions. Format is currently
|
|
|
1759
1761
|
Default empty.""",
|
|
1760
1762
|
)
|
|
1761
1763
|
|
|
1762
|
-
|
|
1763
1764
|
plugin_group.add_option(
|
|
1764
1765
|
"--show-source-changes",
|
|
1765
1766
|
action="append",
|
|
1766
1767
|
dest="show_source_changes",
|
|
1767
1768
|
default=[],
|
|
1769
|
+
github_action=False,
|
|
1768
1770
|
help="""\
|
|
1769
1771
|
Show source changes to original Python file content before compilation. Mostly
|
|
1770
1772
|
intended for developing plugins and Nuitka package configuration. Use e.g.
|
nuitka/Options.py
CHANGED
|
@@ -61,6 +61,7 @@ from nuitka.utils.Utils import (
|
|
|
61
61
|
getArchitecture,
|
|
62
62
|
getCPUCoreCount,
|
|
63
63
|
getLinuxDistribution,
|
|
64
|
+
getMacOSRelease,
|
|
64
65
|
getOS,
|
|
65
66
|
getWindowsRelease,
|
|
66
67
|
hasOnefileSupportedOS,
|
|
@@ -159,7 +160,7 @@ def checkPathSpec(value, arg_name, allow_disable):
|
|
|
159
160
|
% (arg_name, value)
|
|
160
161
|
)
|
|
161
162
|
|
|
162
|
-
if "{VERSION}" in value and not (
|
|
163
|
+
if "{VERSION}" in value and not (getFileVersionTuple() or getProductVersionTuple()):
|
|
163
164
|
Tracing.options_logger.sysexit(
|
|
164
165
|
"Using value '{VERSION}' in '%s=%s' value without being specified."
|
|
165
166
|
% (arg_name, value)
|
|
@@ -291,6 +292,9 @@ def _getVersionInformationValues():
|
|
|
291
292
|
if isWin32OrPosixWindows():
|
|
292
293
|
yield "WindowsRelease: %s" % getWindowsRelease()
|
|
293
294
|
|
|
295
|
+
if isMacOS():
|
|
296
|
+
yield "macOSRelease: %s" % getMacOSRelease()
|
|
297
|
+
|
|
294
298
|
|
|
295
299
|
def printVersionInformation():
|
|
296
300
|
print("\n".join(_getVersionInformationValues()))
|
|
@@ -630,7 +634,7 @@ it before using it: '%s' (from --output-filename='%s')."""
|
|
|
630
634
|
)
|
|
631
635
|
|
|
632
636
|
try:
|
|
633
|
-
file_version =
|
|
637
|
+
file_version = getFileVersionTuple()
|
|
634
638
|
# Catch all the things, don't want any interface, pylint: disable=broad-except
|
|
635
639
|
except Exception:
|
|
636
640
|
Tracing.options_logger.sysexit(
|
|
@@ -638,7 +642,7 @@ it before using it: '%s' (from --output-filename='%s')."""
|
|
|
638
642
|
)
|
|
639
643
|
|
|
640
644
|
try:
|
|
641
|
-
product_version =
|
|
645
|
+
product_version = getProductVersionTuple()
|
|
642
646
|
# Catch all the things, don't want any interface, pylint: disable=broad-except
|
|
643
647
|
except Exception:
|
|
644
648
|
Tracing.options_logger.sysexit(
|
|
@@ -1087,11 +1091,6 @@ but errors may happen."""
|
|
|
1087
1091
|
"The '--debugger' option has no effect outside of '--debug' without '--run' option."
|
|
1088
1092
|
)
|
|
1089
1093
|
|
|
1090
|
-
if not shallClearPythonPathEnvironment():
|
|
1091
|
-
Tracing.options_logger.warning(
|
|
1092
|
-
"The '--execute-with-pythonpath' option has no effect without '--run' option."
|
|
1093
|
-
)
|
|
1094
|
-
|
|
1095
1094
|
# Check if the fallback is used, except for Python2 on Windows, where we cannot
|
|
1096
1095
|
# have it.
|
|
1097
1096
|
if hasattr(OrderedSet, "is_fallback") and not (
|
|
@@ -1454,11 +1453,6 @@ def shallOptimizeStringExec():
|
|
|
1454
1453
|
return False
|
|
1455
1454
|
|
|
1456
1455
|
|
|
1457
|
-
def shallClearPythonPathEnvironment():
|
|
1458
|
-
"""*bool* = **not** ``--execute-with-pythonpath``"""
|
|
1459
|
-
return not options.keep_pythonpath
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
1456
|
_shall_use_static_lib_python = None
|
|
1463
1457
|
|
|
1464
1458
|
|
|
@@ -1999,11 +1993,21 @@ def _parseVersionNumber(value):
|
|
|
1999
1993
|
|
|
2000
1994
|
|
|
2001
1995
|
def getProductVersion():
|
|
1996
|
+
""":returns: str, derived from ``--product-version``"""
|
|
1997
|
+
return options.product_version
|
|
1998
|
+
|
|
1999
|
+
|
|
2000
|
+
def getProductVersionTuple():
|
|
2002
2001
|
""":returns: tuple of 4 ints or None, derived from ``--product-version``"""
|
|
2003
2002
|
return _parseVersionNumber(options.product_version)
|
|
2004
2003
|
|
|
2005
2004
|
|
|
2006
2005
|
def getFileVersion():
|
|
2006
|
+
""":returns str, derived from ``--file-version``"""
|
|
2007
|
+
return options.file_version
|
|
2008
|
+
|
|
2009
|
+
|
|
2010
|
+
def getFileVersionTuple():
|
|
2007
2011
|
""":returns tuple of 4 ints or None, derived from ``--file-version``"""
|
|
2008
2012
|
return _parseVersionNumber(options.file_version)
|
|
2009
2013
|
|
|
@@ -2432,6 +2436,15 @@ def getModuleParameter(module_name, parameter_name):
|
|
|
2432
2436
|
return None
|
|
2433
2437
|
|
|
2434
2438
|
|
|
2439
|
+
def getForcedRuntimeEnvironmentVariableValues():
|
|
2440
|
+
""":returns: iterable (string, string) derived from ``----force-runtime-environment-variable``"""
|
|
2441
|
+
|
|
2442
|
+
for forced_runtime_env_variables_spec in options.forced_runtime_env_variables:
|
|
2443
|
+
name, value = forced_runtime_env_variables_spec.split("=", 1)
|
|
2444
|
+
|
|
2445
|
+
yield (name, value)
|
|
2446
|
+
|
|
2447
|
+
|
|
2435
2448
|
# Part of "Nuitka", an optimizing Python compiler that is compatible and
|
|
2436
2449
|
# integrates with CPython, but also works on its own.
|
|
2437
2450
|
#
|
nuitka/OutputDirectories.py
CHANGED
|
@@ -14,7 +14,7 @@ import os
|
|
|
14
14
|
|
|
15
15
|
from nuitka import Options
|
|
16
16
|
from nuitka.utils.FileOperations import (
|
|
17
|
-
|
|
17
|
+
addFilenameExtension,
|
|
18
18
|
makePath,
|
|
19
19
|
putTextFileContents,
|
|
20
20
|
)
|
|
@@ -126,10 +126,13 @@ def getResultFullpath(onefile):
|
|
|
126
126
|
elif output_filename is not None:
|
|
127
127
|
result = output_filename
|
|
128
128
|
elif not isWin32OrPosixWindows() and not Options.shallCreateAppBundle():
|
|
129
|
-
result
|
|
129
|
+
result = addFilenameExtension(result, ".bin")
|
|
130
130
|
|
|
131
|
-
if isWin32OrPosixWindows()
|
|
132
|
-
result
|
|
131
|
+
if isWin32OrPosixWindows():
|
|
132
|
+
result = addFilenameExtension(result, ".exe")
|
|
133
|
+
|
|
134
|
+
if not isWin32OrPosixWindows() and Options.isOnefileMode() and not onefile:
|
|
135
|
+
result = addFilenameExtension(result, ".bin")
|
|
133
136
|
|
|
134
137
|
return result
|
|
135
138
|
|
nuitka/PostProcessing.py
CHANGED
|
@@ -227,13 +227,13 @@ def executePostProcessingResources(manifest, onefile):
|
|
|
227
227
|
|
|
228
228
|
if (
|
|
229
229
|
Options.getWindowsVersionInfoStrings()
|
|
230
|
-
or Options.
|
|
231
|
-
or Options.
|
|
230
|
+
or Options.getProductVersionTuple()
|
|
231
|
+
or Options.getFileVersionTuple()
|
|
232
232
|
):
|
|
233
233
|
addVersionInfoResource(
|
|
234
234
|
string_values=Options.getWindowsVersionInfoStrings(),
|
|
235
|
-
product_version=Options.
|
|
236
|
-
file_version=Options.
|
|
235
|
+
product_version=Options.getProductVersionTuple(),
|
|
236
|
+
file_version=Options.getFileVersionTuple(),
|
|
237
237
|
file_date=(0, 0),
|
|
238
238
|
is_exe=not Options.shallMakeModule(),
|
|
239
239
|
result_filename=result_filename,
|
|
@@ -379,9 +379,11 @@ set PYTHONHOME=%(python_home)s
|
|
|
379
379
|
set NUITKA_PYTHONPATH=%(python_path)s
|
|
380
380
|
%(debugger_call)s"%%~dp0%(exe_filename)s" %%*
|
|
381
381
|
""" % {
|
|
382
|
-
"debugger_call": (
|
|
383
|
-
|
|
384
|
-
|
|
382
|
+
"debugger_call": (
|
|
383
|
+
(" ".join(wrapCommandForDebuggerForExec()) + " ")
|
|
384
|
+
if Options.shallRunInDebugger()
|
|
385
|
+
else ""
|
|
386
|
+
),
|
|
385
387
|
"dll_directory": dll_directory,
|
|
386
388
|
"python_home": sys.prefix,
|
|
387
389
|
"python_path": ";".join(sys.path),
|
nuitka/Progress.py
CHANGED
|
@@ -41,9 +41,9 @@ class NuitkaProgressBar(object):
|
|
|
41
41
|
self.tqdm = tqdm(
|
|
42
42
|
iterable=iterable,
|
|
43
43
|
initial=self.progress,
|
|
44
|
-
total=
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
total=(
|
|
45
|
+
max(self.total, self.min_total) if self.min_total is not None else None
|
|
46
|
+
),
|
|
47
47
|
unit=unit,
|
|
48
48
|
disable=None,
|
|
49
49
|
leave=False,
|
nuitka/PythonVersions.py
CHANGED
|
@@ -36,13 +36,13 @@ def getSupportedPythonVersions():
|
|
|
36
36
|
|
|
37
37
|
def getNotYetSupportedPythonVersions():
|
|
38
38
|
"""Versions known to not work at all (yet)."""
|
|
39
|
-
return ("3.
|
|
39
|
+
return ("3.13",)
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
def getPartiallySupportedPythonVersions():
|
|
43
43
|
"""Partially supported Python versions for Nuitka."""
|
|
44
44
|
|
|
45
|
-
return ()
|
|
45
|
+
return ("3.12",)
|
|
46
46
|
|
|
47
47
|
|
|
48
48
|
def getZstandardSupportingVersions():
|
nuitka/TreeXML.py
CHANGED
nuitka/Version.py
CHANGED
nuitka/build/Backend.scons
CHANGED
|
@@ -1044,12 +1044,13 @@ enableSpawnMonitoring(
|
|
|
1044
1044
|
changeKeyboardInterruptToErrorExit()
|
|
1045
1045
|
|
|
1046
1046
|
# Check if ccache is installed, and complain if it is not.
|
|
1047
|
-
if env.gcc_mode
|
|
1047
|
+
if env.gcc_mode:
|
|
1048
1048
|
enableCcache(
|
|
1049
1049
|
env=env,
|
|
1050
1050
|
source_dir=source_dir,
|
|
1051
1051
|
python_prefix=python_prefix_external,
|
|
1052
1052
|
assume_yes_for_downloads=assume_yes_for_downloads,
|
|
1053
|
+
disable_ccache=disable_ccache,
|
|
1053
1054
|
)
|
|
1054
1055
|
|
|
1055
1056
|
if env.msvc_mode and not disable_ccache:
|
nuitka/build/Onefile.scons
CHANGED
|
@@ -496,12 +496,13 @@ enableSpawnMonitoring(
|
|
|
496
496
|
changeKeyboardInterruptToErrorExit()
|
|
497
497
|
|
|
498
498
|
# Check if ccache is installed, and complain if it is not.
|
|
499
|
-
if env.gcc_mode
|
|
499
|
+
if env.gcc_mode:
|
|
500
500
|
enableCcache(
|
|
501
501
|
env=env,
|
|
502
502
|
source_dir=source_dir,
|
|
503
503
|
python_prefix=python_prefix_external,
|
|
504
504
|
assume_yes_for_downloads=assume_yes_for_downloads,
|
|
505
|
+
disable_ccache=disable_ccache,
|
|
505
506
|
)
|
|
506
507
|
|
|
507
508
|
if env.msvc_mode and not disable_ccache:
|