Nuitka-winsvc 2.4.11__cp311-cp311-win_amd64.whl → 2.5.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.

Files changed (304) hide show
  1. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/METADATA +56 -109
  2. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/RECORD +304 -280
  3. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/WHEEL +1 -1
  4. nuitka/Builtins.py +31 -0
  5. nuitka/HardImportRegistry.py +8 -0
  6. nuitka/MainControl.py +9 -4
  7. nuitka/OptionParsing.py +108 -54
  8. nuitka/Options.py +69 -13
  9. nuitka/OutputDirectories.py +7 -2
  10. nuitka/PostProcessing.py +69 -38
  11. nuitka/Progress.py +16 -1
  12. nuitka/PythonVersions.py +2 -1
  13. nuitka/Serialization.py +4 -2
  14. nuitka/Tracing.py +69 -1
  15. nuitka/Version.py +2 -2
  16. nuitka/build/Backend.scons +45 -5
  17. nuitka/build/CCompilerVersion.scons +6 -0
  18. nuitka/build/Onefile.scons +6 -0
  19. nuitka/build/SconsCaching.py +4 -0
  20. nuitka/build/SconsCompilerSettings.py +14 -3
  21. nuitka/build/SconsInterface.py +3 -0
  22. nuitka/build/SconsUtils.py +5 -0
  23. nuitka/build/include/nuitka/allocator.h +124 -1
  24. nuitka/build/include/nuitka/calling.h +6 -6
  25. nuitka/build/include/nuitka/compiled_asyncgen.h +10 -7
  26. nuitka/build/include/nuitka/compiled_frame.h +2 -1
  27. nuitka/build/include/nuitka/constants.h +8 -0
  28. nuitka/build/include/nuitka/debug_settings.h +60 -0
  29. nuitka/build/include/nuitka/exceptions.h +264 -121
  30. nuitka/build/include/nuitka/helper/attributes.h +0 -4
  31. nuitka/build/include/nuitka/helper/calling_generated.h +52 -52
  32. nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +47 -0
  33. nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +39 -0
  34. nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +39 -0
  35. nuitka/build/include/nuitka/helper/comparisons_dual_le.h +47 -0
  36. nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +47 -0
  37. nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +39 -0
  38. nuitka/build/include/nuitka/helper/dictionaries.h +75 -31
  39. nuitka/build/include/nuitka/helper/ints.h +86 -37
  40. nuitka/build/include/nuitka/helper/iterators.h +82 -34
  41. nuitka/build/include/nuitka/helper/operations.h +3 -0
  42. nuitka/build/include/nuitka/helper/operations_binary_add.h +6 -0
  43. nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
  44. nuitka/build/include/nuitka/helper/operations_binary_sub.h +6 -0
  45. nuitka/build/include/nuitka/helper/operations_inplace_add.h +3 -0
  46. nuitka/build/include/nuitka/helper/operations_inplace_sub.h +3 -0
  47. nuitka/build/include/nuitka/helper/raising.h +47 -28
  48. nuitka/build/include/nuitka/helper/richcomparisons.h +7 -0
  49. nuitka/build/include/nuitka/helper/tuples.h +12 -0
  50. nuitka/build/include/nuitka/helpers.h +12 -2
  51. nuitka/build/include/nuitka/prelude.h +36 -25
  52. nuitka/build/include/nuitka/printing.h +9 -7
  53. nuitka/build/include/nuitka/threading.h +15 -1
  54. nuitka/build/include/nuitka/type_aliases.h +3 -0
  55. nuitka/build/inline_copy/stubgen/astunparse.py +938 -0
  56. nuitka/build/inline_copy/stubgen/six.py +998 -0
  57. nuitka/build/inline_copy/stubgen/stubgen.py +307 -0
  58. nuitka/build/static_src/CompiledAsyncgenType.c +45 -39
  59. nuitka/build/static_src/CompiledCellType.c +6 -4
  60. nuitka/build/static_src/CompiledCodeHelpers.c +106 -40
  61. nuitka/build/static_src/CompiledCoroutineType.c +41 -31
  62. nuitka/build/static_src/CompiledFrameType.c +110 -79
  63. nuitka/build/static_src/CompiledFunctionType.c +173 -151
  64. nuitka/build/static_src/CompiledGeneratorType.c +51 -49
  65. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +433 -46
  66. nuitka/build/static_src/CompiledMethodType.c +6 -12
  67. nuitka/build/static_src/HelpersAllocator.c +266 -28
  68. nuitka/build/static_src/HelpersAttributes.c +0 -21
  69. nuitka/build/static_src/HelpersBuiltin.c +23 -14
  70. nuitka/build/static_src/HelpersCalling.c +7 -7
  71. nuitka/build/static_src/HelpersCallingGenerated.c +70 -70
  72. nuitka/build/static_src/HelpersComparisonDualEq.c +183 -0
  73. nuitka/build/static_src/HelpersComparisonDualGe.c +121 -0
  74. nuitka/build/static_src/HelpersComparisonDualGt.c +121 -0
  75. nuitka/build/static_src/HelpersComparisonDualLe.c +183 -0
  76. nuitka/build/static_src/HelpersComparisonDualLt.c +183 -0
  77. nuitka/build/static_src/HelpersComparisonDualNe.c +121 -0
  78. nuitka/build/static_src/HelpersComparisonEq.c +18 -4
  79. nuitka/build/static_src/HelpersComparisonGe.c +18 -4
  80. nuitka/build/static_src/HelpersComparisonGt.c +18 -4
  81. nuitka/build/static_src/HelpersComparisonLe.c +18 -4
  82. nuitka/build/static_src/HelpersComparisonLt.c +18 -4
  83. nuitka/build/static_src/HelpersComparisonNe.c +18 -4
  84. nuitka/build/static_src/HelpersConsole.c +34 -8
  85. nuitka/build/static_src/HelpersConstantsBlob.c +4 -2
  86. nuitka/build/static_src/HelpersDeepcopy.c +1 -0
  87. nuitka/build/static_src/HelpersDictionaries.c +195 -36
  88. nuitka/build/static_src/HelpersDictionariesGenerated.c +12 -107
  89. nuitka/build/static_src/HelpersExceptions.c +24 -50
  90. nuitka/build/static_src/HelpersFiles.c +79 -5
  91. nuitka/build/static_src/HelpersImport.c +13 -9
  92. nuitka/build/static_src/HelpersImportHard.c +23 -46
  93. nuitka/build/static_src/HelpersLists.c +98 -9
  94. nuitka/build/static_src/HelpersOperationBinaryAdd.c +224 -6
  95. nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +3 -0
  96. nuitka/build/static_src/HelpersOperationBinaryBitand.c +5 -5
  97. nuitka/build/static_src/HelpersOperationBinaryBitor.c +5 -5
  98. nuitka/build/static_src/HelpersOperationBinaryBitxor.c +5 -5
  99. nuitka/build/static_src/HelpersOperationBinaryDivmod.c +8 -2
  100. nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
  101. nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +14 -8
  102. nuitka/build/static_src/HelpersOperationBinaryLshift.c +36 -36
  103. nuitka/build/static_src/HelpersOperationBinaryMatmult.c +1 -0
  104. nuitka/build/static_src/HelpersOperationBinaryMod.c +22 -10
  105. nuitka/build/static_src/HelpersOperationBinaryMult.c +17 -7
  106. nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +14 -8
  107. nuitka/build/static_src/HelpersOperationBinaryPow.c +24 -24
  108. nuitka/build/static_src/HelpersOperationBinaryRshift.c +4 -4
  109. nuitka/build/static_src/HelpersOperationBinarySub.c +229 -8
  110. nuitka/build/static_src/HelpersOperationBinaryTruediv.c +8 -2
  111. nuitka/build/static_src/HelpersOperationInplaceAdd.c +162 -10
  112. nuitka/build/static_src/HelpersOperationInplaceBitand.c +5 -5
  113. nuitka/build/static_src/HelpersOperationInplaceBitor.c +5 -5
  114. nuitka/build/static_src/HelpersOperationInplaceBitxor.c +5 -5
  115. nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +11 -6
  116. nuitka/build/static_src/HelpersOperationInplaceLshift.c +20 -20
  117. nuitka/build/static_src/HelpersOperationInplaceMatmult.c +1 -0
  118. nuitka/build/static_src/HelpersOperationInplaceMod.c +11 -6
  119. nuitka/build/static_src/HelpersOperationInplaceMult.c +11 -6
  120. nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +11 -6
  121. nuitka/build/static_src/HelpersOperationInplacePow.c +20 -20
  122. nuitka/build/static_src/HelpersOperationInplaceRshift.c +4 -4
  123. nuitka/build/static_src/HelpersOperationInplaceSub.c +163 -10
  124. nuitka/build/static_src/HelpersOperationInplaceTruediv.c +6 -1
  125. nuitka/build/static_src/HelpersProfiling.c +1 -1
  126. nuitka/build/static_src/HelpersRaising.c +255 -310
  127. nuitka/build/static_src/HelpersStrings.c +1 -1
  128. nuitka/build/static_src/HelpersTuples.c +2 -2
  129. nuitka/build/static_src/HelpersTypes.c +98 -2
  130. nuitka/build/static_src/MainProgram.c +132 -28
  131. nuitka/build/static_src/MetaPathBasedLoader.c +18 -19
  132. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +134 -11
  133. nuitka/build/static_src/OnefileBootstrap.c +6 -1
  134. nuitka/code_generation/AsyncgenCodes.py +2 -6
  135. nuitka/code_generation/BinaryOperationHelperDefinitions.py +269 -167
  136. nuitka/code_generation/BuiltinCodes.py +9 -1
  137. nuitka/code_generation/CallCodes.py +16 -16
  138. nuitka/code_generation/CodeGeneration.py +14 -2
  139. nuitka/code_generation/CodeHelperSelection.py +1 -1
  140. nuitka/code_generation/CodeHelpers.py +4 -1
  141. nuitka/code_generation/CodeObjectCodes.py +2 -2
  142. nuitka/code_generation/ComparisonCodes.py +13 -2
  143. nuitka/code_generation/ComparisonHelperDefinitions.py +23 -8
  144. nuitka/code_generation/Contexts.py +28 -16
  145. nuitka/code_generation/CoroutineCodes.py +2 -6
  146. nuitka/code_generation/DictCodes.py +3 -3
  147. nuitka/code_generation/ErrorCodes.py +34 -50
  148. nuitka/code_generation/ExceptionCodes.py +165 -96
  149. nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +25 -10
  150. nuitka/code_generation/FrameCodes.py +4 -11
  151. nuitka/code_generation/FunctionCodes.py +2 -6
  152. nuitka/code_generation/GeneratorCodes.py +2 -6
  153. nuitka/code_generation/GlobalConstants.py +8 -2
  154. nuitka/code_generation/GlobalsLocalsCodes.py +2 -2
  155. nuitka/code_generation/IteratorCodes.py +67 -54
  156. nuitka/code_generation/LineNumberCodes.py +1 -3
  157. nuitka/code_generation/ModuleCodes.py +28 -4
  158. nuitka/code_generation/OperationCodes.py +51 -20
  159. nuitka/code_generation/PackageResourceCodes.py +37 -0
  160. nuitka/code_generation/RaisingCodes.py +164 -90
  161. nuitka/code_generation/Reports.py +13 -5
  162. nuitka/code_generation/ReturnCodes.py +2 -16
  163. nuitka/code_generation/TryCodes.py +12 -24
  164. nuitka/code_generation/TypeAliasCodes.py +48 -0
  165. nuitka/code_generation/VariableCodes.py +99 -40
  166. nuitka/code_generation/VariableDeclarations.py +8 -8
  167. nuitka/code_generation/YieldCodes.py +1 -1
  168. nuitka/code_generation/c_types/CTypeBases.py +10 -2
  169. nuitka/code_generation/c_types/CTypeModuleDictVariables.py +3 -0
  170. nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +3 -4
  171. nuitka/code_generation/c_types/CTypeNuitkaInts.py +70 -25
  172. nuitka/code_generation/c_types/CTypeNuitkaVoids.py +1 -1
  173. nuitka/code_generation/c_types/CTypePyObjectPointers.py +16 -6
  174. nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +2 -2
  175. nuitka/code_generation/templates/CodeTemplatesConstants.py +11 -3
  176. nuitka/code_generation/templates/CodeTemplatesCoroutines.py +2 -2
  177. nuitka/code_generation/templates/CodeTemplatesExceptions.py +15 -16
  178. nuitka/code_generation/templates/CodeTemplatesFrames.py +18 -10
  179. nuitka/code_generation/templates/CodeTemplatesFunction.py +2 -2
  180. nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +2 -2
  181. nuitka/code_generation/templates/CodeTemplatesIterators.py +1 -35
  182. nuitka/code_generation/templates/CodeTemplatesModules.py +34 -4
  183. nuitka/code_generation/templates/CodeTemplatesVariables.py +76 -0
  184. nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +3 -3
  185. nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +3 -3
  186. nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +4 -106
  187. nuitka/code_generation/templates_c/HelperImportHard.c.j2 +1 -2
  188. nuitka/code_generation/templates_c/HelperLongTools.c.j2 +1 -1
  189. nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
  190. nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +9 -9
  191. nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
  192. nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +1 -1
  193. nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +1 -1
  194. nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +9 -9
  195. nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +7 -7
  196. nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +9 -9
  197. nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +7 -7
  198. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +4 -4
  199. nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +1 -1
  200. nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +31 -31
  201. nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +1 -1
  202. nuitka/containers/Namedtuples.py +6 -0
  203. nuitka/containers/OrderedSets.py +105 -5
  204. nuitka/distutils/Build.py +14 -0
  205. nuitka/distutils/DistutilCommands.py +50 -10
  206. nuitka/finalizations/Finalization.py +3 -3
  207. nuitka/finalizations/FinalizeMarkups.py +10 -14
  208. nuitka/freezer/DependsExe.py +5 -2
  209. nuitka/freezer/DllDependenciesMacOS.py +18 -1
  210. nuitka/freezer/DllDependenciesWin32.py +26 -12
  211. nuitka/freezer/ImportDetection.py +6 -0
  212. nuitka/freezer/IncludedDataFiles.py +37 -6
  213. nuitka/freezer/Onefile.py +1 -0
  214. nuitka/freezer/Standalone.py +72 -18
  215. nuitka/importing/Importing.py +33 -6
  216. nuitka/importing/Recursion.py +5 -2
  217. nuitka/importing/StandardLibrary.py +57 -59
  218. nuitka/nodes/AsyncgenNodes.py +3 -6
  219. nuitka/nodes/BuiltinIteratorNodes.py +2 -2
  220. nuitka/nodes/BuiltinRefNodes.py +14 -30
  221. nuitka/nodes/ChildrenHavingMixins.py +439 -46
  222. nuitka/nodes/ConditionalNodes.py +3 -2
  223. nuitka/nodes/CoroutineNodes.py +3 -6
  224. nuitka/nodes/DictionaryNodes.py +1 -1
  225. nuitka/nodes/ExceptionNodes.py +102 -26
  226. nuitka/nodes/ExpressionBasesGenerated.py +288 -4
  227. nuitka/nodes/FrameNodes.py +22 -11
  228. nuitka/nodes/FunctionNodes.py +3 -3
  229. nuitka/nodes/GeneratorNodes.py +3 -6
  230. nuitka/nodes/HardImportNodesGenerated.py +182 -0
  231. nuitka/nodes/ImportNodes.py +2 -2
  232. nuitka/nodes/NodeBases.py +28 -1
  233. nuitka/nodes/NodeMakingHelpers.py +71 -50
  234. nuitka/nodes/OperatorNodesUnary.py +128 -3
  235. nuitka/nodes/OsSysNodes.py +37 -6
  236. nuitka/nodes/OutlineNodes.py +2 -2
  237. nuitka/nodes/StatementBasesGenerated.py +0 -2
  238. nuitka/nodes/StatementNodes.py +8 -7
  239. nuitka/nodes/SubscriptNodes.py +1 -1
  240. nuitka/nodes/TypeNodes.py +28 -1
  241. nuitka/nodes/VariableAssignNodes.py +2 -1
  242. nuitka/nodes/shapes/BuiltinTypeShapes.py +24 -7
  243. nuitka/nodes/shapes/IteratorShapes.py +71 -0
  244. nuitka/nodes/shapes/ShapeMixins.py +18 -0
  245. nuitka/nodes/shapes/StandardShapes.py +47 -44
  246. nuitka/optimizations/BytecodeDemotion.py +2 -1
  247. nuitka/plugins/PluginBase.py +64 -22
  248. nuitka/plugins/Plugins.py +16 -3
  249. nuitka/plugins/standard/AntiBloatPlugin.py +23 -12
  250. nuitka/plugins/standard/DllFilesPlugin.py +78 -2
  251. nuitka/plugins/standard/ImplicitImports.py +5 -15
  252. nuitka/plugins/standard/KivyPlugin.py +3 -12
  253. nuitka/plugins/standard/MatplotlibPlugin.py +12 -1
  254. nuitka/plugins/standard/MultiprocessingPlugin.py +11 -20
  255. nuitka/plugins/standard/OptionsNannyPlugin.py +5 -4
  256. nuitka/plugins/standard/PlaywrightPlugin.py +184 -0
  257. nuitka/plugins/standard/PySidePyQtPlugin.py +8 -0
  258. nuitka/plugins/standard/TkinterPlugin.py +23 -3
  259. nuitka/plugins/standard/TransformersPlugin.py +70 -275
  260. nuitka/plugins/standard/standard.nuitka-package.config.yml +413 -30
  261. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +35 -2
  262. nuitka/reports/CompilationReportReader.py +12 -0
  263. nuitka/reports/Reports.py +11 -0
  264. nuitka/specs/BuiltinParameterSpecs.py +5 -1
  265. nuitka/specs/HardImportSpecs.py +7 -0
  266. nuitka/specs/ParameterSpecs.py +4 -4
  267. nuitka/tools/environments/Virtualenv.py +13 -5
  268. nuitka/tools/general/dll_report/__main__.py +10 -1
  269. nuitka/tools/onefile_compressor/OnefileCompressor.py +1 -1
  270. nuitka/tools/podman/__main__.py +4 -2
  271. nuitka/tools/specialize/CTypeDescriptions.py +158 -9
  272. nuitka/tools/specialize/SpecializeC.py +218 -56
  273. nuitka/tools/testing/Common.py +69 -62
  274. nuitka/tools/testing/compare_with_cpython/__main__.py +3 -1
  275. nuitka/tools/testing/measure_construct_performance/__main__.py +1 -8
  276. nuitka/tools/testing/run_nuitka_tests/__main__.py +77 -11
  277. nuitka/tools/watch/AutoStage.py +1 -0
  278. nuitka/tree/Building.py +10 -37
  279. nuitka/tree/ComplexCallHelperFunctions.py +4 -0
  280. nuitka/tree/ReformulationAssertStatements.py +31 -14
  281. nuitka/tree/ReformulationAssignmentStatements.py +5 -1
  282. nuitka/tree/ReformulationClasses3.py +94 -19
  283. nuitka/tree/ReformulationDictionaryCreation.py +1 -0
  284. nuitka/tree/ReformulationFunctionStatements.py +1 -1
  285. nuitka/tree/ReformulationMatchStatements.py +3 -1
  286. nuitka/tree/ReformulationYieldExpressions.py +23 -5
  287. nuitka/utils/CommandLineOptions.py +27 -3
  288. nuitka/utils/Download.py +2 -2
  289. nuitka/utils/Execution.py +36 -31
  290. nuitka/utils/FileOperations.py +18 -39
  291. nuitka/utils/Hashing.py +5 -1
  292. nuitka/utils/Importing.py +2 -14
  293. nuitka/utils/InlineCopies.py +52 -0
  294. nuitka/utils/InstalledPythons.py +9 -4
  295. nuitka/utils/Json.py +2 -2
  296. nuitka/utils/PackageResources.py +44 -0
  297. nuitka/utils/SharedLibraries.py +24 -0
  298. nuitka/utils/Signing.py +9 -1
  299. nuitka/utils/Utils.py +1 -0
  300. {Nuitka_winsvc-2.4.11.data → Nuitka_winsvc-2.5.6.data}/scripts/nuitka-run.cmd +0 -0
  301. {Nuitka_winsvc-2.4.11.data → Nuitka_winsvc-2.5.6.data}/scripts/nuitka.cmd +0 -0
  302. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/LICENSE.txt +0 -0
  303. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/entry_points.txt +0 -0
  304. {Nuitka_winsvc-2.4.11.dist-info → Nuitka_winsvc-2.5.6.dist-info}/top_level.txt +0 -0
