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

Files changed (210) hide show
  1. Nuitka_winsvc-2.3.11.data/scripts/nuitka-run.bat → Nuitka_winsvc-2.4.1.data/scripts/nuitka-run.cmd +1 -1
  2. {Nuitka_winsvc-2.3.11.dist-info → Nuitka_winsvc-2.4.1.dist-info}/METADATA +1 -1
  3. {Nuitka_winsvc-2.3.11.dist-info → Nuitka_winsvc-2.4.1.dist-info}/RECORD +210 -207
  4. {Nuitka_winsvc-2.3.11.dist-info → Nuitka_winsvc-2.4.1.dist-info}/WHEEL +1 -1
  5. nuitka/CacheCleanup.py +6 -1
  6. nuitka/HardImportRegistry.py +29 -2
  7. nuitka/MainControl.py +62 -35
  8. nuitka/ModuleRegistry.py +11 -3
  9. nuitka/OptionParsing.py +78 -39
  10. nuitka/Options.py +142 -35
  11. nuitka/OutputDirectories.py +5 -0
  12. nuitka/PostProcessing.py +23 -14
  13. nuitka/PythonFlavors.py +22 -4
  14. nuitka/PythonVersions.py +18 -0
  15. nuitka/TreeXML.py +6 -3
  16. nuitka/Version.py +1 -1
  17. nuitka/__main__.py +55 -10
  18. nuitka/build/Backend.scons +6 -1
  19. nuitka/build/CCompilerVersion.scons +1 -0
  20. nuitka/build/Onefile.scons +4 -0
  21. nuitka/build/SconsCaching.py +1 -0
  22. nuitka/build/SconsCompilerSettings.py +1 -0
  23. nuitka/build/SconsHacks.py +5 -1
  24. nuitka/build/SconsInterface.py +2 -0
  25. nuitka/build/SconsUtils.py +4 -1
  26. nuitka/build/include/nuitka/allocator.h +27 -5
  27. nuitka/build/include/nuitka/calling.h +1 -1
  28. nuitka/build/include/nuitka/compiled_frame.h +23 -23
  29. nuitka/build/include/nuitka/compiled_method.h +1 -1
  30. nuitka/build/include/nuitka/exception_groups.h +0 -2
  31. nuitka/build/include/nuitka/helper/attributes.h +7 -1
  32. nuitka/build/include/nuitka/helper/subscripts.h +1 -1
  33. nuitka/build/include/nuitka/helpers.h +7 -4
  34. nuitka/build/include/nuitka/prelude.h +6 -10
  35. nuitka/build/include/nuitka/printing.h +2 -0
  36. nuitka/build/include/nuitka/unfreezing.h +5 -5
  37. nuitka/build/inline_copy/tqdm/tqdm/_monitor.py +4 -1
  38. nuitka/build/static_src/CompiledAsyncgenType.c +2 -4
  39. nuitka/build/static_src/CompiledCellType.c +7 -7
  40. nuitka/build/static_src/CompiledCodeHelpers.c +49 -36
  41. nuitka/build/static_src/CompiledCoroutineType.c +2 -4
  42. nuitka/build/static_src/CompiledFrameType.c +109 -82
  43. nuitka/build/static_src/CompiledFunctionType.c +36 -9
  44. nuitka/build/static_src/CompiledGeneratorType.c +12 -10
  45. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +2 -2
  46. nuitka/build/static_src/CompiledMethodType.c +14 -13
  47. nuitka/build/static_src/HelpersAttributes.c +13 -15
  48. nuitka/build/static_src/HelpersBuiltin.c +16 -7
  49. nuitka/build/static_src/HelpersCalling.c +13 -13
  50. nuitka/build/static_src/HelpersCallingGenerated.c +22 -22
  51. nuitka/build/static_src/HelpersComparisonEq.c +110 -110
  52. nuitka/build/static_src/HelpersComparisonEqUtils.c +1 -1
  53. nuitka/build/static_src/HelpersComparisonGe.c +110 -110
  54. nuitka/build/static_src/HelpersComparisonGt.c +110 -110
  55. nuitka/build/static_src/HelpersComparisonLe.c +110 -110
  56. nuitka/build/static_src/HelpersComparisonLt.c +110 -110
  57. nuitka/build/static_src/HelpersComparisonNe.c +110 -110
  58. nuitka/build/static_src/HelpersConstantsBlob.c +480 -481
  59. nuitka/build/static_src/HelpersDictionaries.c +9 -0
  60. nuitka/build/static_src/HelpersFiles.c +2 -2
  61. nuitka/build/static_src/HelpersFilesystemPaths.c +28 -13
  62. nuitka/build/static_src/HelpersImport.c +1 -1
  63. nuitka/build/static_src/HelpersLists.c +5 -1
  64. nuitka/build/static_src/HelpersMatching.c +95 -35
  65. nuitka/build/static_src/HelpersOperationInplaceAdd.c +23 -23
  66. nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +1 -0
  67. nuitka/build/static_src/HelpersOperationInplaceBitand.c +11 -11
  68. nuitka/build/static_src/HelpersOperationInplaceBitor.c +11 -11
  69. nuitka/build/static_src/HelpersOperationInplaceBitxor.c +11 -11
  70. nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +17 -17
  71. nuitka/build/static_src/HelpersOperationInplaceLshift.c +9 -9
  72. nuitka/build/static_src/HelpersOperationInplaceMatmult.c +10 -10
  73. nuitka/build/static_src/HelpersOperationInplaceMod.c +47 -47
  74. nuitka/build/static_src/HelpersOperationInplaceMult.c +28 -28
  75. nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +17 -17
  76. nuitka/build/static_src/HelpersOperationInplacePow.c +17 -17
  77. nuitka/build/static_src/HelpersOperationInplaceRshift.c +9 -9
  78. nuitka/build/static_src/HelpersOperationInplaceSub.c +17 -17
  79. nuitka/build/static_src/HelpersOperationInplaceTruediv.c +17 -17
  80. nuitka/build/static_src/HelpersSequences.c +1 -1
  81. nuitka/build/static_src/HelpersTypes.c +8 -4
  82. nuitka/build/static_src/MainProgram.c +28 -9
  83. nuitka/build/static_src/MetaPathBasedLoader.c +124 -108
  84. nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +13 -4
  85. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +1 -1
  86. nuitka/build/static_src/OnefileBootstrap.c +34 -6
  87. nuitka/code_generation/AttributeCodes.py +12 -10
  88. nuitka/code_generation/CodeGeneration.py +6 -7
  89. nuitka/code_generation/ConstantCodes.py +53 -10
  90. nuitka/code_generation/GlobalConstants.py +6 -6
  91. nuitka/code_generation/Indentation.py +3 -4
  92. nuitka/code_generation/LoaderCodes.py +3 -0
  93. nuitka/code_generation/LocalsDictCodes.py +36 -14
  94. nuitka/code_generation/MatchCodes.py +23 -4
  95. nuitka/code_generation/ModuleCodes.py +0 -7
  96. nuitka/code_generation/Namify.py +2 -0
  97. nuitka/code_generation/PackageResourceCodes.py +5 -1
  98. nuitka/code_generation/templates/CodeTemplatesConstants.py +6 -4
  99. nuitka/code_generation/templates/CodeTemplatesLoader.py +1 -1
  100. nuitka/code_generation/templates/CodeTemplatesModules.py +3 -3
  101. nuitka/code_generation/templates/CodeTemplatesVariables.py +16 -2
  102. nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +2 -2
  103. nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +1 -1
  104. nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +1 -1
  105. nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +7 -7
  106. nuitka/freezer/DependsExe.py +3 -1
  107. nuitka/freezer/DllDependenciesMacOS.py +5 -12
  108. nuitka/freezer/IncludedDataFiles.py +12 -3
  109. nuitka/freezer/IncludedEntryPoints.py +8 -2
  110. nuitka/freezer/Onefile.py +6 -1
  111. nuitka/freezer/Standalone.py +9 -2
  112. nuitka/importing/Importing.py +14 -5
  113. nuitka/importing/Recursion.py +3 -0
  114. nuitka/nodes/AttributeNodesGenerated.py +21 -12
  115. nuitka/nodes/BuiltinOpenNodes.py +5 -0
  116. nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +11 -11
  117. nuitka/nodes/BuiltinRefNodes.py +41 -1
  118. nuitka/nodes/ChildrenHavingMixins.py +143 -355
  119. nuitka/nodes/ClassNodes.py +30 -12
  120. nuitka/nodes/CodeObjectSpecs.py +9 -0
  121. nuitka/nodes/ExpressionBasesGenerated.py +11 -11
  122. nuitka/nodes/FunctionNodes.py +7 -11
  123. nuitka/nodes/FutureSpecs.py +16 -3
  124. nuitka/nodes/GeneratorNodes.py +2 -2
  125. nuitka/nodes/HardImportNodesGenerated.py +11 -134
  126. nuitka/nodes/LocalsScopes.py +19 -23
  127. nuitka/nodes/MatchNodes.py +18 -7
  128. nuitka/nodes/ModuleAttributeNodes.py +1 -20
  129. nuitka/nodes/ModuleNodes.py +23 -6
  130. nuitka/nodes/NodeBases.py +3 -2
  131. nuitka/nodes/NodeMetaClasses.py +26 -10
  132. nuitka/nodes/ReturnNodes.py +1 -1
  133. nuitka/nodes/StatementBasesGenerated.py +11 -11
  134. nuitka/nodes/SubscriptNodes.py +4 -4
  135. nuitka/nodes/VariableAssignNodes.py +1 -1
  136. nuitka/nodes/VariableRefNodes.py +28 -2
  137. nuitka/optimizations/FunctionInlining.py +3 -6
  138. nuitka/optimizations/Optimization.py +13 -12
  139. nuitka/optimizations/TraceCollections.py +19 -4
  140. nuitka/plugins/PluginBase.py +121 -133
  141. nuitka/plugins/Plugins.py +91 -3
  142. nuitka/plugins/YamlPluginBase.py +121 -0
  143. nuitka/plugins/standard/AntiBloatPlugin.py +87 -28
  144. nuitka/plugins/standard/DataFilesPlugin.py +15 -6
  145. nuitka/plugins/standard/DelvewheelPlugin.py +7 -3
  146. nuitka/plugins/standard/DllFilesPlugin.py +5 -3
  147. nuitka/plugins/standard/ImplicitImports.py +34 -20
  148. nuitka/plugins/standard/MatplotlibPlugin.py +3 -1
  149. nuitka/plugins/standard/MultiprocessingPlugin.py +2 -2
  150. nuitka/plugins/standard/OptionsNannyPlugin.py +1 -1
  151. nuitka/plugins/standard/PySidePyQtPlugin.py +11 -12
  152. nuitka/plugins/standard/SpacyPlugin.py +136 -0
  153. nuitka/plugins/standard/standard.nuitka-package.config.yml +462 -179
  154. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +6 -0
  155. nuitka/reports/Reports.py +53 -5
  156. nuitka/specs/BuiltinParameterSpecs.py +1 -1
  157. nuitka/specs/HardImportSpecs.py +0 -6
  158. nuitka/tools/data_composer/DataComposer.py +29 -27
  159. nuitka/tools/environments/CreateEnvironment.py +1 -0
  160. nuitka/tools/environments/Virtualenv.py +25 -11
  161. nuitka/tools/general/find_module/FindModuleCode.py +13 -3
  162. nuitka/tools/onefile_compressor/OnefileCompressor.py +21 -4
  163. nuitka/tools/scanning/DisplayPackageDLLs.py +17 -3
  164. nuitka/tools/specialize/CTypeDescriptions.py +13 -7
  165. nuitka/tools/specialize/SpecializePython.py +18 -1
  166. nuitka/tools/testing/Common.py +19 -6
  167. nuitka/tools/testing/check_reference_counts/__main__.py +1 -1
  168. nuitka/tools/testing/run_nuitka_tests/__main__.py +0 -20
  169. nuitka/tools/watch/AutoStage.py +144 -0
  170. nuitka/tools/watch/__main__.py +79 -32
  171. nuitka/tree/Building.py +105 -104
  172. nuitka/tree/ComplexCallHelperFunctions.py +16 -26
  173. nuitka/tree/InternalModule.py +8 -0
  174. nuitka/tree/ReformulationAssignmentStatements.py +29 -59
  175. nuitka/tree/ReformulationClasses.py +10 -17
  176. nuitka/tree/ReformulationClasses3.py +69 -43
  177. nuitka/tree/ReformulationComparisonExpressions.py +6 -16
  178. nuitka/tree/ReformulationContractionExpressions.py +14 -23
  179. nuitka/tree/ReformulationDictionaryCreation.py +6 -10
  180. nuitka/tree/ReformulationExecStatements.py +10 -10
  181. nuitka/tree/ReformulationForLoopStatements.py +6 -12
  182. nuitka/tree/ReformulationFunctionStatements.py +21 -28
  183. nuitka/tree/ReformulationImportStatements.py +8 -10
  184. nuitka/tree/ReformulationLambdaExpressions.py +3 -6
  185. nuitka/tree/ReformulationMatchStatements.py +166 -60
  186. nuitka/tree/ReformulationMultidist.py +3 -1
  187. nuitka/tree/ReformulationNamespacePackages.py +1 -1
  188. nuitka/tree/ReformulationPrintStatements.py +3 -6
  189. nuitka/tree/ReformulationSequenceCreation.py +13 -26
  190. nuitka/tree/ReformulationTryFinallyStatements.py +15 -0
  191. nuitka/tree/ReformulationWithStatements.py +12 -16
  192. nuitka/tree/SourceHandling.py +13 -8
  193. nuitka/tree/VariableClosure.py +5 -21
  194. nuitka/utils/Distributions.py +80 -11
  195. nuitka/utils/Download.py +38 -31
  196. nuitka/utils/Execution.py +13 -2
  197. nuitka/utils/FileOperations.py +55 -28
  198. nuitka/utils/Images.py +6 -1
  199. nuitka/utils/Importing.py +1 -1
  200. nuitka/utils/ModuleNames.py +11 -5
  201. nuitka/utils/ReExecute.py +17 -13
  202. nuitka/utils/SharedLibraries.py +32 -8
  203. nuitka/utils/Signing.py +3 -1
  204. nuitka/utils/StaticLibraries.py +51 -41
  205. nuitka/utils/Timing.py +1 -1
  206. nuitka/utils/Utils.py +29 -7
  207. /Nuitka_winsvc-2.3.11.data/scripts/nuitka.bat → /Nuitka_winsvc-2.4.1.data/scripts/nuitka.cmd +0 -0
  208. {Nuitka_winsvc-2.3.11.dist-info → Nuitka_winsvc-2.4.1.dist-info}/LICENSE.txt +0 -0
  209. {Nuitka_winsvc-2.3.11.dist-info → Nuitka_winsvc-2.4.1.dist-info}/entry_points.txt +0 -0
  210. {Nuitka_winsvc-2.3.11.dist-info → Nuitka_winsvc-2.4.1.dist-info}/top_level.txt +0 -0
nuitka/utils/ReExecute.py CHANGED
@@ -12,8 +12,6 @@ spell-checker: ignore execl, Popen
12
12
  import os
13
13
  import sys
14
14
 
15
- from nuitka.Options import shallExecuteImmediately
16
-
17
15
 
18
16
  def callExecProcess(args, uac):
19
17
  """Do exec in a portable way preserving exit code.
@@ -57,6 +55,10 @@ def callExecProcess(args, uac):
57
55
  os.execl(*args)
58
56
 
59
57
 
58
+ def setLaunchingNuitkaProcessEnvironmentValue(environment_variable_name, value):
59
+ os.environ[environment_variable_name] = str(os.getpid()) + ":" + value
60
+
61
+
60
62
  def reExecuteNuitka(pgo_filename):
61
63
  # Execute with full path as the process name, so it can find itself and its
62
64
  # libraries.
@@ -75,18 +77,18 @@ def reExecuteNuitka(pgo_filename):
75
77
 
76
78
  args += ["-S", our_filename]
77
79
 
78
- os.environ["NUITKA_BINARY_NAME"] = sys.modules["__main__"].__file__
79
- os.environ["NUITKA_PACKAGE_HOME"] = os.path.dirname(
80
- os.path.abspath(sys.modules["nuitka"].__path__[0])
80
+ setLaunchingNuitkaProcessEnvironmentValue(
81
+ "NUITKA_BINARY_NAME", sys.modules["__main__"].__file__
82
+ )
83
+ setLaunchingNuitkaProcessEnvironmentValue(
84
+ "NUITKA_PACKAGE_HOME",
85
+ os.path.dirname(os.path.abspath(sys.modules["nuitka"].__path__[0])),
81
86
  )
82
87
 
83
88
  if pgo_filename is not None:
84
89
  args.append("--pgo-python-input=%s" % pgo_filename)
85
90
  else:
86
- os.environ["NUITKA_SYS_PREFIX"] = sys.prefix
87
-
88
- if shallExecuteImmediately():
89
- args.append("--run")
91
+ setLaunchingNuitkaProcessEnvironmentValue("NUITKA_SYS_PREFIX", sys.prefix)
90
92
 
91
93
  # Same arguments as before.
92
94
  args += sys.argv[1:]
@@ -103,7 +105,7 @@ def reExecuteNuitka(pgo_filename):
103
105
  if site_filename.endswith(".pyc"):
104
106
  site_filename = site_filename[:-4] + ".py"
105
107
 
106
- os.environ["NUITKA_SITE_FILENAME"] = site_filename
108
+ setLaunchingNuitkaProcessEnvironmentValue("NUITKA_SITE_FILENAME", site_filename)
107
109
 
108
110
  # Note: As side effect, this might modify the "sys.path" too.
109
111
  os.environ["NUITKA_PTH_IMPORTED"] = repr(detectPthImportedPackages())
@@ -112,21 +114,23 @@ def reExecuteNuitka(pgo_filename):
112
114
  if user_site is not None:
113
115
  os.environ["NUITKA_USER_SITE"] = repr(user_site)
114
116
 
115
- os.environ["NUITKA_PYTHONPATH"] = repr(sys.path)
117
+ setLaunchingNuitkaProcessEnvironmentValue("NUITKA_PYTHONPATH", repr(sys.path))
116
118
 
117
119
  # In some environments, initial "sys.path" does not contain enough to load
118
120
  # "ast" module, which however we use to decode "NUITKA_PYTHONPATH", this
119
121
  # helps solve the chicken and egg problem.
120
122
  import ast
121
123
 
122
- os.environ["NUITKA_PYTHONPATH_AST"] = os.path.dirname(ast.__file__)
124
+ setLaunchingNuitkaProcessEnvironmentValue(
125
+ "NUITKA_PYTHONPATH_AST", os.path.dirname(ast.__file__)
126
+ )
123
127
 
124
128
  if sys.flags.no_site:
125
129
  os.environ["NUITKA_NOSITE_FLAG"] = "1"
126
130
 
127
131
  os.environ["PYTHONHASHSEED"] = "0"
128
132
 
129
- os.environ["NUITKA_REEXECUTION"] = "1"
133
+ setLaunchingNuitkaProcessEnvironmentValue("NUITKA_RE_EXECUTION", "1")
130
134
 
131
135
  # Does not return:
132
136
  callExecProcess(args, uac=False)
@@ -287,6 +287,23 @@ def getOtoolDependencyOutput(filename, package_specific_dirs):
287
287
  return _getOToolCommandOutput("-L", filename)
288
288
 
289
289
 
290
+ def parseOtoolListingOutput(output):
291
+ paths = OrderedSet()
292
+
293
+ for line in output.split(b"\n")[1:]:
294
+ if str is not bytes:
295
+ line = line.decode("utf8")
296
+
297
+ if not line:
298
+ continue
299
+
300
+ filename = line.split(" (", 1)[0].strip()
301
+
302
+ paths.add(filename)
303
+
304
+ return paths
305
+
306
+
290
307
  def _getDLLVersionMacOS(filename):
291
308
  output = _getOToolCommandOutput("-D", filename).splitlines()
292
309
 
@@ -469,24 +486,31 @@ def callInstallNameTool(filename, mapping, id_path, rpath):
469
486
  This is obviously macOS specific.
470
487
  """