nuitka/PostProcessing.py CHANGED
@@ -16,16 +16,16 @@ from nuitka.PythonVersions import getTargetPythonDLLPath, python_version
16
16
  from nuitka.Tracing import postprocessing_logger
17
17
  from nuitka.utils.Execution import wrapCommandForDebuggerForExec
18
18
  from nuitka.utils.FileOperations import (
19
- getExternalUsePath,
20
19
  getFileContents,
21
20
  getFileSize,
22
21
  hasFilenameExtension,
23
- isFilesystemEncodable,
22
+ makeFilesystemEncodable,
24
23
  makePath,
25
24
  putTextFileContents,
26
25
  removeFileExecutablePermission,
27
26
  )
28
27
  from nuitka.utils.Images import convertImageToIconFormat
28
+ from nuitka.utils.Importing import importFromInlineCopy
29
29
  from nuitka.utils.MacOSApp import createPlistInfoFile
30
30
  from nuitka.utils.SharedLibraries import (
31
31
  callInstallNameTool,
@@ -279,7 +279,8 @@ def executePostProcessing():
279
279
  These are in part required steps, not usable after failure.
280
280
  """
281
281
 
282
- # Lots of cases to deal with, pylint: disable=too-many-branches
282
+ # Lots of cases to deal with,
283
+ # pylint: disable=too-many-branches,too-many-locals,too-many-statements
283
284
 
284
285
  result_filename = OutputDirectories.getResultFullpath(onefile=False)
285
286
 
@@ -372,8 +373,6 @@ Error, expected 'libpython dependency not found. Please report the bug."""
372
373
 
373
374
  # Might have to create a CMD file, potentially with debugger run.
374
375
  if Options.shallCreateCmdFileForExecution():
375
- dll_directory = getExternalUsePath(os.path.dirname(getTargetPythonDLLPath()))
376
-
377
376
  cmd_filename = OutputDirectories.getResultRunFilename(onefile=False)
378
377
 
379
378
  cmd_contents = """
@@ -389,52 +388,84 @@ set NUITKA_PYTHONPATH=%(python_path)s
389
388
  if Options.shallRunInDebugger()
390
389
  else ""
391
390
  ),
392
- "dll_directory": dll_directory,
393
- "python_home": sys.prefix,
394
- "python_path": ";".join(sys.path),
395
- "exe_filename": os.path.basename(
396
- result_filename
397
- if isFilesystemEncodable(result_filename)
398
- else getExternalUsePath(result_filename)
391
+ "dll_directory": makeFilesystemEncodable(
392
+ os.path.dirname(getTargetPythonDLLPath())
399
393
  ),
394
+ "python_home": makeFilesystemEncodable(sys.prefix),
395
+ "python_path": ";".join(makeFilesystemEncodable(e) for e in sys.path),
396
+ "exe_filename": os.path.basename(makeFilesystemEncodable(result_filename)),
400
397
  }
401
398
 
402
399
  putTextFileContents(cmd_filename, cmd_contents)
403
400
 
404
401
  # Create a ".pyi" file for created modules
405
402
  if Options.shallMakeModule() and Options.shallCreatePyiFile():
406
- pyi_filename = OutputDirectories.getResultBasePath() + ".pyi"
407
-
408
- putTextFileContents(
409
- filename=pyi_filename,
410
- contents="""\
411
- # This file was generated by Nuitka and describes the types of the
412
- # created shared library.
403
+ if Options.shallCreatePyiFileContainStubs():
404
+ if python_version >= 0x300:
405
+ stubgen = importFromInlineCopy("stubgen", must_exist=False)
406
+ stubgen_reason = "Stubs included by default"
407
+ else:
408
+ stubgen = None
409
+ stubgen_reason = "Python2 is not supported for stubs"
410
+ else:
411
+ stubgen = None
412
+ stubgen_reason = "Stubs were disabled"
413
413
 
414
- # At this time it lists only the imports made and can be used by the
415
- # tools that bundle libraries, including Nuitka itself. For instance
416
- # standalone mode usage of the created library will need it.
414
+ imported_module_names = getImportedModuleNames()
417
415
 
418
- # In the future, this will also contain type information for values
419
- # in the module, so IDEs will use this. Therefore please include it
420
- # when you make software releases of the extension module that it
421
- # describes.
416
+ contents = """\
417
+ # This file was generated by Nuitka
418
+ """
422
419
 
423
- %(imports)s
420
+ if stubgen is not None:
421
+ try:
422
+ stubs = stubgen.generate_stub_from_source(
423
+ source_code=OutputDirectories.getMainModule().getSourceCode(),
424
+ output_file_path=None,
425
+ text_only=True,
426
+ )
427
+ except Exception as e: # pylint: disable=broad-exception-caught
428
+ postprocessing_logger.warning(
429
+ "Stub generation with stubgen failed due to: '%s'. Please report the module code in an issue report."
430
+ % (str(e))
431
+ )
424
432
 
425
- # This is not Python source even if it looks so. Make it clear for
426
- # now. This was decided by PEP 484 designers.
427
- __name__ = ...
433
+ if Options.is_debug:
434
+ raise
428
435
 
429
- """
430
- % {
431
- "imports": "\n".join(
432
- "import %s" % module_name
433
- for module_name in getImportedModuleNames()
436
+ stubs = None
437
+ stubgen_reason = (
438
+ "Stub generation failed due to error, please report the issue."
434
439
  )
435
- },
436
- encoding="utf-8",
437
- )
440
+ else:
441
+ stubs = None
442
+
443
+ stubs = "# %s\n%s" % (stubgen_reason, "" if stubs is None else stubs)
444
+
445
+ contents += "\n" + stubs + "\n"
446
+
447
+ contents += "__name__ = ..."
448
+
449
+ imported_module_names = getImportedModuleNames()
450
+
451
+ # Meaningless, TODO: Potentially others could be listed here too.
452
+ if "__future__" in imported_module_names:
453
+ imported_module_names.remove("__future__")
454
+
455
+ contents += "\n" * 4
456
+
457
+ if imported_module_names:
458
+ contents += "# Modules used internally, to allow implicit dependencies to be seen:\n"
459
+ contents += "\n".join(
460
+ "import %s" % module_name for module_name in getImportedModuleNames()
461
+ )
462
+ else:
463
+ contents += (
464
+ "# No other modules used internally, no implicit dependencies.\n"
465
+ )
466
+
467
+ pyi_filename = OutputDirectories.getResultBasePath() + ".pyi"
468
+ putTextFileContents(pyi_filename, contents, encoding="utf-8")
438
469
 
439
470
  if isWin32Windows() and getFileSize(result_filename) > 2**30 * 1.8:
440
471
  postprocessing_logger.warning(
nuitka/Progress.py CHANGED
@@ -11,6 +11,7 @@ to the user while it's being displayed.
11
11
  from contextlib import contextmanager
12
12
 
13
13
  from nuitka import Tracing
14
+ from nuitka.PythonVersions import isPythonWithGil
14
15
  from nuitka.Tracing import general
15
16
  from nuitka.utils.Importing import importFromInlineCopy
16
17
  from nuitka.utils.ThreadedExecutor import RLock
@@ -23,6 +24,17 @@ use_progress_bar = False
23
24
  tqdm = None
24
25
  colorama = None
25
26
 
27
+ _uses_threading = False
28
+
29
+
30
+ def enableThreading():
31
+ """Inform about threading being used."""
32
+
33
+ # Singleton, pylint: disable=global-statement
34
+ global _uses_threading
35
+
36
+ _uses_threading = True
37
+
26
38
 
27
39
  class NuitkaProgressBar(object):
28
40
  def __init__(self, iterable, stage, total, min_total, unit):
@@ -84,7 +96,9 @@ class NuitkaProgressBar(object):
84
96
  @contextmanager
85
97
  def withExternalWritingPause(self):
86
98
  # spell-checker: ignore nolock
87
- with self.tqdm.external_write_mode(nolock=True):
99
+ with self.tqdm.external_write_mode(
100
+ nolock=not _uses_threading or isPythonWithGil()
101
+ ):
88
102
  yield
89
103
 
90
104
 
@@ -207,6 +221,7 @@ def withNuitkaDownloadProgressBar(*args, **kwargs):
207
221
  # spell-checker: ignore bsize, tsize
208
222
  def onProgress(self, b=1, bsize=1, tsize=None):
209
223
  if tsize is not None:
224
+ # False alarm when tqdm is not installed, pylint: disable=I0021,attribute-defined-outside-init
210
225
  self.total = tsize
211
226
  self.update(b * bsize - self.n)
212
227
 
nuitka/PythonVersions.py CHANGED
@@ -32,12 +32,13 @@ def getSupportedPythonVersions():
32
32
  "3.10",
33
33
  "3.11",
34
34
  "3.12",
35
+ "3.13",
35
36
  )
36
37
 
37
38
 
38
39
  def getNotYetSupportedPythonVersions():
39
40
  """Versions known to not work at all (yet)."""
40
- return ("3.13",)
41
+ return ("3.14",)
41
42
 
42
43
 
43
44
  def getPartiallySupportedPythonVersions():
nuitka/Serialization.py CHANGED
@@ -269,8 +269,10 @@ class ConstantAccessor(GlobalConstantAccessor):
269
269
 
270
270
  if constant_type is tuple and not constant:
271
271
  return "const_tuple_empty"
272
-
273
- return GlobalConstantAccessor._getConstantCode(self, constant)
272
+ elif constant_type is int and constant in (-1, 0, 1):
273
+ return "const_" + namifyConstant(constant)
274
+ else:
275
+ return GlobalConstantAccessor._getConstantCode(self, constant)
274
276
 
275
277
 
276
278
  # Part of "Nuitka", an optimizing Python compiler that is compatible and
nuitka/Tracing.py CHANGED
@@ -20,7 +20,10 @@ import sys
20
20
  import textwrap
21
21
  import traceback
22
22
 
23
- from nuitka.__past__ import BrokenPipeError # pylint: disable=redefined-builtin
23
+ from nuitka.__past__ import ( # pylint: disable=redefined-builtin
24
+ BrokenPipeError,
25
+ raw_input,
26
+ )
24
27
  from nuitka.utils.Utils import isWin32Windows
25
28
 
26
29
  # Written by Options module.
@@ -101,6 +104,39 @@ def _enableAnsi():
101
104
  _enabled_ansi = True
102
105
 
103
106
 
107
+ def hasTerminalLinkSupport():
108
+ if not sys.stdout.isatty():
109
+ return False
110
+
111
+ terminal_name = os.getenv("TERM_PROGRAM")
112
+
113
+ if terminal_name is not None:
114
+ if terminal_name == "vscode":
115
+ return True
116
+
117
+ # Windows terminal, in some cases, but not on Windows 11 unfortunately there
118
+ # is no difference between CMD with its own terminal and CMD in Windows
119
+ # Terminal, not even parent processes.
120
+ if isWin32Windows():
121
+ if "WT_SESSION" in os.environ or "WT_PROFILE_ID" in os.environ:
122
+ return True
123
+
124
+ # Powershell, should be used in new terminals only. Also hard to detect,
125
+ # although here we could search parent process names to determine it.
126
+ if isWin32Windows():
127
+ if "PSModulePath" in os.environ:
128
+ return True
129
+
130
+ return False
131
+
132
+
133
+ def formatTerminalLink(text, link):
134
+ if link is not None and hasTerminalLinkSupport():
135
+ return "\033]8;;%s\033\\%s\033]8;;\033\\" % (link, text)
136
+ else:
137
+ return text
138
+
139
+
104
140
  def _getDisableStyleCode():
105
141
  return "\033[0m"
106
142
 
@@ -389,6 +425,10 @@ class FileLogger(OurLogger):
389
425
 
390
426
  self.file_handle = file_handle
391
427
 
428
+ def __del__(self):
429
+ if self.file_handle is not None:
430
+ self.file_handle.close()
431
+
392
432
  def my_print(self, message, **kwargs):
393
433
  if "file" not in kwargs:
394
434
  kwargs["file"] = self.file_handle or sys.stdout
@@ -452,6 +492,34 @@ wheel_logger = OurLogger("Nuitka-Wheel", base_style="blue")
452
492
  cache_logger = OurLogger("Nuitka-Cache")
453
493
  reports_logger = OurLogger("Nuitka-Reports")
454
494
 
495
+
496
+ def queryUser(question, choices, default, default_non_interactive):
497
+ assert default in choices, (default, choices)
498
+ assert default_non_interactive in choices, (default, choices)
499
+
500
+ prompt = "%s? %s : " % (
501
+ question,
502
+ "/".join(
503
+ "[%s]" % choice.title() if choice == default else choice.title()
504
+ for choice in choices
505
+ ),
506
+ )
507
+
508
+ # Integrates with progress bar by closing it.
509
+ printLine(prompt, end="")
510
+ flushStandardOutputs()
511
+
512
+ try:
513
+ reply = raw_input() or default
514
+ except EOFError:
515
+ reply = default_non_interactive
516
+
517
+ if reply == "y":
518
+ reply = "yes"
519
+
520
+ return reply.lower()
521
+
522
+
455
523
  # Part of "Nuitka", an optimizing Python compiler that is compatible and
456
524
  # integrates with CPython, but also works on its own.
457
525
  #
nuitka/Version.py CHANGED
@@ -1,4 +1,4 @@
1
- # Copyright 2023, Kay Hayen, mailto:kay.hayen@gmail.com
1
+ # Copyright 2024, Kay Hayen, mailto:kay.hayen@gmail.com
2
2
  #
3
3
  # Part of "Nuitka", an optimizing Python compiler that is compatible and
4
4
  # integrates with CPython, but also works on its own.
@@ -20,7 +20,7 @@
20
20
  """
21
21
 
22
22
  version_string = """\
23
- Nuitka V2.4.11
23
+ Nuitka V2.5.6
24
24
  Copyright (C) 2024 Kay Hayen."""
25
25
 
26
26
 
@@ -43,6 +43,7 @@ from nuitka.utils.FileOperations import (
43
43
  deleteFile,
44
44
  getExternalUsePath,
45
45
  getFilenameExtension,
46
+ getNormalizedPath,
46
47
  isFilesystemEncodable,
47
48
  )
48
49
  from nuitka.utils.Json import loadJsonFromFilename
@@ -92,7 +93,7 @@ from .SconsUtils import (
92
93
  writeSconsReport,
93
94
  )
94
95
 
95
- # spell-checker: ignore ccversion,ccflags,werror,cppdefines,cpppath,linkflags,libpath
96
+ # spell-checker: ignore ccversion,cflags,ccflags,werror,cppdefines,cpppath,linkflags,libpath
96
97
 
97
98
  # Set the arguments.
98
99
  setArguments(ARGUMENTS)
@@ -135,8 +136,14 @@ profile_mode = getArgumentBool("profile_mode", False)
135
136
  python_version_str = getArgumentRequired("python_version")
136
137
  python_version = tuple(int(d) for d in python_version_str.split("."))
137
138
 
139
+ gil_mode = getArgumentBool("gil_mode")
140
+
138
141
  # The ABI flags to target.
139
142
  abiflags = getArgumentDefaulted("abiflags", "")
143
+
144
+ if not gil_mode and "t" not in abiflags:
145
+ abiflags = "t" + abiflags
146
+
140
147
  python_abi_version = python_version_str + abiflags
141
148
 
142
149
  # Python debug mode: reference count checking, assertions in CPython core.
@@ -254,6 +261,10 @@ python_sysflag_unicode = getArgumentBool("python_sysflag_unicode", False)
254
261
  python_sysflag_utf8 = getArgumentBool("python_sysflag_utf8", False)
255
262
  # python_sysflag_optimize
256
263
  python_sysflag_optimize = getArgumentInt("python_sysflag_optimize", 0)
264
+ # python_sysflag_dontwritebytecode
265
+ python_sysflag_dontwritebytecode = getArgumentBool(
266
+ "python_sysflag_dontwritebytecode", False
267
+ )
257
268
  # python_flag_no_asserts
258
269
  python_flag_no_asserts = getArgumentBool("python_flag_no_asserts", False)
259
270
  # python_flag_no_docstrings
@@ -356,6 +367,7 @@ env.the_compiler = env["CC"]
356
367
  env.the_cc_name = os.path.normcase(os.path.basename(env.the_compiler))
357
368
  env.standalone_mode = standalone_mode
358
369
  env.debug_mode = debug_mode
370
+ env.debugger_mode = debugger_mode
359
371
  env.unstripped_mode = unstripped_mode
360
372
  env.console_mode = console_mode
361
373
  env.source_dir = source_dir
@@ -379,6 +391,18 @@ env.msvc_mode = os.name == "nt" and not env.gcc_mode
379
391
  env.mingw_mode = os.name == "nt" and env.gcc_mode
380
392
  env.clangcl_mode = clangcl_mode
381
393
 
394
+ # For Python3.13, we need to enforce it for now to use MSVC
395
+ if os.name == "nt" and not env.msvc_mode and python_version >= (3, 13):
396
+ scons_logger.sysexit(
397
+ """\
398
+ Sorry, non-MSVC is not currently supported with Python 3.13,
399
+ due to differences in layout internal structures of Python.
400
+
401
+ Newer Nuitka will work to solve this. Use Python 3.12 or
402
+ option "--msvc=latest" as a workaround for now and wait
403
+ for updates of Nuitka to add MinGW64 support back."""
404
+ )
405
+
382
406
  # gcc compiler cf_protection option
383
407
  env.cf_protection = cf_protection
384
408
 
@@ -466,7 +490,7 @@ if env.debug_mode:
466
490
  # Allow gcc/clang to point out all kinds of inconsistency to us by
467
491
  # raising an error.
468
492
 
469
- if "allow-c-warnings" not in env.experimental_flags and not debugger_mode:
493
+ if "allow-c-warnings" not in env.experimental_flags and not env.debugger_mode:
470
494
  env.Append(
471
495
  CCFLAGS=[
472
496
  "-Wall",
@@ -639,6 +663,9 @@ if env.nuitka_python:
639
663
  if env.static_libpython:
640
664
  env.Append(CPPDEFINES=["_NUITKA_STATIC_LIBPYTHON"])
641
665
 
666
+ if not gil_mode:
667
+ env.Append(CPPDEFINES="Py_GIL_DISABLED")
668
+
642
669
  # TODO: This ought to be decided outside of scons and per flavor maybe.
643
670
  if env.static_libpython and (
644
671
  (not os.name == "nt" and not isMacOS()) or env.nuitka_python
@@ -703,7 +730,11 @@ if os.name == "nt":
703
730
  addWinLib()
704
731
  elif not module_mode:
705
732
  # Add the python library path to the library path
706
- python_lib_path = os.path.join(python_prefix_external, "lib")
733
+ if env.self_compiled_python_uninstalled:
734
+ python_lib_path = python_prefix_external
735
+ else:
736
+ python_lib_path = os.path.join(python_prefix_external, "lib")
737
+
707
738
  env.Append(LIBPATH=[python_lib_path])
708
739
 
709
740
  # Any module libs that are for self-compiled Python to be static.
@@ -736,7 +767,7 @@ elif not module_mode:
736
767
  env.Append(LIBS=[env.File(env.static_libpython)])
737
768
 
738
769
  # The linker won't succeed in searching for those for system Python of Debian
739
- # compiled Pythons. Help that. For self-compiled,
770
+ # compiled Pythons. Help that. spell-checker: ignore rdynamic,Xlinker,pthread
740
771
  if python_prefix_external == "/usr" and isDebianBasedLinux():
741
772
  env.Append(LIBS=["z", "m", "util", "pthread"])
742
773
 
@@ -778,6 +809,7 @@ if isMacOS():
778
809
  env.Append(LINKFLAGS=["-undefined", "dynamic_lookup"])
779
810
  else:
780
811
  # For macOS we need to make sure install_name_tool can do its work
812
+ # spell-checker: ignore headerpad
781
813
  env.Append(LINKFLAGS=["-headerpad_max_install_names"])
782
814
 
783
815
  # The static include files reside in Nuitka installation, which may be where
@@ -801,7 +833,7 @@ env.Append(
801
833
  ]
802
834
  )
803
835
 
804
- if env.debian_python and python_version >= (3, 12):
836
+ if env.static_libpython and python_version >= (3, 12):
805
837
  env.Append(
806
838
  CPPPATH=[
807
839
  os.path.join(env.nuitka_src, "inline_copy", "python_hacl", "hacl_312"),
@@ -825,6 +857,7 @@ if env.gcc_mode and not isMacOS() and not os.name == "nt" and not module_mode:
825
857
  # The rpath is no longer used unless we do this on modern Linux. The
826
858
  # option name is not very revealing, but basically without this, the
827
859
  # rpath in the binary will be ignored by the loader.
860
+ # spell-checker: ignore dtags
828
861
  if "linux" in sys.platform:
829
862
  env.Append(LINKFLAGS=["-Wl,--disable-new-dtags"])
830
863
 
@@ -913,6 +946,9 @@ if os.name == "nt" and not isFilesystemEncodable(result_exe):
913
946
  "_nuitka_temp.pyd" if module_mode else "_nuitka_temp.exe",
914
947
  )
915
948
 
949
+ if not isFilesystemEncodable(result_exe):
950
+ result_exe = getNormalizedPath(os.path.relpath(result_exe))
951
+
916
952
  deleteFile(result_exe, must_exist=False)
917
953
 
918
954
  if module_mode:
@@ -976,6 +1012,10 @@ def createBuildDefinitionsFile():
976
1012
 
977
1013
  build_definitions["SYSFLAG_OPTIMIZE"] = python_sysflag_optimize
978
1014
 
1015
+ build_definitions["SYSFLAG_DONTWRITEBYTECODE"] = (
1016
+ 1 if python_sysflag_dontwritebytecode else 0
1017
+ )
1018
+
979
1019
  build_definitions["_NUITKA_NO_ASSERTS"] = 1 if python_flag_no_asserts else 0
980
1020
 
981
1021
  build_definitions["_NUITKA_NO_DOCSTRINGS"] = 1 if python_flag_no_docstrings else 0
@@ -80,6 +80,10 @@ module_mode = getArgumentBool("module_mode", False)
80
80
  # Debug mode: Less optimizations, debug information in the resulting binary.
81
81
  debug_mode = getArgumentBool("debug_mode", False)
82
82
 
83
+ # Debugger mode: Debug information in the resulting binary and intention to run
84
+ # in debugger.
85
+ debugger_mode = getArgumentBool("debugger_mode", False)
86
+
83
87
  # Experimental indications. Do things that are not yet safe to do.
84
88
  experimental = getArgumentList("experimental", "")
85
89
 
@@ -181,6 +185,7 @@ scons_details_logger.info(
181
185
 
182
186
  if "CC" in os.environ:
183
187
  # If the environment variable CC is set, use that.
188
+ env["CC"] = os.environ["CC"]
184
189
  env["CCVERSION"] = None
185
190
 
186
191
  scons_details_logger.info("Overridden with environment CC: %r" % env["CC"])
@@ -207,6 +212,7 @@ env = checkWindowsCompilerFound(
207
212
  env.the_compiler = env["CC"] or env["CXX"]
208
213
  env.the_cc_name = os.path.normcase(os.path.basename(env.the_compiler))
209
214
  env.debug_mode = debug_mode
215
+ env.debugger_mode = debugger_mode
210
216
  env.unstripped_mode = unstripped_mode
211
217
  env.console_mode = console_mode
212
218
  env.nuitka_src = nuitka_src
@@ -110,6 +110,10 @@ module_mode = getArgumentBool("module_mode", False)
110
110
  # Debug mode: Less optimizations, debug information in the resulting binary.
111
111
  debug_mode = getArgumentBool("debug_mode", False)
112
112
 
113
+ # Debugger mode: Debug information in the resulting binary and intention to run
114
+ # in debugger.
115
+ debugger_mode = getArgumentBool("debugger_mode", False)
116
+
113
117
  # Deployment mode
114
118
  deployment_mode = getArgumentBool("deployment", False)
115
119
 
@@ -241,6 +245,7 @@ scons_details_logger.info(
241
245
 
242
246
  if "CC" in os.environ:
243
247
  # If the environment variable CC is set, use that.
248
+ env["CC"] = os.environ["CC"]
244
249
  env["CCVERSION"] = None
245
250
 
246
251
  scons_details_logger.info("Overridden with environment CC: %r" % env["CC"])
@@ -268,6 +273,7 @@ env.the_compiler = env["CC"] or env["CXX"]
268
273
  env.the_cc_name = os.path.normcase(os.path.basename(env.the_compiler))
269
274
  env.standalone_mode = True # We are only used in this case.
270
275
  env.debug_mode = debug_mode
276
+ env.debugger_mode = debugger_mode
271
277
  env.unstripped_mode = unstripped_mode
272
278
  env.console_mode = console_mode
273
279
  env.source_dir = source_dir
@@ -144,6 +144,7 @@ def enableCcache(
144
144
 
145
145
  if inject_ccache:
146
146
  # The ccache needs absolute path, otherwise it will not work.
147
+ # spell-checker: ignore getpid
147
148
  ccache_logfile = getExternalUsePath(
148
149
  os.path.abspath(os.path.join(source_dir, "ccache-%d.txt" % os.getpid())),
149
150
  only_dirname=True,
@@ -268,6 +269,8 @@ def _writeClcacheStatistics():
268
269
 
269
270
 
270
271
  def _getCcacheStatistics(ccache_logfile):
272
+ # parsing ccache is a bit complicated as we need to work around bugs
273
+ # and version differences
271
274
  data = {}
272
275
 
273
276
  if os.path.exists(ccache_logfile):
@@ -371,6 +374,7 @@ to install it."""
371
374
  "preprocessed_cache_miss",
372
375
  "primary_storage_miss",
373
376
  "called_for_link",
377
+ "no_input_file",
374
378
  "local_storage_read_hit",
375
379
  "local_storage_read_miss",
376
380
  "local_storage_write",
@@ -170,8 +170,12 @@ def _enableLtoSettings(
170
170
  lto_mode = False
171
171
  reason = "known to be not supported (CondaCC)"
172
172
  elif isMacOS() and env.gcc_mode and env.clang_mode:
173
- lto_mode = True
174
- reason = "known to be supported (macOS clang)"
173
+ if env.debugger_mode:
174
+ lto_mode = False
175
+ reason = "must be disabled to see line numbers (macOS clang)"
176
+ else:
177
+ lto_mode = True
178
+ reason = "known to be supported (macOS clang)"
175
179
  elif env.mingw_mode and env.clang_mode:
176
180
  lto_mode = False
177
181
  reason = "known to not be supported (new MinGW64 Clang)"
@@ -783,7 +787,7 @@ def setupCCompiler(env, lto_mode, pgo_mode, job_count, onefile_compile):
783
787
 
784
788
  # Even if console is forced, for Win32 it means to specify Windows
785
789
  # subsystem, we can still attach or create.
786
- if env.console_mode != "force":
790
+ if env.console_mode in ("attach", "disable"):
787
791
  if env.mingw_mode:
788
792
  env.Append(LINKFLAGS=["-Wl,--subsystem,windows"])
789
793
  env.Append(CPPDEFINES=["_NUITKA_WINMAIN_ENTRY_POINT"])
@@ -794,6 +798,10 @@ def setupCCompiler(env, lto_mode, pgo_mode, job_count, onefile_compile):
794
798
  if env.console_mode == "attach" and os.name == "nt":
795
799
  env.Append(CPPDEFINES=["_NUITKA_ATTACH_CONSOLE_WINDOW"])
796
800
 
801
+ if env.console_mode == "hide" and os.name == "nt":
802
+ env.Append(CPPDEFINES=["_NUITKA_HIDE_CONSOLE_WINDOW"])
803
+ env.Append(LIBS=["User32"])
804
+
797
805
  # Avoid dependency on MinGW libraries, spell-checker: ignore libgcc
798
806
  if env.mingw_mode and not env.clang_mode:
799
807
  env.Append(LINKFLAGS=["-static-libgcc"])
@@ -986,6 +994,9 @@ def reportCCompiler(env, context, output_func):
986
994
  if env.the_cc_name == "cl":
987
995
  cc_output = "%s %s" % (env.the_cc_name, getMsvcVersionString(env))
988
996
  elif isGccName(env.the_cc_name):
997
+ if env.gcc_version is None:
998
+ env.gcc_version = myDetectVersion(env, env.the_compiler)
999
+
989
1000
  cc_output = "%s %s" % (
990
1001
  env.the_cc_name,
991
1002
  ".".join(str(d) for d in env.gcc_version),
@@ -125,6 +125,7 @@ def _getPythonForSconsExePath():
125
125
  "3.10",
126
126
  "3.11",
127
127
  "3.12",
128
+ "3.13",
128
129
  )
129
130
  if not isWin32Windows():
130
131
  scons_supported_pythons += ("2.7", "2.6")
@@ -471,6 +472,8 @@ def setCommonSconsOptions(options):
471
472
 
472
473
  options["debug_modes"] = ",".join(Options.getDebugModeIndications())
473
474
 
475
+ options["deployment"] = asBoolStr(Options.isDeploymentMode())
476
+
474
477
  options["no_deployment"] = ",".join(Options.getNoDeploymentIndications())
475
478
 
476
479
  if Options.shallRunInDebugger():
@@ -15,6 +15,7 @@ import sys
15
15
 
16
16
  from nuitka.__past__ import basestring, unicode
17
17
  from nuitka.containers.OrderedDicts import OrderedDict
18
+ from nuitka.Progress import enableThreading
18
19
  from nuitka.Tracing import scons_details_logger, scons_logger
19
20
  from nuitka.utils.Execution import executeProcess
20
21
  from nuitka.utils.FileOperations import (
@@ -44,6 +45,10 @@ def initScons():
44
45
 
45
46
  SCons.dblite.dblite.sync = no_sync
46
47
 
48
+ # We use threads during build, so keep locks if necessary for progress bar
49
+ # updates.
50
+ enableThreading()
51
+
47
52
 
48
53
  def setupScons(env, source_dir):
49
54
  env["BUILD_DIR"] = source_dir