471
488
  command = ["install_name_tool"]
489
+
490
+ needs_call = False
472
491
  for old_path, new_path in mapping:
473
- command += ("-change", old_path, new_path)
492
+ if old_path != new_path:
493
+ command += ("-change", old_path, new_path)
494
+ needs_call = True
474
495
 
475
496
  if rpath is not None:
476
497
  command += ("-add_rpath", os.path.join(rpath, "."))
498
+ needs_call = True
477
499
 
478
500
  if id_path is not None:
479
501
  command += ("-id", id_path)
502
+ needs_call = True
480
503
 
481
504
  command.append(filename)
482
505
 
483
- with withMadeWritableFileMode(filename):
484
- executeToolChecked(
485
- logger=postprocessing_logger,
486
- command=command,
487
- absence_message=_install_name_tool_usage,
488
- stderr_filter=_filterInstallNameToolErrorOutput,
489
- )
506
+ if needs_call:
507
+ with withMadeWritableFileMode(filename):
508
+ executeToolChecked(
509
+ logger=postprocessing_logger,
510
+ command=command,
511
+ absence_message=_install_name_tool_usage,
512
+ stderr_filter=_filterInstallNameToolErrorOutput,
513
+ )
490
514
 
491
515
 
492
516
  def getPyWin32Dir():
nuitka/utils/Signing.py CHANGED
@@ -48,6 +48,7 @@ def detectMacIdentity():
48
48
  if str is not bytes:
49
49
  output = output.decode("utf8")
50
50
 
51
+ signing_name = None
51
52
  result = None
52
53
 
53
54
  for line in output.splitlines():
@@ -96,7 +97,8 @@ def addMacOSCodeSignature(filenames):
96
97
  identity = detectMacIdentity()
97
98
 
98
99
  command = [
99
- "codesign",
100
+ # Need to avoid Anaconda codesign.
101
+ "/usr/bin/codesign",
100
102
  "-s",
101
103
  identity,
102
104
  "--force",
@@ -12,6 +12,7 @@ from nuitka.PythonFlavors import (
12
12
  isAnacondaPython,
13
13
  isDebianPackagePython,
14
14
  isNuitkaPython,
15
+ isRyePython,
15
16
  )
16
17
  from nuitka.PythonVersions import (
17
18
  getPythonABI,
@@ -22,7 +23,12 @@ from nuitka.PythonVersions import (
22
23
  from nuitka.Tracing import general
23
24
 
24
25
  from .FileOperations import getFileContentByLine, getFileList
25
- from .Utils import getLinuxDistribution, isDebianBasedLinux, isWin32Windows
26
+ from .Utils import (
27
+ getLinuxDistribution,
28
+ isDebianBasedLinux,
29
+ isMacOS,
30
+ isWin32Windows,
31
+ )
26
32
 
27
33
  _ldconf_paths = None
28
34
 
@@ -38,14 +44,15 @@ def locateStaticLinkLibrary(dll_name):
38
44
 
39
45
  def _locateStaticLinkLibrary(dll_name):
40
46
  # singleton, pylint: disable=global-statement
47
+
41
48
  #
42
49
  global _ldconf_paths
43
50
 
44
51
  if _ldconf_paths is None:
45
52
  _ldconf_paths = OrderedSet()
46
53
 
47
- for conf_filemame in getFileList("/etc/ld.so.conf.d", only_suffixes=".conf"):
48
- for conf_line in getFileContentByLine(conf_filemame):
54
+ for conf_filename in getFileList("/etc/ld.so.conf.d", only_suffixes=".conf"):
55
+ for conf_line in getFileContentByLine(conf_filename):
49
56
  conf_line = conf_line.split("#", 1)[0]
50
57
  conf_line = conf_line.strip()
51
58
 
@@ -142,53 +149,56 @@ def _getSystemStaticLibPythonPath():
142
149
  for candidate in candidates:
143
150
  if os.path.exists(candidate):
144
151
  return candidate
145
- else:
146
- candidate = os.path.join(
147
- sys_prefix, "lib", "libpython" + python_abi_version + ".a"
148
- )
149
152
 
150
- if os.path.exists(candidate):
151
- return candidate
153
+ return None
152
154
 
153
- # For Python2 this works. TODO: Figure out Debian and Python3.
154
- if (
155
- python_version < 0x300
156
- and isDebianPackagePython()
157
- and isDebianSuitableForStaticLinking()
158
- ):
159
- candidate = locateStaticLinkLibrary("python" + python_abi_version)
160
- else:
161
- candidate = None
155
+ if isMacOS() and isRyePython():
156
+ return None
162
157
 
163
- if candidate is not None and os.path.exists(candidate):
164
- # Also check libz, can be missing
165
- if not locateStaticLinkLibrary("z"):
166
- general.warning(
167
- "Error, missing 'libz-dev' installation needed for static lib-python."
168
- )
158
+ candidate = os.path.join(sys_prefix, "lib", "libpython" + python_abi_version + ".a")
169
159
 
170
- return candidate
160
+ if os.path.exists(candidate):
161
+ return candidate
171
162
 
172
- # This is not necessarily only for Python3 on Debian, but maybe others as well,
173
- # but that's what's been tested.
174
- if python_version >= 0x300 and isDebianPackagePython() and isDebianBasedLinux():
175
- candidate = os.path.join(
176
- _getSysConfigVarLIBPL(),
177
- "libpython" + python_abi_version + "-pic.a",
163
+ # For Python2 this works. TODO: Figure out Debian and Python3.
164
+ if (
165
+ python_version < 0x300
166
+ and isDebianPackagePython()
167
+ and isDebianSuitableForStaticLinking()
168
+ ):
169
+ candidate = locateStaticLinkLibrary("python" + python_abi_version)
170
+ else:
171
+ candidate = None
172
+
173
+ if candidate is not None and os.path.exists(candidate):
174
+ # Also check libz, can be missing
175
+ if not locateStaticLinkLibrary("z"):
176
+ general.warning(
177
+ "Error, missing 'libz-dev' installation needed for static lib-python."
178
178
  )
179
179
 
180
- if os.path.exists(candidate):
181
- return candidate
180
+ return candidate
182
181
 
183
- libpl = _getSysConfigVarLIBPL()
184
- if libpl is not None:
185
- candidate = os.path.join(
186
- libpl,
187
- "libpython" + python_abi_version + ".a",
188
- )
182
+ # This is not necessarily only for Python3 on Debian, but maybe others as well,
183
+ # but that's what's been tested. spell-checker: ignore libpl
184
+ if python_version >= 0x300 and isDebianPackagePython() and isDebianBasedLinux():
185
+ candidate = os.path.join(
186
+ _getSysConfigVarLIBPL(),
187
+ "libpython" + python_abi_version + "-pic.a",
188
+ )
189
189
 
190
- if os.path.exists(candidate):
191
- return candidate
190
+ if os.path.exists(candidate):
191
+ return candidate
192
+
193
+ libpl = _getSysConfigVarLIBPL()
194
+ if libpl is not None:
195
+ candidate = os.path.join(
196
+ libpl,
197
+ "libpython" + python_abi_version + ".a",
198
+ )
199
+
200
+ if os.path.exists(candidate):
201
+ return candidate
192
202
 
193
203
  return None
194
204
 
nuitka/utils/Timing.py CHANGED
@@ -83,7 +83,7 @@ class TimerReport(object):
83
83
  )
84
84
 
85
85
  if exception_type is None and above_threshold and self.decider():
86
- self.logger.info(self.message % self.timer.getDelta())
86
+ self.logger.info(self.message % self.timer.getDelta(), keep_format=True)
87
87
 
88
88
 
89
89
  # Part of "Nuitka", an optimizing Python compiler that is compatible and
nuitka/utils/Utils.py CHANGED
@@ -376,7 +376,13 @@ def withNoWarning():
376
376
 
377
377
 
378
378
  def decoratorRetries(
379
- logger, purpose, consequence, attempts=5, sleep_time=1, exception_type=OSError
379
+ logger,
380
+ purpose,
381
+ consequence,
382
+ extra_recommendation=None,
383
+ attempts=5,
384
+ sleep_time=1,
385
+ exception_type=OSError,
380
386
  ):
381
387
  """Make retries for errors on Windows.
382
388
 
@@ -384,6 +390,10 @@ def decoratorRetries(
384
390
  a virus checker warning.
385
391
  """
386
392
 
393
+ recommendation = "Disable Anti-Virus, e.g. Windows Defender for build folders."
394
+ if extra_recommendation is not None:
395
+ recommendation = "%s. %s" % (extra_recommendation, recommendation)
396
+
387
397
  def inner(func):
388
398
  if os.name != "nt":
389
399
  return func
@@ -398,8 +408,9 @@ def decoratorRetries(
398
408
  logger.warning(
399
409
  """\
400
410
  Failed to %s in attempt %d due to %s.
401
- Disable Anti-Virus, e.g. Windows Defender for build folders. Retrying after a second of delay."""
402
- % (purpose, attempt, str(e))
411
+ %s
412
+ Retrying after a second of delay."""
413
+ % (purpose, attempt, str(e), recommendation)
403
414
  )
404
415
 
405
416
  else:
@@ -407,15 +418,17 @@ Disable Anti-Virus, e.g. Windows Defender for build folders. Retrying after a se
407
418
  logger.warning(
408
419
  """\
409
420
  Failed to %s in attempt %d.
410
- Disable Anti-Virus, e.g. Windows Defender for build folders. Retrying after a second of delay."""
411
- % (purpose, attempt)
421
+ %s
422
+ Retrying after a second of delay."""
423
+ % (purpose, attempt, recommendation)
412
424
  )
413
425
  else:
414
426
  logger.warning(
415
427
  """\
416
428
  Failed to %s in attempt %d with error code %d.
417
- Disable Anti-Virus, e.g. Windows Defender for build folders. Retrying after a second of delay."""
418
- % (purpose, attempt, e.errno)
429
+ %s
430
+ Retrying after a second of delay."""
431
+ % (purpose, attempt, e.errno, recommendation)
419
432
  )
420
433
 
421
434
  time.sleep(sleep_time)
@@ -443,6 +456,15 @@ def raiseWindowsError(message):
443
456
  )
444
457
 
445
458
 
459
+ def getLaunchingNuitkaProcessEnvironmentValue(environment_variable_name):
460
+ # Hack, we need this to bootstrap and it's actually living in __main__
461
+ # module of nuitka package and renamed to where we can get at easily for
462
+ # other uses. pylint: disable=no-name-in-module,redefined-outer-name
463
+ from nuitka import getLaunchingNuitkaProcessEnvironmentValue
464
+
465
+ return getLaunchingNuitkaProcessEnvironmentValue(environment_variable_name)
466
+
467
+
446
468
  # Part of "Nuitka", an optimizing Python compiler that is compatible and
447
469
  # integrates with CPython, but also works on its own.
448
470
  #