Nuitka-winsvc 2.7.7__cp313-cp313-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 (995) hide show
  1. nuitka/Builtins.py +259 -0
  2. nuitka/BytecodeCaching.py +184 -0
  3. nuitka/Bytecodes.py +109 -0
  4. nuitka/CacheCleanup.py +54 -0
  5. nuitka/Constants.py +425 -0
  6. nuitka/Errors.py +93 -0
  7. nuitka/HardImportRegistry.py +408 -0
  8. nuitka/MainControl.py +1201 -0
  9. nuitka/ModuleRegistry.py +364 -0
  10. nuitka/OptionParsing.py +2473 -0
  11. nuitka/Options.py +2948 -0
  12. nuitka/OutputDirectories.py +201 -0
  13. nuitka/PostProcessing.py +551 -0
  14. nuitka/Progress.py +252 -0
  15. nuitka/PythonFlavors.py +426 -0
  16. nuitka/PythonOperators.py +146 -0
  17. nuitka/PythonVersions.py +513 -0
  18. nuitka/Serialization.py +291 -0
  19. nuitka/SourceCodeReferences.py +176 -0
  20. nuitka/Tracing.py +579 -0
  21. nuitka/TreeXML.py +141 -0
  22. nuitka/Variables.py +515 -0
  23. nuitka/Version.py +88 -0
  24. nuitka/__init__.py +19 -0
  25. nuitka/__main__.py +224 -0
  26. nuitka/__past__.py +217 -0
  27. nuitka/build/Backend.scons +1111 -0
  28. nuitka/build/CCompilerVersion.scons +281 -0
  29. nuitka/build/DataComposerInterface.py +116 -0
  30. nuitka/build/Offsets.scons +626 -0
  31. nuitka/build/Onefile.scons +564 -0
  32. nuitka/build/SconsCaching.py +451 -0
  33. nuitka/build/SconsCompilerSettings.py +1133 -0
  34. nuitka/build/SconsHacks.py +215 -0
  35. nuitka/build/SconsInterface.py +664 -0
  36. nuitka/build/SconsProgress.py +100 -0
  37. nuitka/build/SconsSpawn.py +436 -0
  38. nuitka/build/SconsUtils.py +939 -0
  39. nuitka/build/__init__.py +19 -0
  40. nuitka/build/include/nuitka/allocator.h +450 -0
  41. nuitka/build/include/nuitka/builtins.h +97 -0
  42. nuitka/build/include/nuitka/calling.h +123 -0
  43. nuitka/build/include/nuitka/checkers.h +39 -0
  44. nuitka/build/include/nuitka/checksum_tools.h +28 -0
  45. nuitka/build/include/nuitka/compiled_asyncgen.h +281 -0
  46. nuitka/build/include/nuitka/compiled_cell.h +64 -0
  47. nuitka/build/include/nuitka/compiled_coroutine.h +271 -0
  48. nuitka/build/include/nuitka/compiled_frame.h +502 -0
  49. nuitka/build/include/nuitka/compiled_function.h +170 -0
  50. nuitka/build/include/nuitka/compiled_generator.h +287 -0
  51. nuitka/build/include/nuitka/compiled_method.h +54 -0
  52. nuitka/build/include/nuitka/constants.h +251 -0
  53. nuitka/build/include/nuitka/constants_blob.h +34 -0
  54. nuitka/build/include/nuitka/debug_settings.h +60 -0
  55. nuitka/build/include/nuitka/environment_variables.h +30 -0
  56. nuitka/build/include/nuitka/environment_variables_system.h +51 -0
  57. nuitka/build/include/nuitka/exception_groups.h +167 -0
  58. nuitka/build/include/nuitka/exceptions.h +1458 -0
  59. nuitka/build/include/nuitka/filesystem_paths.h +117 -0
  60. nuitka/build/include/nuitka/freelists.h +92 -0
  61. nuitka/build/include/nuitka/hedley.h +1774 -0
  62. nuitka/build/include/nuitka/helper/attributes.h +90 -0
  63. nuitka/build/include/nuitka/helper/boolean.h +86 -0
  64. nuitka/build/include/nuitka/helper/bytearrays.h +34 -0
  65. nuitka/build/include/nuitka/helper/bytes.h +28 -0
  66. nuitka/build/include/nuitka/helper/calling_generated.h +132 -0
  67. nuitka/build/include/nuitka/helper/comparisons_dual_eq.h +47 -0
  68. nuitka/build/include/nuitka/helper/comparisons_dual_ge.h +39 -0
  69. nuitka/build/include/nuitka/helper/comparisons_dual_gt.h +39 -0
  70. nuitka/build/include/nuitka/helper/comparisons_dual_le.h +47 -0
  71. nuitka/build/include/nuitka/helper/comparisons_dual_lt.h +47 -0
  72. nuitka/build/include/nuitka/helper/comparisons_dual_ne.h +39 -0
  73. nuitka/build/include/nuitka/helper/comparisons_eq.h +247 -0
  74. nuitka/build/include/nuitka/helper/comparisons_ge.h +197 -0
  75. nuitka/build/include/nuitka/helper/comparisons_gt.h +197 -0
  76. nuitka/build/include/nuitka/helper/comparisons_le.h +247 -0
  77. nuitka/build/include/nuitka/helper/comparisons_lt.h +247 -0
  78. nuitka/build/include/nuitka/helper/comparisons_ne.h +197 -0
  79. nuitka/build/include/nuitka/helper/complex.h +46 -0
  80. nuitka/build/include/nuitka/helper/dictionaries.h +481 -0
  81. nuitka/build/include/nuitka/helper/floats.h +32 -0
  82. nuitka/build/include/nuitka/helper/import_hard.h +121 -0
  83. nuitka/build/include/nuitka/helper/indexes.h +47 -0
  84. nuitka/build/include/nuitka/helper/ints.h +165 -0
  85. nuitka/build/include/nuitka/helper/iterators.h +376 -0
  86. nuitka/build/include/nuitka/helper/lists.h +94 -0
  87. nuitka/build/include/nuitka/helper/lists_generated.h +36 -0
  88. nuitka/build/include/nuitka/helper/mappings.h +39 -0
  89. nuitka/build/include/nuitka/helper/operations.h +114 -0
  90. nuitka/build/include/nuitka/helper/operations_binary_add.h +240 -0
  91. nuitka/build/include/nuitka/helper/operations_binary_bitand.h +108 -0
  92. nuitka/build/include/nuitka/helper/operations_binary_bitor.h +108 -0
  93. nuitka/build/include/nuitka/helper/operations_binary_bitxor.h +108 -0
  94. nuitka/build/include/nuitka/helper/operations_binary_divmod.h +103 -0
  95. nuitka/build/include/nuitka/helper/operations_binary_dual_add.h +34 -0
  96. nuitka/build/include/nuitka/helper/operations_binary_floordiv.h +103 -0
  97. nuitka/build/include/nuitka/helper/operations_binary_lshift.h +99 -0
  98. nuitka/build/include/nuitka/helper/operations_binary_matmult.h +60 -0
  99. nuitka/build/include/nuitka/helper/operations_binary_mod.h +304 -0
  100. nuitka/build/include/nuitka/helper/operations_binary_mult.h +247 -0
  101. nuitka/build/include/nuitka/helper/operations_binary_olddiv.h +125 -0
  102. nuitka/build/include/nuitka/helper/operations_binary_pow.h +90 -0
  103. nuitka/build/include/nuitka/helper/operations_binary_rshift.h +99 -0
  104. nuitka/build/include/nuitka/helper/operations_binary_sub.h +117 -0
  105. nuitka/build/include/nuitka/helper/operations_binary_truediv.h +103 -0
  106. nuitka/build/include/nuitka/helper/operations_builtin_types.h +247 -0
  107. nuitka/build/include/nuitka/helper/operations_inplace_add.h +173 -0
  108. nuitka/build/include/nuitka/helper/operations_inplace_bitand.h +76 -0
  109. nuitka/build/include/nuitka/helper/operations_inplace_bitor.h +76 -0
  110. nuitka/build/include/nuitka/helper/operations_inplace_bitxor.h +76 -0
  111. nuitka/build/include/nuitka/helper/operations_inplace_floordiv.h +95 -0
  112. nuitka/build/include/nuitka/helper/operations_inplace_lshift.h +62 -0
  113. nuitka/build/include/nuitka/helper/operations_inplace_matmult.h +60 -0
  114. nuitka/build/include/nuitka/helper/operations_inplace_mod.h +218 -0
  115. nuitka/build/include/nuitka/helper/operations_inplace_mult.h +184 -0
  116. nuitka/build/include/nuitka/helper/operations_inplace_olddiv.h +115 -0
  117. nuitka/build/include/nuitka/helper/operations_inplace_pow.h +87 -0
  118. nuitka/build/include/nuitka/helper/operations_inplace_rshift.h +62 -0
  119. nuitka/build/include/nuitka/helper/operations_inplace_sub.h +102 -0
  120. nuitka/build/include/nuitka/helper/operations_inplace_truediv.h +95 -0
  121. nuitka/build/include/nuitka/helper/raising.h +114 -0
  122. nuitka/build/include/nuitka/helper/rangeobjects.h +66 -0
  123. nuitka/build/include/nuitka/helper/richcomparisons.h +35 -0
  124. nuitka/build/include/nuitka/helper/sequences.h +33 -0
  125. nuitka/build/include/nuitka/helper/sets.h +25 -0
  126. nuitka/build/include/nuitka/helper/slices.h +314 -0
  127. nuitka/build/include/nuitka/helper/strings.h +30 -0
  128. nuitka/build/include/nuitka/helper/subscripts.h +390 -0
  129. nuitka/build/include/nuitka/helper/tuples.h +187 -0
  130. nuitka/build/include/nuitka/helpers.h +417 -0
  131. nuitka/build/include/nuitka/importing.h +149 -0
  132. nuitka/build/include/nuitka/incbin.h +402 -0
  133. nuitka/build/include/nuitka/jit_sources.h +25 -0
  134. nuitka/build/include/nuitka/prelude.h +626 -0
  135. nuitka/build/include/nuitka/printing.h +84 -0
  136. nuitka/build/include/nuitka/python_pgo.h +57 -0
  137. nuitka/build/include/nuitka/safe_string_ops.h +57 -0
  138. nuitka/build/include/nuitka/threading.h +142 -0
  139. nuitka/build/include/nuitka/tracing.h +82 -0
  140. nuitka/build/include/nuitka/type_aliases.h +30 -0
  141. nuitka/build/include/nuitka/unfreezing.h +91 -0
  142. nuitka/build/inline_copy/appdirs/LICENSE.txt +23 -0
  143. nuitka/build/inline_copy/appdirs/appdirs.py +611 -0
  144. nuitka/build/inline_copy/atomicwrites/LICENSE +19 -0
  145. nuitka/build/inline_copy/atomicwrites/atomicwrites.py +226 -0
  146. nuitka/build/inline_copy/bin/scons.py +58 -0
  147. nuitka/build/inline_copy/clcache/clcache/LICENSE +30 -0
  148. nuitka/build/inline_copy/clcache/clcache/__init__.py +4 -0
  149. nuitka/build/inline_copy/clcache/clcache/caching.py +2008 -0
  150. nuitka/build/inline_copy/colorama/LICENSE.txt +27 -0
  151. nuitka/build/inline_copy/colorama/colorama/__init__.py +6 -0
  152. nuitka/build/inline_copy/colorama/colorama/ansi.py +102 -0
  153. nuitka/build/inline_copy/colorama/colorama/ansitowin32.py +258 -0
  154. nuitka/build/inline_copy/colorama/colorama/initialise.py +80 -0
  155. nuitka/build/inline_copy/colorama/colorama/win32.py +152 -0
  156. nuitka/build/inline_copy/colorama/colorama/winterm.py +169 -0
  157. nuitka/build/inline_copy/glob2/LICENSE +27 -0
  158. nuitka/build/inline_copy/glob2/glob2/__init__.py +5 -0
  159. nuitka/build/inline_copy/glob2/glob2/compat.py +167 -0
  160. nuitka/build/inline_copy/glob2/glob2/fnmatch.py +141 -0
  161. nuitka/build/inline_copy/glob2/glob2/impl.py +216 -0
  162. nuitka/build/inline_copy/jinja2/LICENSE.rst +28 -0
  163. nuitka/build/inline_copy/jinja2/README.rst +2 -0
  164. nuitka/build/inline_copy/jinja2/jinja2/__init__.py +72 -0
  165. nuitka/build/inline_copy/jinja2/jinja2/_compat.py +105 -0
  166. nuitka/build/inline_copy/jinja2/jinja2/_identifier.py +2 -0
  167. nuitka/build/inline_copy/jinja2/jinja2/bccache.py +361 -0
  168. nuitka/build/inline_copy/jinja2/jinja2/compiler.py +1721 -0
  169. nuitka/build/inline_copy/jinja2/jinja2/constants.py +32 -0
  170. nuitka/build/inline_copy/jinja2/jinja2/debug.py +378 -0
  171. nuitka/build/inline_copy/jinja2/jinja2/defaults.py +56 -0
  172. nuitka/build/inline_copy/jinja2/jinja2/environment.py +1276 -0
  173. nuitka/build/inline_copy/jinja2/jinja2/exceptions.py +146 -0
  174. nuitka/build/inline_copy/jinja2/jinja2/ext.py +627 -0
  175. nuitka/build/inline_copy/jinja2/jinja2/filters.py +1190 -0
  176. nuitka/build/inline_copy/jinja2/jinja2/idtracking.py +286 -0
  177. nuitka/build/inline_copy/jinja2/jinja2/lexer.py +739 -0
  178. nuitka/build/inline_copy/jinja2/jinja2/loaders.py +483 -0
  179. nuitka/build/inline_copy/jinja2/jinja2/meta.py +106 -0
  180. nuitka/build/inline_copy/jinja2/jinja2/nativetypes.py +220 -0
  181. nuitka/build/inline_copy/jinja2/jinja2/nodes.py +999 -0
  182. nuitka/build/inline_copy/jinja2/jinja2/optimizer.py +49 -0
  183. nuitka/build/inline_copy/jinja2/jinja2/parser.py +903 -0
  184. nuitka/build/inline_copy/jinja2/jinja2/runtime.py +808 -0
  185. nuitka/build/inline_copy/jinja2/jinja2/sandbox.py +488 -0
  186. nuitka/build/inline_copy/jinja2/jinja2/tests.py +174 -0
  187. nuitka/build/inline_copy/jinja2/jinja2/utils.py +642 -0
  188. nuitka/build/inline_copy/jinja2/jinja2/visitor.py +87 -0
  189. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Action.py +1475 -0
  190. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Builder.py +905 -0
  191. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/CacheDir.py +314 -0
  192. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Conftest.py +805 -0
  193. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Debug.py +251 -0
  194. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Defaults.py +646 -0
  195. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Environment.py +2561 -0
  196. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/EnvironmentValues.py +119 -0
  197. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Errors.py +222 -0
  198. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Executor.py +660 -0
  199. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Job.py +439 -0
  200. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Memoize.py +242 -0
  201. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/Alias.py +176 -0
  202. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/FS.py +3861 -0
  203. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/Python.py +195 -0
  204. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Node/__init__.py +1784 -0
  205. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/PathList.py +224 -0
  206. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/__init__.py +341 -0
  207. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/aix.py +81 -0
  208. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/cygwin.py +61 -0
  209. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/darwin.py +70 -0
  210. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/hpux.py +45 -0
  211. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/irix.py +41 -0
  212. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/mingw.py +33 -0
  213. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/os2.py +55 -0
  214. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/posix.py +124 -0
  215. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/sunos.py +47 -0
  216. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/virtualenv.py +115 -0
  217. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Platform/win32.py +429 -0
  218. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/SConf.py +1119 -0
  219. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/SConsign.py +453 -0
  220. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/C.py +226 -0
  221. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/Dir.py +131 -0
  222. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/Prog.py +114 -0
  223. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/RC.py +57 -0
  224. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Scanner/__init__.py +436 -0
  225. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/Interactive.py +372 -0
  226. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/Main.py +1469 -0
  227. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/SConsOptions.py +1071 -0
  228. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/SConscript.py +686 -0
  229. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Script/__init__.py +425 -0
  230. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Subst.py +979 -0
  231. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Taskmaster.py +1062 -0
  232. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/386asm.py +61 -0
  233. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/GettextCommon.py +429 -0
  234. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/__init__.py +52 -0
  235. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/arch.py +66 -0
  236. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/common.py +371 -0
  237. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/netframework.py +83 -0
  238. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/sdk.py +411 -0
  239. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/vc.py +994 -0
  240. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/MSCommon/vs.py +608 -0
  241. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/PharLapCommon.py +116 -0
  242. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/__init__.py +882 -0
  243. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixc++.py +43 -0
  244. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixcc.py +74 -0
  245. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixcxx.py +77 -0
  246. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/aixlink.py +78 -0
  247. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/applelink.py +209 -0
  248. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ar.py +63 -0
  249. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/as.py +49 -0
  250. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/asm.py +78 -0
  251. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/bcc32.py +81 -0
  252. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/c++.py +44 -0
  253. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cc.py +105 -0
  254. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clang.py +91 -0
  255. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clangCommon/__init__.py +18 -0
  256. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/clangxx.py +99 -0
  257. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cxx.py +95 -0
  258. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/cyglink.py +212 -0
  259. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/default.py +50 -0
  260. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/filesystem.py +98 -0
  261. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/g++.py +45 -0
  262. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gas.py +56 -0
  263. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gcc.py +110 -0
  264. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gettext_tool.py +69 -0
  265. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gnulink.py +70 -0
  266. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/gxx.py +78 -0
  267. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpc++.py +45 -0
  268. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpcc.py +53 -0
  269. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hpcxx.py +88 -0
  270. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/hplink.py +72 -0
  271. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/icc.py +59 -0
  272. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/icl.py +52 -0
  273. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ilink.py +55 -0
  274. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/ilink32.py +60 -0
  275. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/install.py +510 -0
  276. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/intelc.py +617 -0
  277. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/link.py +72 -0
  278. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/LoadableModule.py +131 -0
  279. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/SharedLibrary.py +218 -0
  280. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkCommon/__init__.py +171 -0
  281. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/linkloc.py +112 -0
  282. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/m4.py +63 -0
  283. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/masm.py +77 -0
  284. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mingw.py +232 -0
  285. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msgfmt.py +132 -0
  286. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msginit.py +137 -0
  287. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msgmerge.py +125 -0
  288. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mslib.py +73 -0
  289. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mslink.py +339 -0
  290. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mssdk.py +50 -0
  291. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msvc.py +325 -0
  292. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/msvs.py +2116 -0
  293. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mwcc.py +207 -0
  294. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/mwld.py +108 -0
  295. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/nasm.py +72 -0
  296. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/rmic.py +139 -0
  297. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/rpcgen.py +70 -0
  298. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgiar.py +68 -0
  299. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgic++.py +43 -0
  300. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgicc.py +53 -0
  301. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgicxx.py +61 -0
  302. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sgilink.py +59 -0
  303. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunar.py +64 -0
  304. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunc++.py +45 -0
  305. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/suncc.py +58 -0
  306. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/suncxx.py +153 -0
  307. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/sunlink.py +79 -0
  308. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/tar.py +73 -0
  309. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/textfile.py +198 -0
  310. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/tlib.py +53 -0
  311. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/wix.py +104 -0
  312. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/xgettext.py +337 -0
  313. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Tool/zip.py +120 -0
  314. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Util.py +2134 -0
  315. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/ConfigureCache.py +171 -0
  316. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/__init__.py +0 -0
  317. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Utilities/sconsign.py +494 -0
  318. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/BoolVariable.py +96 -0
  319. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/EnumVariable.py +110 -0
  320. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/ListVariable.py +152 -0
  321. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/PackageVariable.py +107 -0
  322. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/PathVariable.py +158 -0
  323. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Variables/__init__.py +334 -0
  324. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/Warnings.py +238 -0
  325. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/__init__.py +9 -0
  326. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/__init__.py +104 -0
  327. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/_scons_dbm.py +42 -0
  328. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/compat/win32.py +101 -0
  329. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/cpp.py +640 -0
  330. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/dblite.py +295 -0
  331. nuitka/build/inline_copy/lib/scons-4.3.0/SCons/exitfuncs.py +59 -0
  332. nuitka/build/inline_copy/markupsafe/LICENSE.rst +28 -0
  333. nuitka/build/inline_copy/markupsafe/markupsafe/__init__.py +327 -0
  334. nuitka/build/inline_copy/markupsafe/markupsafe/_compat.py +33 -0
  335. nuitka/build/inline_copy/markupsafe/markupsafe/_constants.py +264 -0
  336. nuitka/build/inline_copy/markupsafe/markupsafe/_native.py +69 -0
  337. nuitka/build/inline_copy/pefile/LICENSE.txt +21 -0
  338. nuitka/build/inline_copy/pefile/ordlookup/__init__.py +41 -0
  339. nuitka/build/inline_copy/pefile/ordlookup/oleaut32.py +400 -0
  340. nuitka/build/inline_copy/pefile/ordlookup/ws2_32.py +120 -0
  341. nuitka/build/inline_copy/pefile/pefile.py +8034 -0
  342. nuitka/build/inline_copy/pkg_resources/pkg_resources/__init__.py +3272 -0
  343. nuitka/build/inline_copy/pkg_resources/pkg_resources/py31compat.py +21 -0
  344. nuitka/build/inline_copy/python_hacl/LICENSE.txt +201 -0
  345. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.c +1430 -0
  346. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.h +66 -0
  347. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.c +463 -0
  348. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.h +66 -0
  349. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.c +1273 -0
  350. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.h +204 -0
  351. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.c +734 -0
  352. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.h +131 -0
  353. nuitka/build/inline_copy/python_hacl/hacl_312/Hacl_Streaming_Types.h +83 -0
  354. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt128_Verified.h +346 -0
  355. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt_8_16_32_64.h +107 -0
  356. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/fstar_uint128_struct_endianness.h +68 -0
  357. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/internal/target.h +293 -0
  358. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/lowstar_endianness.h +231 -0
  359. nuitka/build/inline_copy/python_hacl/hacl_312/include/krml/types.h +14 -0
  360. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_MD5.h +56 -0
  361. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA1.h +56 -0
  362. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA2.h +164 -0
  363. nuitka/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA3.h +65 -0
  364. nuitka/build/inline_copy/python_hacl/hacl_312/python_hacl_namespaces.h +89 -0
  365. nuitka/build/inline_copy/stubgen/astunparse.py +938 -0
  366. nuitka/build/inline_copy/stubgen/six.py +998 -0
  367. nuitka/build/inline_copy/stubgen/stubgen.py +484 -0
  368. nuitka/build/inline_copy/tqdm/tqdm/__init__.py +40 -0
  369. nuitka/build/inline_copy/tqdm/tqdm/_main.py +9 -0
  370. nuitka/build/inline_copy/tqdm/tqdm/_monitor.py +97 -0
  371. nuitka/build/inline_copy/tqdm/tqdm/_tqdm.py +9 -0
  372. nuitka/build/inline_copy/tqdm/tqdm/_tqdm_notebook.py +9 -0
  373. nuitka/build/inline_copy/tqdm/tqdm/_tqdm_pandas.py +24 -0
  374. nuitka/build/inline_copy/tqdm/tqdm/_utils.py +12 -0
  375. nuitka/build/inline_copy/tqdm/tqdm/auto.py +44 -0
  376. nuitka/build/inline_copy/tqdm/tqdm/autonotebook.py +28 -0
  377. nuitka/build/inline_copy/tqdm/tqdm/dask.py +46 -0
  378. nuitka/build/inline_copy/tqdm/tqdm/notebook.py +316 -0
  379. nuitka/build/inline_copy/tqdm/tqdm/std.py +1524 -0
  380. nuitka/build/inline_copy/tqdm/tqdm/tk.py +207 -0
  381. nuitka/build/inline_copy/tqdm/tqdm/utils.py +351 -0
  382. nuitka/build/inline_copy/tqdm/tqdm/version.py +2 -0
  383. nuitka/build/inline_copy/yaml/LICENSE +20 -0
  384. nuitka/build/inline_copy/yaml/yaml/__init__.py +427 -0
  385. nuitka/build/inline_copy/yaml/yaml/composer.py +139 -0
  386. nuitka/build/inline_copy/yaml/yaml/constructor.py +748 -0
  387. nuitka/build/inline_copy/yaml/yaml/cyaml.py +101 -0
  388. nuitka/build/inline_copy/yaml/yaml/dumper.py +62 -0
  389. nuitka/build/inline_copy/yaml/yaml/emitter.py +1137 -0
  390. nuitka/build/inline_copy/yaml/yaml/error.py +75 -0
  391. nuitka/build/inline_copy/yaml/yaml/events.py +86 -0
  392. nuitka/build/inline_copy/yaml/yaml/loader.py +63 -0
  393. nuitka/build/inline_copy/yaml/yaml/nodes.py +49 -0
  394. nuitka/build/inline_copy/yaml/yaml/parser.py +589 -0
  395. nuitka/build/inline_copy/yaml/yaml/reader.py +185 -0
  396. nuitka/build/inline_copy/yaml/yaml/representer.py +389 -0
  397. nuitka/build/inline_copy/yaml/yaml/resolver.py +227 -0
  398. nuitka/build/inline_copy/yaml/yaml/scanner.py +1435 -0
  399. nuitka/build/inline_copy/yaml/yaml/serializer.py +111 -0
  400. nuitka/build/inline_copy/yaml/yaml/tokens.py +104 -0
  401. nuitka/build/inline_copy/zlib/LICENSE +22 -0
  402. nuitka/build/inline_copy/zlib/crc32.c +1049 -0
  403. nuitka/build/inline_copy/zlib/crc32.h +9446 -0
  404. nuitka/build/inline_copy/zlib/zconf.h +551 -0
  405. nuitka/build/inline_copy/zlib/zlib.h +1938 -0
  406. nuitka/build/inline_copy/zlib/zutil.h +275 -0
  407. nuitka/build/inline_copy/zstd/LICENSE.txt +30 -0
  408. nuitka/build/inline_copy/zstd/common/bitstream.h +463 -0
  409. nuitka/build/inline_copy/zstd/common/compiler.h +288 -0
  410. nuitka/build/inline_copy/zstd/common/cpu.h +213 -0
  411. nuitka/build/inline_copy/zstd/common/debug.h +107 -0
  412. nuitka/build/inline_copy/zstd/common/entropy_common.c +360 -0
  413. nuitka/build/inline_copy/zstd/common/error_private.c +56 -0
  414. nuitka/build/inline_copy/zstd/common/error_private.h +80 -0
  415. nuitka/build/inline_copy/zstd/common/fse.h +715 -0
  416. nuitka/build/inline_copy/zstd/common/fse_decompress.c +393 -0
  417. nuitka/build/inline_copy/zstd/common/huf.h +361 -0
  418. nuitka/build/inline_copy/zstd/common/mem.h +426 -0
  419. nuitka/build/inline_copy/zstd/common/xxhash.c +826 -0
  420. nuitka/build/inline_copy/zstd/common/xxhash.h +285 -0
  421. nuitka/build/inline_copy/zstd/common/zstd_common.c +83 -0
  422. nuitka/build/inline_copy/zstd/common/zstd_deps.h +111 -0
  423. nuitka/build/inline_copy/zstd/common/zstd_errors.h +95 -0
  424. nuitka/build/inline_copy/zstd/common/zstd_internal.h +478 -0
  425. nuitka/build/inline_copy/zstd/decompress/huf_decompress.c +1350 -0
  426. nuitka/build/inline_copy/zstd/decompress/zstd_ddict.c +244 -0
  427. nuitka/build/inline_copy/zstd/decompress/zstd_ddict.h +44 -0
  428. nuitka/build/inline_copy/zstd/decompress/zstd_decompress.c +1930 -0
  429. nuitka/build/inline_copy/zstd/decompress/zstd_decompress_block.c +1540 -0
  430. nuitka/build/inline_copy/zstd/decompress/zstd_decompress_block.h +62 -0
  431. nuitka/build/inline_copy/zstd/decompress/zstd_decompress_internal.h +190 -0
  432. nuitka/build/inline_copy/zstd/zstd.h +2391 -0
  433. nuitka/build/static_src/CompiledAsyncgenType.c +2211 -0
  434. nuitka/build/static_src/CompiledCellType.c +300 -0
  435. nuitka/build/static_src/CompiledCodeHelpers.c +2160 -0
  436. nuitka/build/static_src/CompiledCoroutineType.c +1946 -0
  437. nuitka/build/static_src/CompiledFrameType.c +1337 -0
  438. nuitka/build/static_src/CompiledFunctionType.c +3320 -0
  439. nuitka/build/static_src/CompiledGeneratorType.c +1997 -0
  440. nuitka/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +2117 -0
  441. nuitka/build/static_src/CompiledMethodType.c +614 -0
  442. nuitka/build/static_src/GenerateHeadersMain.c +30 -0
  443. nuitka/build/static_src/HelpersAllocator.c +939 -0
  444. nuitka/build/static_src/HelpersAttributes.c +1241 -0
  445. nuitka/build/static_src/HelpersBuiltin.c +901 -0
  446. nuitka/build/static_src/HelpersBuiltinTypeMethods.c +3594 -0
  447. nuitka/build/static_src/HelpersBytes.c +107 -0
  448. nuitka/build/static_src/HelpersCalling.c +397 -0
  449. nuitka/build/static_src/HelpersCallingGenerated.c +14361 -0
  450. nuitka/build/static_src/HelpersChecksumTools.c +59 -0
  451. nuitka/build/static_src/HelpersClasses.c +91 -0
  452. nuitka/build/static_src/HelpersComparisonDualEq.c +183 -0
  453. nuitka/build/static_src/HelpersComparisonDualGe.c +121 -0
  454. nuitka/build/static_src/HelpersComparisonDualGt.c +121 -0
  455. nuitka/build/static_src/HelpersComparisonDualLe.c +183 -0
  456. nuitka/build/static_src/HelpersComparisonDualLt.c +183 -0
  457. nuitka/build/static_src/HelpersComparisonDualNe.c +121 -0
  458. nuitka/build/static_src/HelpersComparisonEq.c +12070 -0
  459. nuitka/build/static_src/HelpersComparisonEqUtils.c +169 -0
  460. nuitka/build/static_src/HelpersComparisonGe.c +11871 -0
  461. nuitka/build/static_src/HelpersComparisonGt.c +11855 -0
  462. nuitka/build/static_src/HelpersComparisonLe.c +11957 -0
  463. nuitka/build/static_src/HelpersComparisonLt.c +11941 -0
  464. nuitka/build/static_src/HelpersComparisonNe.c +11979 -0
  465. nuitka/build/static_src/HelpersConsole.c +124 -0
  466. nuitka/build/static_src/HelpersConstantsBlob.c +1487 -0
  467. nuitka/build/static_src/HelpersDeepcopy.c +636 -0
  468. nuitka/build/static_src/HelpersDictionaries.c +1739 -0
  469. nuitka/build/static_src/HelpersDictionariesGenerated.c +738 -0
  470. nuitka/build/static_src/HelpersDumpBacktraces.c +63 -0
  471. nuitka/build/static_src/HelpersEnvironmentVariables.c +65 -0
  472. nuitka/build/static_src/HelpersEnvironmentVariablesSystem.c +97 -0
  473. nuitka/build/static_src/HelpersExceptions.c +298 -0
  474. nuitka/build/static_src/HelpersFiles.c +353 -0
  475. nuitka/build/static_src/HelpersFilesystemPaths.c +1322 -0
  476. nuitka/build/static_src/HelpersFloats.c +92 -0
  477. nuitka/build/static_src/HelpersHeapStorage.c +68 -0
  478. nuitka/build/static_src/HelpersImport.c +506 -0
  479. nuitka/build/static_src/HelpersImportHard.c +526 -0
  480. nuitka/build/static_src/HelpersJitSources.c +48 -0
  481. nuitka/build/static_src/HelpersLists.c +899 -0
  482. nuitka/build/static_src/HelpersListsGenerated.c +564 -0
  483. nuitka/build/static_src/HelpersMappings.c +46 -0
  484. nuitka/build/static_src/HelpersMatching.c +192 -0
  485. nuitka/build/static_src/HelpersOperationBinaryAdd.c +6477 -0
  486. nuitka/build/static_src/HelpersOperationBinaryAddUtils.c +703 -0
  487. nuitka/build/static_src/HelpersOperationBinaryBitand.c +2738 -0
  488. nuitka/build/static_src/HelpersOperationBinaryBitor.c +2738 -0
  489. nuitka/build/static_src/HelpersOperationBinaryBitxor.c +2738 -0
  490. nuitka/build/static_src/HelpersOperationBinaryDivmod.c +2406 -0
  491. nuitka/build/static_src/HelpersOperationBinaryDivmodUtils.c +33 -0
  492. nuitka/build/static_src/HelpersOperationBinaryDualAdd.c +172 -0
  493. nuitka/build/static_src/HelpersOperationBinaryFloordiv.c +2422 -0
  494. nuitka/build/static_src/HelpersOperationBinaryInplaceAdd.c +220 -0
  495. nuitka/build/static_src/HelpersOperationBinaryLshift.c +2846 -0
  496. nuitka/build/static_src/HelpersOperationBinaryMatmult.c +453 -0
  497. nuitka/build/static_src/HelpersOperationBinaryMod.c +6549 -0
  498. nuitka/build/static_src/HelpersOperationBinaryMult.c +6438 -0
  499. nuitka/build/static_src/HelpersOperationBinaryMultUtils.c +125 -0
  500. nuitka/build/static_src/HelpersOperationBinaryOlddiv.c +2355 -0
  501. nuitka/build/static_src/HelpersOperationBinaryPow.c +2743 -0
  502. nuitka/build/static_src/HelpersOperationBinaryPowUtils.c +26 -0
  503. nuitka/build/static_src/HelpersOperationBinaryRshift.c +2706 -0
  504. nuitka/build/static_src/HelpersOperationBinarySub.c +2649 -0
  505. nuitka/build/static_src/HelpersOperationBinaryTruediv.c +2415 -0
  506. nuitka/build/static_src/HelpersOperationInplaceAdd.c +5211 -0
  507. nuitka/build/static_src/HelpersOperationInplaceAddUtils.c +144 -0
  508. nuitka/build/static_src/HelpersOperationInplaceBitand.c +1826 -0
  509. nuitka/build/static_src/HelpersOperationInplaceBitor.c +1826 -0
  510. nuitka/build/static_src/HelpersOperationInplaceBitxor.c +1826 -0
  511. nuitka/build/static_src/HelpersOperationInplaceFloordiv.c +2605 -0
  512. nuitka/build/static_src/HelpersOperationInplaceLshift.c +1594 -0
  513. nuitka/build/static_src/HelpersOperationInplaceMatmult.c +603 -0
  514. nuitka/build/static_src/HelpersOperationInplaceMod.c +4762 -0
  515. nuitka/build/static_src/HelpersOperationInplaceMult.c +4689 -0
  516. nuitka/build/static_src/HelpersOperationInplaceOlddiv.c +2553 -0
  517. nuitka/build/static_src/HelpersOperationInplacePow.c +2807 -0
  518. nuitka/build/static_src/HelpersOperationInplaceRshift.c +1534 -0
  519. nuitka/build/static_src/HelpersOperationInplaceSub.c +2894 -0
  520. nuitka/build/static_src/HelpersOperationInplaceTruediv.c +2612 -0
  521. nuitka/build/static_src/HelpersProfiling.c +104 -0
  522. nuitka/build/static_src/HelpersPythonPgo.c +113 -0
  523. nuitka/build/static_src/HelpersRaising.c +447 -0
  524. nuitka/build/static_src/HelpersSafeStrings.c +185 -0
  525. nuitka/build/static_src/HelpersSequences.c +134 -0
  526. nuitka/build/static_src/HelpersSlices.c +73 -0
  527. nuitka/build/static_src/HelpersStrings.c +998 -0
  528. nuitka/build/static_src/HelpersTuples.c +148 -0
  529. nuitka/build/static_src/HelpersTypes.c +329 -0
  530. nuitka/build/static_src/InspectPatcher.c +439 -0
  531. nuitka/build/static_src/MainProgram.c +2060 -0
  532. nuitka/build/static_src/MetaPathBasedLoader.c +2290 -0
  533. nuitka/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +125 -0
  534. nuitka/build/static_src/MetaPathBasedLoaderResourceReader.c +158 -0
  535. nuitka/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +785 -0
  536. nuitka/build/static_src/OnefileBootstrap.c +1580 -0
  537. nuitka/build/static_src/OnefileSplashScreen.cpp +275 -0
  538. nuitka/code_generation/AsyncgenCodes.py +186 -0
  539. nuitka/code_generation/AttributeCodes.py +357 -0
  540. nuitka/code_generation/BinaryOperationHelperDefinitions.py +720 -0
  541. nuitka/code_generation/BranchCodes.py +67 -0
  542. nuitka/code_generation/BuiltinCodes.py +529 -0
  543. nuitka/code_generation/CallCodes.py +1186 -0
  544. nuitka/code_generation/ClassCodes.py +156 -0
  545. nuitka/code_generation/CodeGeneration.py +1078 -0
  546. nuitka/code_generation/CodeHelperSelection.py +81 -0
  547. nuitka/code_generation/CodeHelpers.py +455 -0
  548. nuitka/code_generation/CodeObjectCodes.py +165 -0
  549. nuitka/code_generation/ComparisonCodes.py +569 -0
  550. nuitka/code_generation/ComparisonHelperDefinitions.py +146 -0
  551. nuitka/code_generation/ConditionalCodes.py +236 -0
  552. nuitka/code_generation/ConstantCodes.py +243 -0
  553. nuitka/code_generation/Contexts.py +1248 -0
  554. nuitka/code_generation/CoroutineCodes.py +253 -0
  555. nuitka/code_generation/CtypesCodes.py +46 -0
  556. nuitka/code_generation/DictCodes.py +918 -0
  557. nuitka/code_generation/Emission.py +75 -0
  558. nuitka/code_generation/ErrorCodes.py +281 -0
  559. nuitka/code_generation/EvalCodes.py +444 -0
  560. nuitka/code_generation/ExceptionCodes.py +337 -0
  561. nuitka/code_generation/ExpressionCTypeSelectionHelpers.py +227 -0
  562. nuitka/code_generation/ExpressionCodes.py +61 -0
  563. nuitka/code_generation/FrameCodes.py +518 -0
  564. nuitka/code_generation/FunctionCodes.py +858 -0
  565. nuitka/code_generation/GeneratorCodes.py +218 -0
  566. nuitka/code_generation/GlobalConstants.py +249 -0
  567. nuitka/code_generation/GlobalsLocalsCodes.py +211 -0
  568. nuitka/code_generation/IdCodes.py +53 -0
  569. nuitka/code_generation/ImportCodes.py +468 -0
  570. nuitka/code_generation/Indentation.py +45 -0
  571. nuitka/code_generation/IndexCodes.py +50 -0
  572. nuitka/code_generation/InjectCCodes.py +28 -0
  573. nuitka/code_generation/IntegerCodes.py +110 -0
  574. nuitka/code_generation/IteratorCodes.py +378 -0
  575. nuitka/code_generation/JitCodes.py +44 -0
  576. nuitka/code_generation/LabelCodes.py +68 -0
  577. nuitka/code_generation/LineNumberCodes.py +91 -0
  578. nuitka/code_generation/ListCodes.py +502 -0
  579. nuitka/code_generation/LoaderCodes.py +193 -0
  580. nuitka/code_generation/LocalsDictCodes.py +359 -0
  581. nuitka/code_generation/LoopCodes.py +88 -0
  582. nuitka/code_generation/MatchCodes.py +67 -0
  583. nuitka/code_generation/ModuleCodes.py +247 -0
  584. nuitka/code_generation/Namify.py +260 -0
  585. nuitka/code_generation/NetworkxCodes.py +51 -0
  586. nuitka/code_generation/OperationCodes.py +398 -0
  587. nuitka/code_generation/PackageResourceCodes.py +986 -0
  588. nuitka/code_generation/PrintCodes.py +93 -0
  589. nuitka/code_generation/PythonAPICodes.py +215 -0
  590. nuitka/code_generation/RaisingCodes.py +481 -0
  591. nuitka/code_generation/Reports.py +115 -0
  592. nuitka/code_generation/ReturnCodes.py +143 -0
  593. nuitka/code_generation/SetCodes.py +196 -0
  594. nuitka/code_generation/SliceCodes.py +465 -0
  595. nuitka/code_generation/StringCodes.py +303 -0
  596. nuitka/code_generation/SubscriptCodes.py +263 -0
  597. nuitka/code_generation/TensorflowCodes.py +54 -0
  598. nuitka/code_generation/TryCodes.py +326 -0
  599. nuitka/code_generation/TupleCodes.py +115 -0
  600. nuitka/code_generation/TypeAliasCodes.py +120 -0
  601. nuitka/code_generation/VariableCodes.py +519 -0
  602. nuitka/code_generation/VariableDeclarations.py +279 -0
  603. nuitka/code_generation/YieldCodes.py +253 -0
  604. nuitka/code_generation/__init__.py +19 -0
  605. nuitka/code_generation/c_types/CTypeBases.py +177 -0
  606. nuitka/code_generation/c_types/CTypeBooleans.py +104 -0
  607. nuitka/code_generation/c_types/CTypeCFloats.py +57 -0
  608. nuitka/code_generation/c_types/CTypeCLongs.py +45 -0
  609. nuitka/code_generation/c_types/CTypeModuleDictVariables.py +109 -0
  610. nuitka/code_generation/c_types/CTypeNuitkaBooleans.py +150 -0
  611. nuitka/code_generation/c_types/CTypeNuitkaInts.py +200 -0
  612. nuitka/code_generation/c_types/CTypeNuitkaVoids.py +107 -0
  613. nuitka/code_generation/c_types/CTypePyObjectPointers.py +572 -0
  614. nuitka/code_generation/c_types/CTypeVoids.py +92 -0
  615. nuitka/code_generation/c_types/__init__.py +19 -0
  616. nuitka/code_generation/templates/CodeTemplatesAsyncgens.py +106 -0
  617. nuitka/code_generation/templates/CodeTemplatesConstants.py +296 -0
  618. nuitka/code_generation/templates/CodeTemplatesCoroutines.py +109 -0
  619. nuitka/code_generation/templates/CodeTemplatesExceptions.py +84 -0
  620. nuitka/code_generation/templates/CodeTemplatesFrames.py +235 -0
  621. nuitka/code_generation/templates/CodeTemplatesFunction.py +117 -0
  622. nuitka/code_generation/templates/CodeTemplatesGeneratorFunction.py +130 -0
  623. nuitka/code_generation/templates/CodeTemplatesIterators.py +40 -0
  624. nuitka/code_generation/templates/CodeTemplatesLoader.py +180 -0
  625. nuitka/code_generation/templates/CodeTemplatesModules.py +710 -0
  626. nuitka/code_generation/templates/CodeTemplatesVariables.py +388 -0
  627. nuitka/code_generation/templates/TemplateDebugWrapper.py +80 -0
  628. nuitka/code_generation/templates/__init__.py +19 -0
  629. nuitka/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +321 -0
  630. nuitka/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +143 -0
  631. nuitka/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +677 -0
  632. nuitka/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +165 -0
  633. nuitka/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +38 -0
  634. nuitka/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +41 -0
  635. nuitka/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +53 -0
  636. nuitka/code_generation/templates_c/HelperDictionaryCopy.c.j2 +364 -0
  637. nuitka/code_generation/templates_c/HelperImportHard.c.j2 +37 -0
  638. nuitka/code_generation/templates_c/HelperLongTools.c.j2 +53 -0
  639. nuitka/code_generation/templates_c/HelperObjectTools.c.j2 +20 -0
  640. nuitka/code_generation/templates_c/HelperOperationBinary.c.j2 +148 -0
  641. nuitka/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +115 -0
  642. nuitka/code_generation/templates_c/HelperOperationComparison.c.j2 +352 -0
  643. nuitka/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +115 -0
  644. nuitka/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +86 -0
  645. nuitka/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +31 -0
  646. nuitka/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +32 -0
  647. nuitka/code_generation/templates_c/HelperOperationComparisonList.c.j2 +112 -0
  648. nuitka/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +157 -0
  649. nuitka/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +115 -0
  650. nuitka/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +99 -0
  651. nuitka/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +115 -0
  652. nuitka/code_generation/templates_c/HelperOperationInplace.c.j2 +281 -0
  653. nuitka/code_generation/templates_c/HelperSlotsBinary.c.j2 +420 -0
  654. nuitka/code_generation/templates_c/HelperSlotsBytes.c.j2 +51 -0
  655. nuitka/code_generation/templates_c/HelperSlotsCommon.c.j2 +71 -0
  656. nuitka/code_generation/templates_c/HelperSlotsFloat.c.j2 +327 -0
  657. nuitka/code_generation/templates_c/HelperSlotsInt.c.j2 +411 -0
  658. nuitka/code_generation/templates_c/HelperSlotsList.c.j2 +59 -0
  659. nuitka/code_generation/templates_c/HelperSlotsLong.c.j2 +229 -0
  660. nuitka/code_generation/templates_c/HelperSlotsSet.c.j2 +47 -0
  661. nuitka/code_generation/templates_c/HelperSlotsStr.c.j2 +55 -0
  662. nuitka/code_generation/templates_c/HelperSlotsTuple.c.j2 +58 -0
  663. nuitka/code_generation/templates_c/HelperSlotsUnicode.c.j2 +62 -0
  664. nuitka/containers/Namedtuples.py +51 -0
  665. nuitka/containers/OrderedDicts.py +191 -0
  666. nuitka/containers/OrderedSets.py +123 -0
  667. nuitka/containers/OrderedSetsFallback.py +139 -0
  668. nuitka/containers/__init__.py +19 -0
  669. nuitka/distutils/Build.py +76 -0
  670. nuitka/distutils/DistutilCommands.py +438 -0
  671. nuitka/distutils/__init__.py +19 -0
  672. nuitka/finalizations/Finalization.py +35 -0
  673. nuitka/finalizations/FinalizeMarkups.py +136 -0
  674. nuitka/finalizations/__init__.py +19 -0
  675. nuitka/freezer/DependsExe.py +257 -0
  676. nuitka/freezer/DllDependenciesCommon.py +97 -0
  677. nuitka/freezer/DllDependenciesMacOS.py +444 -0
  678. nuitka/freezer/DllDependenciesPosix.py +242 -0
  679. nuitka/freezer/DllDependenciesWin32.py +315 -0
  680. nuitka/freezer/ImportDetection.py +359 -0
  681. nuitka/freezer/IncludedDataFiles.py +689 -0
  682. nuitka/freezer/IncludedEntryPoints.py +376 -0
  683. nuitka/freezer/Onefile.py +296 -0
  684. nuitka/freezer/Standalone.py +520 -0
  685. nuitka/freezer/__init__.py +19 -0
  686. nuitka/importing/IgnoreListing.py +449 -0
  687. nuitka/importing/ImportCache.py +95 -0
  688. nuitka/importing/ImportResolving.py +186 -0
  689. nuitka/importing/Importing.py +1200 -0
  690. nuitka/importing/PreloadedPackages.py +164 -0
  691. nuitka/importing/Recursion.py +611 -0
  692. nuitka/importing/StandardLibrary.py +429 -0
  693. nuitka/importing/__init__.py +19 -0
  694. nuitka/nodes/AsyncgenNodes.py +107 -0
  695. nuitka/nodes/AttributeLookupNodes.py +124 -0
  696. nuitka/nodes/AttributeNodes.py +386 -0
  697. nuitka/nodes/AttributeNodesGenerated.py +10734 -0
  698. nuitka/nodes/BuiltinAllNodes.py +115 -0
  699. nuitka/nodes/BuiltinAnyNodes.py +124 -0
  700. nuitka/nodes/BuiltinComplexNodes.py +83 -0
  701. nuitka/nodes/BuiltinDecodingNodes.py +52 -0
  702. nuitka/nodes/BuiltinDecoratorNodes.py +85 -0
  703. nuitka/nodes/BuiltinDictNodes.py +140 -0
  704. nuitka/nodes/BuiltinFormatNodes.py +159 -0
  705. nuitka/nodes/BuiltinHashNodes.py +63 -0
  706. nuitka/nodes/BuiltinInputNodes.py +39 -0
  707. nuitka/nodes/BuiltinIntegerNodes.py +170 -0
  708. nuitka/nodes/BuiltinIteratorNodes.py +391 -0
  709. nuitka/nodes/BuiltinLenNodes.py +61 -0
  710. nuitka/nodes/BuiltinNextNodes.py +111 -0
  711. nuitka/nodes/BuiltinOpenNodes.py +148 -0
  712. nuitka/nodes/BuiltinOperationNodeBasesGenerated.py +7367 -0
  713. nuitka/nodes/BuiltinRangeNodes.py +690 -0
  714. nuitka/nodes/BuiltinRefNodes.py +314 -0
  715. nuitka/nodes/BuiltinSumNodes.py +104 -0
  716. nuitka/nodes/BuiltinTypeNodes.py +454 -0
  717. nuitka/nodes/BuiltinVarsNodes.py +44 -0
  718. nuitka/nodes/BytesNodes.py +829 -0
  719. nuitka/nodes/CallNodes.py +217 -0
  720. nuitka/nodes/Checkers.py +55 -0
  721. nuitka/nodes/ChildrenHavingMixins.py +21576 -0
  722. nuitka/nodes/ClassNodes.py +286 -0
  723. nuitka/nodes/CodeObjectSpecs.py +230 -0
  724. nuitka/nodes/ComparisonNodes.py +687 -0
  725. nuitka/nodes/ConditionalNodes.py +884 -0
  726. nuitka/nodes/ConstantRefNodes.py +1717 -0
  727. nuitka/nodes/ContainerMakingNodes.py +408 -0
  728. nuitka/nodes/ContainerOperationNodes.py +87 -0
  729. nuitka/nodes/CoroutineNodes.py +144 -0
  730. nuitka/nodes/CtypesNodes.py +51 -0
  731. nuitka/nodes/DictionaryNodes.py +1513 -0
  732. nuitka/nodes/ExceptionNodes.py +393 -0
  733. nuitka/nodes/ExecEvalNodes.py +229 -0
  734. nuitka/nodes/ExpressionBases.py +1301 -0
  735. nuitka/nodes/ExpressionBasesGenerated.py +2103 -0
  736. nuitka/nodes/ExpressionShapeMixins.py +886 -0
  737. nuitka/nodes/FrameNodes.py +413 -0
  738. nuitka/nodes/FunctionAttributeNodes.py +102 -0
  739. nuitka/nodes/FunctionNodes.py +1303 -0
  740. nuitka/nodes/FutureSpecs.py +224 -0
  741. nuitka/nodes/GeneratorNodes.py +201 -0
  742. nuitka/nodes/GlobalsLocalsNodes.py +209 -0
  743. nuitka/nodes/HardImportNodesGenerated.py +3599 -0
  744. nuitka/nodes/ImportHardNodes.py +185 -0
  745. nuitka/nodes/ImportNodes.py +1366 -0
  746. nuitka/nodes/IndicatorMixins.py +79 -0
  747. nuitka/nodes/InjectCNodes.py +51 -0
  748. nuitka/nodes/IterationHandles.py +407 -0
  749. nuitka/nodes/KeyValuePairNodes.py +378 -0
  750. nuitka/nodes/ListOperationNodes.py +525 -0
  751. nuitka/nodes/LocalsDictNodes.py +717 -0
  752. nuitka/nodes/LocalsScopes.py +505 -0
  753. nuitka/nodes/LoopNodes.py +445 -0
  754. nuitka/nodes/MatchNodes.py +60 -0
  755. nuitka/nodes/ModuleAttributeNodes.py +180 -0
  756. nuitka/nodes/ModuleNodes.py +1137 -0
  757. nuitka/nodes/NetworkxNodes.py +45 -0
  758. nuitka/nodes/NodeBases.py +890 -0
  759. nuitka/nodes/NodeMakingHelpers.py +481 -0
  760. nuitka/nodes/NodeMetaClasses.py +172 -0
  761. nuitka/nodes/OperatorNodes.py +944 -0
  762. nuitka/nodes/OperatorNodesUnary.py +403 -0
  763. nuitka/nodes/OsSysNodes.py +215 -0
  764. nuitka/nodes/OutlineNodes.py +372 -0
  765. nuitka/nodes/PackageMetadataNodes.py +982 -0
  766. nuitka/nodes/PackageResourceNodes.py +424 -0
  767. nuitka/nodes/PrintNodes.py +105 -0
  768. nuitka/nodes/ReturnNodes.py +255 -0
  769. nuitka/nodes/SideEffectNodes.py +139 -0
  770. nuitka/nodes/SliceNodes.py +386 -0
  771. nuitka/nodes/StatementBasesGenerated.py +3419 -0
  772. nuitka/nodes/StatementNodes.py +316 -0
  773. nuitka/nodes/StrNodes.py +919 -0
  774. nuitka/nodes/StringConcatenationNodes.py +103 -0
  775. nuitka/nodes/SubscriptNodes.py +245 -0
  776. nuitka/nodes/TensorflowNodes.py +38 -0
  777. nuitka/nodes/TryNodes.py +519 -0
  778. nuitka/nodes/TypeMatchNodes.py +65 -0
  779. nuitka/nodes/TypeNodes.py +390 -0
  780. nuitka/nodes/VariableAssignNodes.py +1177 -0
  781. nuitka/nodes/VariableDelNodes.py +320 -0
  782. nuitka/nodes/VariableNameNodes.py +153 -0
  783. nuitka/nodes/VariableRefNodes.py +895 -0
  784. nuitka/nodes/VariableReleaseNodes.py +153 -0
  785. nuitka/nodes/YieldNodes.py +121 -0
  786. nuitka/nodes/__init__.py +19 -0
  787. nuitka/nodes/shapes/BuiltinTypeShapes.py +4290 -0
  788. nuitka/nodes/shapes/ControlFlowDescriptions.py +199 -0
  789. nuitka/nodes/shapes/IteratorShapes.py +71 -0
  790. nuitka/nodes/shapes/ShapeMixins.py +255 -0
  791. nuitka/nodes/shapes/StandardShapes.py +1384 -0
  792. nuitka/nodes/shapes/__init__.py +19 -0
  793. nuitka/optimizations/BytecodeDemotion.py +105 -0
  794. nuitka/optimizations/FunctionInlining.py +110 -0
  795. nuitka/optimizations/Graphs.py +70 -0
  796. nuitka/optimizations/Optimization.py +363 -0
  797. nuitka/optimizations/OptimizeBuiltinCalls.py +1582 -0
  798. nuitka/optimizations/Tags.py +76 -0
  799. nuitka/optimizations/TraceCollections.py +1257 -0
  800. nuitka/optimizations/ValueTraces.py +980 -0
  801. nuitka/optimizations/__init__.py +19 -0
  802. nuitka/pgo/PGO.py +160 -0
  803. nuitka/pgo/__init__.py +19 -0
  804. nuitka/plugins/PluginBase.py +1924 -0
  805. nuitka/plugins/Plugins.py +2007 -0
  806. nuitka/plugins/YamlPluginBase.py +121 -0
  807. nuitka/plugins/__init__.py +19 -0
  808. nuitka/plugins/standard/AntiBloatPlugin.py +1024 -0
  809. nuitka/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +95 -0
  810. nuitka/plugins/standard/DataFilesPlugin.py +311 -0
  811. nuitka/plugins/standard/DelvewheelPlugin.py +150 -0
  812. nuitka/plugins/standard/DillPlugin/DillPlugin.c +37 -0
  813. nuitka/plugins/standard/DillPlugin/cloudpickle-postLoad.py +67 -0
  814. nuitka/plugins/standard/DillPlugin/dill-postLoad.py +223 -0
  815. nuitka/plugins/standard/DillPlugin.py +137 -0
  816. nuitka/plugins/standard/DllFilesPlugin.py +527 -0
  817. nuitka/plugins/standard/EnumPlugin.py +64 -0
  818. nuitka/plugins/standard/EventletPlugin.py +57 -0
  819. nuitka/plugins/standard/GeventPlugin.py +64 -0
  820. nuitka/plugins/standard/GiPlugin.py +118 -0
  821. nuitka/plugins/standard/GlfwPlugin.py +138 -0
  822. nuitka/plugins/standard/ImplicitImports.py +845 -0
  823. nuitka/plugins/standard/KivyPlugin.py +141 -0
  824. nuitka/plugins/standard/MatplotlibPlugin.py +256 -0
  825. nuitka/plugins/standard/MultiprocessingPlugin.py +199 -0
  826. nuitka/plugins/standard/NumpyPlugin.py +35 -0
  827. nuitka/plugins/standard/OptionsNannyPlugin.py +158 -0
  828. nuitka/plugins/standard/PbrPlugin.py +62 -0
  829. nuitka/plugins/standard/PkgResourcesPlugin.py +162 -0
  830. nuitka/plugins/standard/PlaywrightPlugin.py +179 -0
  831. nuitka/plugins/standard/PmwPlugin.py +248 -0
  832. nuitka/plugins/standard/PySidePyQtPlugin.py +1666 -0
  833. nuitka/plugins/standard/PywebViewPlugin.py +81 -0
  834. nuitka/plugins/standard/SpacyPlugin.py +137 -0
  835. nuitka/plugins/standard/TensorflowPlugin.py +35 -0
  836. nuitka/plugins/standard/TkinterPlugin.py +416 -0
  837. nuitka/plugins/standard/TorchPlugin.py +35 -0
  838. nuitka/plugins/standard/TransformersPlugin.py +121 -0
  839. nuitka/plugins/standard/TrioPlugin.py +33 -0
  840. nuitka/plugins/standard/UpxPlugin.py +174 -0
  841. nuitka/plugins/standard/__init__.py +19 -0
  842. nuitka/plugins/standard/standard.nuitka-package.config.yml +9313 -0
  843. nuitka/plugins/standard/stdlib2.nuitka-package.config.yml +78 -0
  844. nuitka/plugins/standard/stdlib3.nuitka-package.config.yml +468 -0
  845. nuitka/reports/CompilationReportReader.py +83 -0
  846. nuitka/reports/LicenseReport.rst.j2 +41 -0
  847. nuitka/reports/Reports.py +961 -0
  848. nuitka/reports/__init__.py +19 -0
  849. nuitka/specs/BuiltinBytesOperationSpecs.py +180 -0
  850. nuitka/specs/BuiltinDictOperationSpecs.py +82 -0
  851. nuitka/specs/BuiltinListOperationSpecs.py +80 -0
  852. nuitka/specs/BuiltinParameterSpecs.py +831 -0
  853. nuitka/specs/BuiltinStrOperationSpecs.py +181 -0
  854. nuitka/specs/BuiltinTypeOperationSpecs.py +34 -0
  855. nuitka/specs/BuiltinUnicodeOperationSpecs.py +123 -0
  856. nuitka/specs/HardImportSpecs.py +236 -0
  857. nuitka/specs/ParameterSpecs.py +630 -0
  858. nuitka/specs/__init__.py +19 -0
  859. nuitka/tools/Basics.py +55 -0
  860. nuitka/tools/__init__.py +19 -0
  861. nuitka/tools/commercial/__init__.py +21 -0
  862. nuitka/tools/data_composer/DataComposer.py +593 -0
  863. nuitka/tools/data_composer/__init__.py +19 -0
  864. nuitka/tools/data_composer/__main__.py +41 -0
  865. nuitka/tools/environments/CreateEnvironment.py +69 -0
  866. nuitka/tools/environments/Virtualenv.py +158 -0
  867. nuitka/tools/environments/__init__.py +19 -0
  868. nuitka/tools/general/__init__.py +19 -0
  869. nuitka/tools/general/dll_report/__init__.py +19 -0
  870. nuitka/tools/general/dll_report/__main__.py +83 -0
  871. nuitka/tools/general/find_module/FindModuleCode.py +127 -0
  872. nuitka/tools/general/find_module/__init__.py +19 -0
  873. nuitka/tools/general/generate_header/GenerateHeader.py +73 -0
  874. nuitka/tools/general/generate_header/__init__.py +19 -0
  875. nuitka/tools/onefile_compressor/OnefileCompressor.py +390 -0
  876. nuitka/tools/onefile_compressor/__init__.py +19 -0
  877. nuitka/tools/onefile_compressor/__main__.py +41 -0
  878. nuitka/tools/podman/Podman.py +55 -0
  879. nuitka/tools/podman/__init__.py +19 -0
  880. nuitka/tools/podman/__main__.py +425 -0
  881. nuitka/tools/profiler/__init__.py +19 -0
  882. nuitka/tools/profiler/__main__.py +93 -0
  883. nuitka/tools/scanning/DisplayDistributions.py +39 -0
  884. nuitka/tools/scanning/DisplayPackageDLLs.py +151 -0
  885. nuitka/tools/scanning/DisplayPackageData.py +73 -0
  886. nuitka/tools/scanning/__init__.py +19 -0
  887. nuitka/tools/specialize/CTypeDescriptions.py +1928 -0
  888. nuitka/tools/specialize/Common.py +380 -0
  889. nuitka/tools/specialize/SpecializeC.py +1483 -0
  890. nuitka/tools/specialize/SpecializePython.py +1151 -0
  891. nuitka/tools/specialize/__init__.py +19 -0
  892. nuitka/tools/testing/Common.py +2007 -0
  893. nuitka/tools/testing/Constructs.py +53 -0
  894. nuitka/tools/testing/DocTests.py +156 -0
  895. nuitka/tools/testing/OutputComparison.py +313 -0
  896. nuitka/tools/testing/Pythons.py +34 -0
  897. nuitka/tools/testing/RuntimeTracing.py +260 -0
  898. nuitka/tools/testing/SearchModes.py +208 -0
  899. nuitka/tools/testing/Valgrind.py +103 -0
  900. nuitka/tools/testing/__init__.py +19 -0
  901. nuitka/tools/testing/check_reference_counts/__init__.py +19 -0
  902. nuitka/tools/testing/check_reference_counts/__main__.py +107 -0
  903. nuitka/tools/testing/compare_with_cpython/__init__.py +19 -0
  904. nuitka/tools/testing/compare_with_cpython/__main__.py +942 -0
  905. nuitka/tools/testing/find_sxs_modules/__init__.py +19 -0
  906. nuitka/tools/testing/find_sxs_modules/__main__.py +73 -0
  907. nuitka/tools/testing/measure_construct_performance/__init__.py +19 -0
  908. nuitka/tools/testing/measure_construct_performance/__main__.py +288 -0
  909. nuitka/tools/testing/run_nuitka_tests/__init__.py +19 -0
  910. nuitka/tools/testing/run_nuitka_tests/__main__.py +1091 -0
  911. nuitka/tools/watch/AutoStage.py +145 -0
  912. nuitka/tools/watch/Common.py +55 -0
  913. nuitka/tools/watch/Conda.py +125 -0
  914. nuitka/tools/watch/GitHub.py +113 -0
  915. nuitka/tools/watch/Pacman.py +73 -0
  916. nuitka/tools/watch/Pipenv.py +145 -0
  917. nuitka/tools/watch/__init__.py +19 -0
  918. nuitka/tools/watch/__main__.py +615 -0
  919. nuitka/tree/Building.py +1459 -0
  920. nuitka/tree/ComplexCallHelperFunctions.py +2150 -0
  921. nuitka/tree/Extractions.py +48 -0
  922. nuitka/tree/FutureSpecState.py +71 -0
  923. nuitka/tree/InternalModule.py +96 -0
  924. nuitka/tree/Operations.py +45 -0
  925. nuitka/tree/ReformulationAssertStatements.py +97 -0
  926. nuitka/tree/ReformulationAssignmentStatements.py +1260 -0
  927. nuitka/tree/ReformulationBooleanExpressions.py +97 -0
  928. nuitka/tree/ReformulationCallExpressions.py +314 -0
  929. nuitka/tree/ReformulationClasses.py +407 -0
  930. nuitka/tree/ReformulationClasses3.py +1149 -0
  931. nuitka/tree/ReformulationComparisonExpressions.py +174 -0
  932. nuitka/tree/ReformulationContractionExpressions.py +676 -0
  933. nuitka/tree/ReformulationDictionaryCreation.py +304 -0
  934. nuitka/tree/ReformulationExecStatements.py +386 -0
  935. nuitka/tree/ReformulationForLoopStatements.py +215 -0
  936. nuitka/tree/ReformulationFunctionStatements.py +931 -0
  937. nuitka/tree/ReformulationImportStatements.py +333 -0
  938. nuitka/tree/ReformulationLambdaExpressions.py +185 -0
  939. nuitka/tree/ReformulationMatchStatements.py +797 -0
  940. nuitka/tree/ReformulationMultidist.py +80 -0
  941. nuitka/tree/ReformulationNamespacePackages.py +239 -0
  942. nuitka/tree/ReformulationPrintStatements.py +127 -0
  943. nuitka/tree/ReformulationSequenceCreation.py +438 -0
  944. nuitka/tree/ReformulationSubscriptExpressions.py +123 -0
  945. nuitka/tree/ReformulationTryExceptStatements.py +418 -0
  946. nuitka/tree/ReformulationTryFinallyStatements.py +239 -0
  947. nuitka/tree/ReformulationWhileLoopStatements.py +160 -0
  948. nuitka/tree/ReformulationWithStatements.py +382 -0
  949. nuitka/tree/ReformulationYieldExpressions.py +133 -0
  950. nuitka/tree/SourceHandling.py +476 -0
  951. nuitka/tree/SyntaxErrors.py +143 -0
  952. nuitka/tree/TreeHelpers.py +720 -0
  953. nuitka/tree/VariableClosure.py +483 -0
  954. nuitka/tree/__init__.py +19 -0
  955. nuitka/utils/AppDirs.py +104 -0
  956. nuitka/utils/CStrings.py +208 -0
  957. nuitka/utils/CommandLineOptions.py +207 -0
  958. nuitka/utils/Distributions.py +728 -0
  959. nuitka/utils/Download.py +217 -0
  960. nuitka/utils/Execution.py +517 -0
  961. nuitka/utils/FileOperations.py +1587 -0
  962. nuitka/utils/Hashing.py +137 -0
  963. nuitka/utils/Images.py +79 -0
  964. nuitka/utils/Importing.py +335 -0
  965. nuitka/utils/InlineCopies.py +52 -0
  966. nuitka/utils/InstalledPythons.py +254 -0
  967. nuitka/utils/InstanceCounters.py +86 -0
  968. nuitka/utils/Jinja2.py +158 -0
  969. nuitka/utils/Json.py +40 -0
  970. nuitka/utils/MacOSApp.py +134 -0
  971. nuitka/utils/MemoryUsage.py +165 -0
  972. nuitka/utils/ModuleNames.py +317 -0
  973. nuitka/utils/PackageResources.py +44 -0
  974. nuitka/utils/ReExecute.py +152 -0
  975. nuitka/utils/Rest.py +60 -0
  976. nuitka/utils/SharedLibraries.py +1014 -0
  977. nuitka/utils/Shebang.py +113 -0
  978. nuitka/utils/Signing.py +144 -0
  979. nuitka/utils/SlotMetaClasses.py +57 -0
  980. nuitka/utils/StaticLibraries.py +260 -0
  981. nuitka/utils/ThreadedExecutor.py +87 -0
  982. nuitka/utils/Timing.py +102 -0
  983. nuitka/utils/Utils.py +483 -0
  984. nuitka/utils/WindowsFileUsage.py +337 -0
  985. nuitka/utils/WindowsResources.py +652 -0
  986. nuitka/utils/Yaml.py +247 -0
  987. nuitka/utils/__init__.py +19 -0
  988. nuitka_winsvc-2.7.7.data/scripts/nuitka-run.cmd +24 -0
  989. nuitka_winsvc-2.7.7.data/scripts/nuitka.cmd +30 -0
  990. nuitka_winsvc-2.7.7.dist-info/METADATA +115 -0
  991. nuitka_winsvc-2.7.7.dist-info/RECORD +995 -0
  992. nuitka_winsvc-2.7.7.dist-info/WHEEL +5 -0
  993. nuitka_winsvc-2.7.7.dist-info/entry_points.txt +7 -0
  994. nuitka_winsvc-2.7.7.dist-info/licenses/LICENSE.txt +202 -0
  995. nuitka_winsvc-2.7.7.dist-info/top_level.txt +1 -0
@@ -0,0 +1,1784 @@
1
+ # MIT License
2
+ #
3
+ # Copyright The SCons Foundation
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the
7
+ # "Software"), to deal in the Software without restriction, including
8
+ # without limitation the rights to use, copy, modify, merge, publish,
9
+ # distribute, sublicense, and/or sell copies of the Software, and to
10
+ # permit persons to whom the Software is furnished to do so, subject to
11
+ # the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included
14
+ # in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17
+ # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18
+ # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ """The Node package for the SCons software construction utility.
25
+
26
+ This is, in many ways, the heart of SCons.
27
+
28
+ A Node is where we encapsulate all of the dependency information about
29
+ any thing that SCons can build, or about any thing which SCons can use
30
+ to build some other thing. The canonical "thing," of course, is a file,
31
+ but a Node can also represent something remote (like a web page) or
32
+ something completely abstract (like an Alias).
33
+
34
+ Each specific type of "thing" is specifically represented by a subclass
35
+ of the Node base class: Node.FS.File for files, Node.Alias for aliases,
36
+ etc. Dependency information is kept here in the base class, and
37
+ information specific to files/aliases/etc. is in the subclass. The
38
+ goal, if we've done this correctly, is that any type of "thing" should
39
+ be able to depend on any other type of "thing."
40
+
41
+ """
42
+
43
+ import collections
44
+ import copy
45
+ from itertools import chain, zip_longest
46
+
47
+ import SCons.Debug
48
+ import SCons.Executor
49
+ import SCons.Memoize
50
+ from SCons.compat import NoSlotsPyPy
51
+ from SCons.Debug import logInstanceCreation, Trace
52
+ from SCons.Util import hash_signature, is_List, UniqueList, render_tree
53
+
54
+ print_duplicate = 0
55
+
56
+ def classname(obj):
57
+ return str(obj.__class__).split('.')[-1]
58
+
59
+ # Set to false if we're doing a dry run. There's more than one of these
60
+ # little treats
61
+ do_store_info = True
62
+
63
+ # Node states
64
+ #
65
+ # These are in "priority" order, so that the maximum value for any
66
+ # child/dependency of a node represents the state of that node if
67
+ # it has no builder of its own. The canonical example is a file
68
+ # system directory, which is only up to date if all of its children
69
+ # were up to date.
70
+ no_state = 0
71
+ pending = 1
72
+ executing = 2
73
+ up_to_date = 3
74
+ executed = 4
75
+ failed = 5
76
+
77
+ StateString = {
78
+ 0 : "no_state",
79
+ 1 : "pending",
80
+ 2 : "executing",
81
+ 3 : "up_to_date",
82
+ 4 : "executed",
83
+ 5 : "failed",
84
+ }
85
+
86
+ # controls whether implicit dependencies are cached:
87
+ implicit_cache = 0
88
+
89
+ # controls whether implicit dep changes are ignored:
90
+ implicit_deps_unchanged = 0
91
+
92
+ # controls whether the cached implicit deps are ignored:
93
+ implicit_deps_changed = 0
94
+
95
+ # A variable that can be set to an interface-specific function be called
96
+ # to annotate a Node with information about its creation.
97
+ def do_nothing_node(node): pass
98
+
99
+ Annotate = do_nothing_node
100
+
101
+ # global set for recording all processed SContruct/SConscript nodes
102
+ SConscriptNodes = set()
103
+
104
+ # Gets set to 'True' if we're running in interactive mode. Is
105
+ # currently used to release parts of a target's info during
106
+ # clean builds and update runs (see release_target_info).
107
+ interactive = False
108
+
109
+ def is_derived_none(node):
110
+ raise NotImplementedError
111
+
112
+ def is_derived_node(node):
113
+ """
114
+ Returns true if this node is derived (i.e. built).
115
+ """
116
+ return node.has_builder() or node.side_effect
117
+
118
+ _is_derived_map = {0 : is_derived_none,
119
+ 1 : is_derived_node}
120
+
121
+ def exists_none(node):
122
+ raise NotImplementedError
123
+
124
+ def exists_always(node):
125
+ return 1
126
+
127
+ def exists_base(node):
128
+ return node.stat() is not None
129
+
130
+ def exists_entry(node):
131
+ """Return if the Entry exists. Check the file system to see
132
+ what we should turn into first. Assume a file if there's no
133
+ directory."""
134
+ node.disambiguate()
135
+ return _exists_map[node._func_exists](node)
136
+
137
+
138
+ def exists_file(node):
139
+ # Duplicate from source path if we are set up to do this.
140
+ if node.duplicate and not node.is_derived() and not node.linked:
141
+ src = node.srcnode()
142
+ if src is not node:
143
+ # At this point, src is meant to be copied in a variant directory.
144
+ src = src.rfile()
145
+ if src.get_abspath() != node.get_abspath():
146
+ if src.exists():
147
+ node.do_duplicate(src)
148
+ # Can't return 1 here because the duplication might
149
+ # not actually occur if the -n option is being used.
150
+ else:
151
+ # The source file does not exist. Make sure no old
152
+ # copy remains in the variant directory.
153
+ if print_duplicate:
154
+ print("dup: no src for %s, unlinking old variant copy" % node)
155
+ if exists_base(node) or node.islink():
156
+ node.fs.unlink(node.get_internal_path())
157
+ # Return None explicitly because the Base.exists() call
158
+ # above will have cached its value if the file existed.
159
+ return None
160
+ return exists_base(node)
161
+
162
+ _exists_map = {0 : exists_none,
163
+ 1 : exists_always,
164
+ 2 : exists_base,
165
+ 3 : exists_entry,
166
+ 4 : exists_file}
167
+
168
+
169
+ def rexists_none(node):
170
+ raise NotImplementedError
171
+
172
+ def rexists_node(node):
173
+ return node.exists()
174
+
175
+ def rexists_base(node):
176
+ return node.rfile().exists()
177
+
178
+ _rexists_map = {0 : rexists_none,
179
+ 1 : rexists_node,
180
+ 2 : rexists_base}
181
+
182
+ def get_contents_none(node):
183
+ raise NotImplementedError
184
+
185
+ def get_contents_entry(node):
186
+ """Fetch the contents of the entry. Returns the exact binary
187
+ contents of the file."""
188
+ try:
189
+ node = node.disambiguate(must_exist=1)
190
+ except SCons.Errors.UserError:
191
+ # There was nothing on disk with which to disambiguate
192
+ # this entry. Leave it as an Entry, but return a null
193
+ # string so calls to get_contents() in emitters and the
194
+ # like (e.g. in qt.py) don't have to disambiguate by hand
195
+ # or catch the exception.
196
+ return ''
197
+ else:
198
+ return _get_contents_map[node._func_get_contents](node)
199
+
200
+ def get_contents_dir(node):
201
+ """Return content signatures and names of all our children
202
+ separated by new-lines. Ensure that the nodes are sorted."""
203
+ contents = []
204
+ for n in sorted(node.children(), key=lambda t: t.name):
205
+ contents.append('%s %s\n' % (n.get_csig(), n.name))
206
+ return ''.join(contents)
207
+
208
+ def get_contents_file(node):
209
+ if not node.rexists():
210
+ return b''
211
+ fname = node.rfile().get_abspath()
212
+ try:
213
+ with open(fname, "rb") as fp:
214
+ contents = fp.read()
215
+ except EnvironmentError as e:
216
+ if not e.filename:
217
+ e.filename = fname
218
+ raise
219
+ return contents
220
+
221
+ _get_contents_map = {0 : get_contents_none,
222
+ 1 : get_contents_entry,
223
+ 2 : get_contents_dir,
224
+ 3 : get_contents_file}
225
+
226
+ def target_from_source_none(node, prefix, suffix, splitext):
227
+ raise NotImplementedError
228
+
229
+ def target_from_source_base(node, prefix, suffix, splitext):
230
+ return node.dir.Entry(prefix + splitext(node.name)[0] + suffix)
231
+
232
+ _target_from_source_map = {0 : target_from_source_none,
233
+ 1 : target_from_source_base}
234
+
235
+ #
236
+ # The new decider subsystem for Nodes
237
+ #
238
+ # We would set and overwrite the changed_since_last_build function
239
+ # before, but for being able to use slots (less memory!) we now have
240
+ # a dictionary of the different decider functions. Then in the Node
241
+ # subclasses we simply store the index to the decider that should be
242
+ # used by it.
243
+ #
244
+
245
+ #
246
+ # First, the single decider functions
247
+ #
248
+ def changed_since_last_build_node(node, target, prev_ni, repo_node=None):
249
+ """
250
+
251
+ Must be overridden in a specific subclass to return True if this
252
+ Node (a dependency) has changed since the last time it was used
253
+ to build the specified target. prev_ni is this Node's state (for
254
+ example, its file timestamp, length, maybe content signature)
255
+ as of the last time the target was built.
256
+
257
+ Note that this method is called through the dependency, not the
258
+ target, because a dependency Node must be able to use its own
259
+ logic to decide if it changed. For example, File Nodes need to
260
+ obey if we're configured to use timestamps, but Python Value Nodes
261
+ never use timestamps and always use the content. If this method
262
+ were called through the target, then each Node's implementation
263
+ of this method would have to have more complicated logic to
264
+ handle all the different Node types on which it might depend.
265
+ """
266
+ raise NotImplementedError
267
+
268
+
269
+ def changed_since_last_build_alias(node, target, prev_ni, repo_node=None):
270
+ cur_csig = node.get_csig()
271
+ try:
272
+ return cur_csig != prev_ni.csig
273
+ except AttributeError:
274
+ return 1
275
+
276
+
277
+ def changed_since_last_build_entry(node, target, prev_ni, repo_node=None):
278
+ node.disambiguate()
279
+ return _decider_map[node.changed_since_last_build](node, target, prev_ni, repo_node)
280
+
281
+
282
+ def changed_since_last_build_state_changed(node, target, prev_ni, repo_node=None):
283
+ return node.state != SCons.Node.up_to_date
284
+
285
+
286
+ def decide_source(node, target, prev_ni, repo_node=None):
287
+ return target.get_build_env().decide_source(node, target, prev_ni, repo_node)
288
+
289
+
290
+ def decide_target(node, target, prev_ni, repo_node=None):
291
+ return target.get_build_env().decide_target(node, target, prev_ni, repo_node)
292
+
293
+
294
+ def changed_since_last_build_python(node, target, prev_ni, repo_node=None):
295
+ cur_csig = node.get_csig()
296
+ try:
297
+ return cur_csig != prev_ni.csig
298
+ except AttributeError:
299
+ return 1
300
+
301
+
302
+ #
303
+ # Now, the mapping from indices to decider functions
304
+ #
305
+ _decider_map = {0 : changed_since_last_build_node,
306
+ 1 : changed_since_last_build_alias,
307
+ 2 : changed_since_last_build_entry,
308
+ 3 : changed_since_last_build_state_changed,
309
+ 4 : decide_source,
310
+ 5 : decide_target,
311
+ 6 : changed_since_last_build_python}
312
+
313
+ do_store_info = True
314
+
315
+ #
316
+ # The new store_info subsystem for Nodes
317
+ #
318
+ # We would set and overwrite the store_info function
319
+ # before, but for being able to use slots (less memory!) we now have
320
+ # a dictionary of the different functions. Then in the Node
321
+ # subclasses we simply store the index to the info method that should be
322
+ # used by it.
323
+ #
324
+
325
+ #
326
+ # First, the single info functions
327
+ #
328
+
329
+ def store_info_pass(node):
330
+ pass
331
+
332
+ def store_info_file(node):
333
+ # Merge our build information into the already-stored entry.
334
+ # This accommodates "chained builds" where a file that's a target
335
+ # in one build (SConstruct file) is a source in a different build.
336
+ # See test/chained-build.py for the use case.
337
+ if do_store_info:
338
+ node.dir.sconsign().store_info(node.name, node)
339
+
340
+
341
+ store_info_map = {0 : store_info_pass,
342
+ 1 : store_info_file}
343
+
344
+ # Classes for signature info for Nodes.
345
+
346
+ class NodeInfoBase:
347
+ """
348
+ The generic base class for signature information for a Node.
349
+
350
+ Node subclasses should subclass NodeInfoBase to provide their own
351
+ logic for dealing with their own Node-specific signature information.
352
+ """
353
+ __slots__ = ('__weakref__',)
354
+ current_version_id = 2
355
+
356
+ def update(self, node):
357
+ try:
358
+ field_list = self.field_list
359
+ except AttributeError:
360
+ return
361
+ for f in field_list:
362
+ try:
363
+ delattr(self, f)
364
+ except AttributeError:
365
+ pass
366
+ try:
367
+ func = getattr(node, 'get_' + f)
368
+ except AttributeError:
369
+ pass
370
+ else:
371
+ setattr(self, f, func())
372
+
373
+ def convert(self, node, val):
374
+ pass
375
+
376
+ def merge(self, other):
377
+ """
378
+ Merge the fields of another object into this object. Already existing
379
+ information is overwritten by the other instance's data.
380
+ WARNING: If a '__dict__' slot is added, it should be updated instead of
381
+ replaced.
382
+ """
383
+ state = other.__getstate__()
384
+ self.__setstate__(state)
385
+
386
+ def format(self, field_list=None, names=0):
387
+ if field_list is None:
388
+ try:
389
+ field_list = self.field_list
390
+ except AttributeError:
391
+ field_list = list(getattr(self, '__dict__', {}).keys())
392
+ for obj in type(self).mro():
393
+ for slot in getattr(obj, '__slots__', ()):
394
+ if slot not in ('__weakref__', '__dict__'):
395
+ field_list.append(slot)
396
+ field_list.sort()
397
+ fields = []
398
+ for field in field_list:
399
+ try:
400
+ f = getattr(self, field)
401
+ except AttributeError:
402
+ f = None
403
+ f = str(f)
404
+ if names:
405
+ f = field + ': ' + f
406
+ fields.append(f)
407
+ return fields
408
+
409
+ def __getstate__(self):
410
+ """
411
+ Return all fields that shall be pickled. Walk the slots in the class
412
+ hierarchy and add those to the state dictionary. If a '__dict__' slot is
413
+ available, copy all entries to the dictionary. Also include the version
414
+ id, which is fixed for all instances of a class.
415
+ """
416
+ state = getattr(self, '__dict__', {}).copy()
417
+ for obj in type(self).mro():
418
+ for name in getattr(obj,'__slots__',()):
419
+ if hasattr(self, name):
420
+ state[name] = getattr(self, name)
421
+
422
+ state['_version_id'] = self.current_version_id
423
+ try:
424
+ del state['__weakref__']
425
+ except KeyError:
426
+ pass
427
+ return state
428
+
429
+ def __setstate__(self, state):
430
+ """
431
+ Restore the attributes from a pickled state. The version is discarded.
432
+ """
433
+ # TODO check or discard version
434
+ del state['_version_id']
435
+
436
+ for key, value in state.items():
437
+ if key not in ('__weakref__',):
438
+ setattr(self, key, value)
439
+
440
+
441
+ class BuildInfoBase:
442
+ """
443
+ The generic base class for build information for a Node.
444
+
445
+ This is what gets stored in a .sconsign file for each target file.
446
+ It contains a NodeInfo instance for this node (signature information
447
+ that's specific to the type of Node) and direct attributes for the
448
+ generic build stuff we have to track: sources, explicit dependencies,
449
+ implicit dependencies, and action information.
450
+ """
451
+ __slots__ = ("bsourcesigs", "bdependsigs", "bimplicitsigs", "bactsig",
452
+ "bsources", "bdepends", "bact", "bimplicit", "__weakref__")
453
+ current_version_id = 2
454
+
455
+ def __init__(self):
456
+ # Create an object attribute from the class attribute so it ends up
457
+ # in the pickled data in the .sconsign file.
458
+ self.bsourcesigs = []
459
+ self.bdependsigs = []
460
+ self.bimplicitsigs = []
461
+ self.bactsig = None
462
+
463
+ def merge(self, other):
464
+ """
465
+ Merge the fields of another object into this object. Already existing
466
+ information is overwritten by the other instance's data.
467
+ WARNING: If a '__dict__' slot is added, it should be updated instead of
468
+ replaced.
469
+ """
470
+ state = other.__getstate__()
471
+ self.__setstate__(state)
472
+
473
+ def __getstate__(self):
474
+ """
475
+ Return all fields that shall be pickled. Walk the slots in the class
476
+ hierarchy and add those to the state dictionary. If a '__dict__' slot is
477
+ available, copy all entries to the dictionary. Also include the version
478
+ id, which is fixed for all instances of a class.
479
+ """
480
+ state = getattr(self, '__dict__', {}).copy()
481
+ for obj in type(self).mro():
482
+ for name in getattr(obj,'__slots__',()):
483
+ if hasattr(self, name):
484
+ state[name] = getattr(self, name)
485
+
486
+ state['_version_id'] = self.current_version_id
487
+ try:
488
+ del state['__weakref__']
489
+ except KeyError:
490
+ pass
491
+ return state
492
+
493
+ def __setstate__(self, state):
494
+ """
495
+ Restore the attributes from a pickled state.
496
+ """
497
+ # TODO check or discard version
498
+ del state['_version_id']
499
+ for key, value in state.items():
500
+ if key not in ('__weakref__',):
501
+ setattr(self, key, value)
502
+
503
+
504
+ class Node(object, metaclass=NoSlotsPyPy):
505
+ """The base Node class, for entities that we know how to
506
+ build, or use to build other Nodes.
507
+ """
508
+
509
+ __slots__ = ['sources',
510
+ 'sources_set',
511
+ 'target_peers',
512
+ '_specific_sources',
513
+ 'depends',
514
+ 'depends_set',
515
+ 'ignore',
516
+ 'ignore_set',
517
+ 'prerequisites',
518
+ 'implicit',
519
+ 'waiting_parents',
520
+ 'waiting_s_e',
521
+ 'ref_count',
522
+ 'wkids',
523
+ 'env',
524
+ 'state',
525
+ 'precious',
526
+ 'noclean',
527
+ 'nocache',
528
+ 'cached',
529
+ 'always_build',
530
+ 'includes',
531
+ 'attributes',
532
+ 'side_effect',
533
+ 'side_effects',
534
+ 'linked',
535
+ '_memo',
536
+ 'executor',
537
+ 'binfo',
538
+ 'ninfo',
539
+ 'builder',
540
+ 'is_explicit',
541
+ 'implicit_set',
542
+ 'changed_since_last_build',
543
+ 'store_info',
544
+ 'pseudo',
545
+ '_tags',
546
+ '_func_is_derived',
547
+ '_func_exists',
548
+ '_func_rexists',
549
+ '_func_get_contents',
550
+ '_func_target_from_source']
551
+
552
+ class Attrs:
553
+ __slots__ = ('shared', '__dict__')
554
+
555
+
556
+ def __init__(self):
557
+ if SCons.Debug.track_instances: logInstanceCreation(self, 'Node.Node')
558
+ # Note that we no longer explicitly initialize a self.builder
559
+ # attribute to None here. That's because the self.builder
560
+ # attribute may be created on-the-fly later by a subclass (the
561
+ # canonical example being a builder to fetch a file from a
562
+ # source code system like CVS or Subversion).
563
+
564
+ # Each list of children that we maintain is accompanied by a
565
+ # dictionary used to look up quickly whether a node is already
566
+ # present in the list. Empirical tests showed that it was
567
+ # fastest to maintain them as side-by-side Node attributes in
568
+ # this way, instead of wrapping up each list+dictionary pair in
569
+ # a class. (Of course, we could always still do that in the
570
+ # future if we had a good reason to...).
571
+ self.sources = [] # source files used to build node
572
+ self.sources_set = set()
573
+ self._specific_sources = False
574
+ self.depends = [] # explicit dependencies (from Depends)
575
+ self.depends_set = set()
576
+ self.ignore = [] # dependencies to ignore
577
+ self.ignore_set = set()
578
+ self.prerequisites = None
579
+ self.implicit = None # implicit (scanned) dependencies (None means not scanned yet)
580
+ self.waiting_parents = set()
581
+ self.waiting_s_e = set()
582
+ self.ref_count = 0
583
+ self.wkids = None # Kids yet to walk, when it's an array
584
+
585
+ self.env = None
586
+ self.state = no_state
587
+ self.precious = None
588
+ self.pseudo = False
589
+ self.noclean = 0
590
+ self.nocache = 0
591
+ self.cached = 0 # is this node pulled from cache?
592
+ self.always_build = None
593
+ self.includes = None
594
+ self.attributes = self.Attrs() # Generic place to stick information about the Node.
595
+ self.side_effect = 0 # true iff this node is a side effect
596
+ self.side_effects = [] # the side effects of building this target
597
+ self.linked = 0 # is this node linked to the variant directory?
598
+ self.changed_since_last_build = 0
599
+ self.store_info = 0
600
+ self._tags = None
601
+ self._func_is_derived = 1
602
+ self._func_exists = 1
603
+ self._func_rexists = 1
604
+ self._func_get_contents = 0
605
+ self._func_target_from_source = 0
606
+ self.ninfo = None
607
+
608
+ self.clear_memoized_values()
609
+
610
+ # Let the interface in which the build engine is embedded
611
+ # annotate this Node with its own info (like a description of
612
+ # what line in what file created the node, for example).
613
+ Annotate(self)
614
+
615
+ def disambiguate(self, must_exist=None):
616
+ return self
617
+
618
+ def get_suffix(self):
619
+ return ''
620
+
621
+ @SCons.Memoize.CountMethodCall
622
+ def get_build_env(self):
623
+ """Fetch the appropriate Environment to build this node.
624
+ """
625
+ try:
626
+ return self._memo['get_build_env']
627
+ except KeyError:
628
+ pass
629
+ result = self.get_executor().get_build_env()
630
+ self._memo['get_build_env'] = result
631
+ return result
632
+
633
+ def get_build_scanner_path(self, scanner):
634
+ """Fetch the appropriate scanner path for this node."""
635
+ return self.get_executor().get_build_scanner_path(scanner)
636
+
637
+ def set_executor(self, executor):
638
+ """Set the action executor for this node."""
639
+ self.executor = executor
640
+
641
+ def get_executor(self, create=1):
642
+ """Fetch the action executor for this node. Create one if
643
+ there isn't already one, and requested to do so."""
644
+ try:
645
+ executor = self.executor
646
+ except AttributeError:
647
+ if not create:
648
+ raise
649
+ try:
650
+ act = self.builder.action
651
+ except AttributeError:
652
+ executor = SCons.Executor.Null(targets=[self])
653
+ else:
654
+ executor = SCons.Executor.Executor(act,
655
+ self.env or self.builder.env,
656
+ [self.builder.overrides],
657
+ [self],
658
+ self.sources)
659
+ self.executor = executor
660
+ return executor
661
+
662
+ def executor_cleanup(self):
663
+ """Let the executor clean up any cached information."""
664
+ try:
665
+ executor = self.get_executor(create=None)
666
+ except AttributeError:
667
+ pass
668
+ else:
669
+ if executor is not None:
670
+ executor.cleanup()
671
+
672
+ def reset_executor(self):
673
+ """Remove cached executor; forces recompute when needed."""
674
+ try:
675
+ delattr(self, 'executor')
676
+ except AttributeError:
677
+ pass
678
+
679
+ def push_to_cache(self):
680
+ """Try to push a node into a cache
681
+ """
682
+ pass
683
+
684
+ def retrieve_from_cache(self):
685
+ """Try to retrieve the node's content from a cache
686
+
687
+ This method is called from multiple threads in a parallel build,
688
+ so only do thread safe stuff here. Do thread unsafe stuff in
689
+ built().
690
+
691
+ Returns true if the node was successfully retrieved.
692
+ """
693
+ return 0
694
+
695
+ #
696
+ # Taskmaster interface subsystem
697
+ #
698
+
699
+ def make_ready(self):
700
+ """Get a Node ready for evaluation.
701
+
702
+ This is called before the Taskmaster decides if the Node is
703
+ up-to-date or not. Overriding this method allows for a Node
704
+ subclass to be disambiguated if necessary, or for an implicit
705
+ source builder to be attached.
706
+ """
707
+ pass
708
+
709
+ def prepare(self):
710
+ """Prepare for this Node to be built.
711
+
712
+ This is called after the Taskmaster has decided that the Node
713
+ is out-of-date and must be rebuilt, but before actually calling
714
+ the method to build the Node.
715
+
716
+ This default implementation checks that explicit or implicit
717
+ dependencies either exist or are derived, and initializes the
718
+ BuildInfo structure that will hold the information about how
719
+ this node is, uh, built.
720
+
721
+ (The existence of source files is checked separately by the
722
+ Executor, which aggregates checks for all of the targets built
723
+ by a specific action.)
724
+
725
+ Overriding this method allows for for a Node subclass to remove
726
+ the underlying file from the file system. Note that subclass
727
+ methods should call this base class method to get the child
728
+ check and the BuildInfo structure.
729
+ """
730
+ if self.depends is not None:
731
+ for d in self.depends:
732
+ if d.missing():
733
+ msg = "Explicit dependency `%s' not found, needed by target `%s'."
734
+ raise SCons.Errors.StopError(msg % (d, self))
735
+ if self.implicit is not None:
736
+ for i in self.implicit:
737
+ if i.missing():
738
+ msg = "Implicit dependency `%s' not found, needed by target `%s'."
739
+ raise SCons.Errors.StopError(msg % (i, self))
740
+ self.binfo = self.get_binfo()
741
+
742
+ def build(self, **kw):
743
+ """Actually build the node.
744
+
745
+ This is called by the Taskmaster after it's decided that the
746
+ Node is out-of-date and must be rebuilt, and after the prepare()
747
+ method has gotten everything, uh, prepared.
748
+
749
+ This method is called from multiple threads in a parallel build,
750
+ so only do thread safe stuff here. Do thread unsafe stuff
751
+ in built().
752
+
753
+ """
754
+ try:
755
+ self.get_executor()(self, **kw)
756
+ except SCons.Errors.BuildError as e:
757
+ e.node = self
758
+ raise
759
+
760
+ def built(self):
761
+ """Called just after this node is successfully built."""
762
+
763
+ # Clear the implicit dependency caches of any Nodes
764
+ # waiting for this Node to be built.
765
+ for parent in self.waiting_parents:
766
+ parent.implicit = None
767
+
768
+ # Handle issue where builder emits more than one target and
769
+ # the source file for the builder is generated.
770
+ # in that case only the first target was getting it's .implicit
771
+ # cleared when the source file is built (second scan).
772
+ # leaving only partial implicits from scan before source file is generated
773
+ # typically the compiler only. Then scanned files are appended
774
+ # This is persisted to sconsign and rebuild causes false rebuilds
775
+ # because the ordering of the implicit list then changes to what it
776
+ # should have been.
777
+ # This is at least the following bugs
778
+ # https://github.com/SCons/scons/issues/2811
779
+ # https://jira.mongodb.org/browse/SERVER-33111
780
+ try:
781
+ for peer in parent.target_peers:
782
+ peer.implicit = None
783
+ except AttributeError:
784
+ pass
785
+
786
+
787
+ self.clear()
788
+
789
+ if self.pseudo:
790
+ if self.exists():
791
+ raise SCons.Errors.UserError("Pseudo target " + str(self) + " must not exist")
792
+ else:
793
+ if not self.exists() and do_store_info:
794
+ SCons.Warnings.warn(SCons.Warnings.TargetNotBuiltWarning,
795
+ "Cannot find target " + str(self) + " after building")
796
+ self.ninfo.update(self)
797
+
798
+ def visited(self):
799
+ """Called just after this node has been visited (with or
800
+ without a build)."""
801
+ try:
802
+ binfo = self.binfo
803
+ except AttributeError:
804
+ # Apparently this node doesn't need build info, so
805
+ # don't bother calculating or storing it.
806
+ pass
807
+ else:
808
+ self.ninfo.update(self)
809
+ SCons.Node.store_info_map[self.store_info](self)
810
+
811
+ def release_target_info(self):
812
+ """Called just after this node has been marked
813
+ up-to-date or was built completely.
814
+
815
+ This is where we try to release as many target node infos
816
+ as possible for clean builds and update runs, in order
817
+ to minimize the overall memory consumption.
818
+
819
+ By purging attributes that aren't needed any longer after
820
+ a Node (=File) got built, we don't have to care that much how
821
+ many KBytes a Node actually requires...as long as we free
822
+ the memory shortly afterwards.
823
+
824
+ @see: built() and File.release_target_info()
825
+ """
826
+ pass
827
+
828
+ def add_to_waiting_s_e(self, node):
829
+ self.waiting_s_e.add(node)
830
+
831
+ def add_to_waiting_parents(self, node):
832
+ """
833
+ Returns the number of nodes added to our waiting parents list:
834
+ 1 if we add a unique waiting parent, 0 if not. (Note that the
835
+ returned values are intended to be used to increment a reference
836
+ count, so don't think you can "clean up" this function by using
837
+ True and False instead...)
838
+ """
839
+ wp = self.waiting_parents
840
+ if node in wp:
841
+ return 0
842
+ wp.add(node)
843
+ return 1
844
+
845
+ def postprocess(self):
846
+ """Clean up anything we don't need to hang onto after we've
847
+ been built."""
848
+ self.executor_cleanup()
849
+ self.waiting_parents = set()
850
+
851
+ def clear(self):
852
+ """Completely clear a Node of all its cached state (so that it
853
+ can be re-evaluated by interfaces that do continuous integration
854
+ builds).
855
+ """
856
+ # The del_binfo() call here isn't necessary for normal execution,
857
+ # but is for interactive mode, where we might rebuild the same
858
+ # target and need to start from scratch.
859
+ self.del_binfo()
860
+ self.clear_memoized_values()
861
+ self.ninfo = self.new_ninfo()
862
+ self.executor_cleanup()
863
+ for attr in ['cachedir_csig', 'cachesig', 'contentsig']:
864
+ try:
865
+ delattr(self, attr)
866
+ except AttributeError:
867
+ pass
868
+ self.cached = 0
869
+ self.includes = None
870
+
871
+ def clear_memoized_values(self):
872
+ self._memo = {}
873
+
874
+ def builder_set(self, builder):
875
+ self.builder = builder
876
+ try:
877
+ del self.executor
878
+ except AttributeError:
879
+ pass
880
+
881
+ def has_builder(self):
882
+ """Return whether this Node has a builder or not.
883
+
884
+ In Boolean tests, this turns out to be a *lot* more efficient
885
+ than simply examining the builder attribute directly ("if
886
+ node.builder: ..."). When the builder attribute is examined
887
+ directly, it ends up calling __getattr__ for both the __len__
888
+ and __bool__ attributes on instances of our Builder Proxy
889
+ class(es), generating a bazillion extra calls and slowing
890
+ things down immensely.
891
+ """
892
+ try:
893
+ b = self.builder
894
+ except AttributeError:
895
+ # There was no explicit builder for this Node, so initialize
896
+ # the self.builder attribute to None now.
897
+ b = self.builder = None
898
+ return b is not None
899
+
900
+ def set_explicit(self, is_explicit):
901
+ self.is_explicit = is_explicit
902
+
903
+ def has_explicit_builder(self):
904
+ """Return whether this Node has an explicit builder
905
+
906
+ This allows an internal Builder created by SCons to be marked
907
+ non-explicit, so that it can be overridden by an explicit
908
+ builder that the user supplies (the canonical example being
909
+ directories)."""
910
+ try:
911
+ return self.is_explicit
912
+ except AttributeError:
913
+ self.is_explicit = None
914
+ return self.is_explicit
915
+
916
+ def get_builder(self, default_builder=None):
917
+ """Return the set builder, or a specified default value"""
918
+ try:
919
+ return self.builder
920
+ except AttributeError:
921
+ return default_builder
922
+
923
+ multiple_side_effect_has_builder = has_builder
924
+
925
+ def is_derived(self):
926
+ """
927
+ Returns true if this node is derived (i.e. built).
928
+
929
+ This should return true only for nodes whose path should be in
930
+ the variant directory when duplicate=0 and should contribute their build
931
+ signatures when they are used as source files to other derived files. For
932
+ example: source with source builders are not derived in this sense,
933
+ and hence should not return true.
934
+ """
935
+ return _is_derived_map[self._func_is_derived](self)
936
+
937
+ def is_sconscript(self):
938
+ """ Returns true if this node is an sconscript """
939
+ return self in SConscriptNodes
940
+
941
+ def is_conftest(self):
942
+ """ Returns true if this node is an conftest node"""
943
+ try:
944
+ self.attributes.conftest_node
945
+ except AttributeError:
946
+ return False
947
+ return True
948
+
949
+ def check_attributes(self, name):
950
+ """ Simple API to check if the node.attributes for name has been set"""
951
+ return getattr(getattr(self, "attributes", None), name, None)
952
+
953
+
954
+ def alter_targets(self):
955
+ """Return a list of alternate targets for this Node.
956
+ """
957
+ return [], None
958
+
959
+ def get_found_includes(self, env, scanner, path):
960
+ """Return the scanned include lines (implicit dependencies)
961
+ found in this node.
962
+
963
+ The default is no implicit dependencies. We expect this method
964
+ to be overridden by any subclass that can be scanned for
965
+ implicit dependencies.
966
+ """
967
+ return []
968
+
969
+ def get_implicit_deps(self, env, initial_scanner, path_func, kw = {}):
970
+ """Return a list of implicit dependencies for this node.
971
+
972
+ This method exists to handle recursive invocation of the scanner
973
+ on the implicit dependencies returned by the scanner, if the
974
+ scanner's recursive flag says that we should.
975
+ """
976
+ nodes = [self]
977
+ seen = set(nodes)
978
+ dependencies = []
979
+ path_memo = {}
980
+
981
+ root_node_scanner = self._get_scanner(env, initial_scanner, None, kw)
982
+
983
+ while nodes:
984
+ node = nodes.pop(0)
985
+
986
+ scanner = node._get_scanner(env, initial_scanner, root_node_scanner, kw)
987
+ if not scanner:
988
+ continue
989
+
990
+ try:
991
+ path = path_memo[scanner]
992
+ except KeyError:
993
+ path = path_func(scanner)
994
+ path_memo[scanner] = path
995
+
996
+ included_deps = [x for x in node.get_found_includes(env, scanner, path) if x not in seen]
997
+ if included_deps:
998
+ dependencies.extend(included_deps)
999
+ seen.update(included_deps)
1000
+ nodes.extend(scanner.recurse_nodes(included_deps))
1001
+
1002
+ return dependencies
1003
+
1004
+ def _get_scanner(self, env, initial_scanner, root_node_scanner, kw):
1005
+ if initial_scanner:
1006
+ # handle explicit scanner case
1007
+ scanner = initial_scanner.select(self)
1008
+ else:
1009
+ # handle implicit scanner case
1010
+ scanner = self.get_env_scanner(env, kw)
1011
+ if scanner:
1012
+ scanner = scanner.select(self)
1013
+
1014
+ if not scanner:
1015
+ # no scanner could be found for the given node's scanner key;
1016
+ # thus, make an attempt at using a default.
1017
+ scanner = root_node_scanner
1018
+
1019
+ return scanner
1020
+
1021
+ def get_env_scanner(self, env, kw={}):
1022
+ return env.get_scanner(self.scanner_key())
1023
+
1024
+ def get_target_scanner(self):
1025
+ return self.builder.target_scanner
1026
+
1027
+ def get_source_scanner(self, node):
1028
+ """Fetch the source scanner for the specified node
1029
+
1030
+ NOTE: "self" is the target being built, "node" is
1031
+ the source file for which we want to fetch the scanner.
1032
+
1033
+ Implies self.has_builder() is true; again, expect to only be
1034
+ called from locations where this is already verified.
1035
+
1036
+ This function may be called very often; it attempts to cache
1037
+ the scanner found to improve performance.
1038
+ """
1039
+ scanner = None
1040
+ try:
1041
+ scanner = self.builder.source_scanner
1042
+ except AttributeError:
1043
+ pass
1044
+ if not scanner:
1045
+ # The builder didn't have an explicit scanner, so go look up
1046
+ # a scanner from env['SCANNERS'] based on the node's scanner
1047
+ # key (usually the file extension).
1048
+ scanner = self.get_env_scanner(self.get_build_env())
1049
+ if scanner:
1050
+ scanner = scanner.select(node)
1051
+ return scanner
1052
+
1053
+ def add_to_implicit(self, deps):
1054
+ if not hasattr(self, 'implicit') or self.implicit is None:
1055
+ self.implicit = []
1056
+ self.implicit_set = set()
1057
+ self._children_reset()
1058
+ self._add_child(self.implicit, self.implicit_set, deps)
1059
+
1060
+ def scan(self):
1061
+ """Scan this node's dependents for implicit dependencies."""
1062
+ # Don't bother scanning non-derived files, because we don't
1063
+ # care what their dependencies are.
1064
+ # Don't scan again, if we already have scanned.
1065
+ if self.implicit is not None:
1066
+ return
1067
+ self.implicit = []
1068
+ self.implicit_set = set()
1069
+ self._children_reset()
1070
+ if not self.has_builder():
1071
+ return
1072
+
1073
+ build_env = self.get_build_env()
1074
+ executor = self.get_executor()
1075
+
1076
+ # Here's where we implement --implicit-cache.
1077
+ if implicit_cache and not implicit_deps_changed:
1078
+ implicit = self.get_stored_implicit()
1079
+ if implicit is not None:
1080
+ # We now add the implicit dependencies returned from the
1081
+ # stored .sconsign entry to have already been converted
1082
+ # to Nodes for us. (We used to run them through a
1083
+ # source_factory function here.)
1084
+
1085
+ # Update all of the targets with them. This
1086
+ # essentially short-circuits an N*M scan of the
1087
+ # sources for each individual target, which is a hell
1088
+ # of a lot more efficient.
1089
+ for tgt in executor.get_all_targets():
1090
+ tgt.add_to_implicit(implicit)
1091
+
1092
+ if implicit_deps_unchanged or self.is_up_to_date():
1093
+ return
1094
+ # one of this node's sources has changed,
1095
+ # so we must recalculate the implicit deps for all targets
1096
+ for tgt in executor.get_all_targets():
1097
+ tgt.implicit = []
1098
+ tgt.implicit_set = set()
1099
+
1100
+ # Have the executor scan the sources.
1101
+ executor.scan_sources(self.builder.source_scanner)
1102
+
1103
+ # If there's a target scanner, have the executor scan the target
1104
+ # node itself and associated targets that might be built.
1105
+ scanner = self.get_target_scanner()
1106
+ if scanner:
1107
+ executor.scan_targets(scanner)
1108
+
1109
+ def scanner_key(self):
1110
+ return None
1111
+
1112
+ def select_scanner(self, scanner):
1113
+ """Selects a scanner for this Node.
1114
+
1115
+ This is a separate method so it can be overridden by Node
1116
+ subclasses (specifically, Node.FS.Dir) that *must* use their
1117
+ own Scanner and don't select one the Scanner.Selector that's
1118
+ configured for the target.
1119
+ """
1120
+ return scanner.select(self)
1121
+
1122
+ def env_set(self, env, safe=0):
1123
+ if safe and self.env:
1124
+ return
1125
+ self.env = env
1126
+
1127
+ #
1128
+ # SIGNATURE SUBSYSTEM
1129
+ #
1130
+
1131
+ NodeInfo = NodeInfoBase
1132
+ BuildInfo = BuildInfoBase
1133
+
1134
+ def new_ninfo(self):
1135
+ ninfo = self.NodeInfo()
1136
+ return ninfo
1137
+
1138
+ def get_ninfo(self):
1139
+ if self.ninfo is not None:
1140
+ return self.ninfo
1141
+ self.ninfo = self.new_ninfo()
1142
+ return self.ninfo
1143
+
1144
+ def new_binfo(self):
1145
+ binfo = self.BuildInfo()
1146
+ return binfo
1147
+
1148
+ def get_binfo(self):
1149
+ """
1150
+ Fetch a node's build information.
1151
+
1152
+ node - the node whose sources will be collected
1153
+ cache - alternate node to use for the signature cache
1154
+ returns - the build signature
1155
+
1156
+ This no longer handles the recursive descent of the
1157
+ node's children's signatures. We expect that they're
1158
+ already built and updated by someone else, if that's
1159
+ what's wanted.
1160
+ """
1161
+ try:
1162
+ return self.binfo
1163
+ except AttributeError:
1164
+ pass
1165
+
1166
+ binfo = self.new_binfo()
1167
+ self.binfo = binfo
1168
+
1169
+ executor = self.get_executor()
1170
+ ignore_set = self.ignore_set
1171
+
1172
+ if self.has_builder():
1173
+ binfo.bact = str(executor)
1174
+ binfo.bactsig = hash_signature(executor.get_contents())
1175
+
1176
+ if self._specific_sources:
1177
+ sources = [s for s in self.sources if s not in ignore_set]
1178
+
1179
+ else:
1180
+ sources = executor.get_unignored_sources(self, self.ignore)
1181
+
1182
+ seen = set()
1183
+ binfo.bsources = [s for s in sources if s not in seen and not seen.add(s)]
1184
+ binfo.bsourcesigs = [s.get_ninfo() for s in binfo.bsources]
1185
+
1186
+ binfo.bdepends = [d for d in self.depends if d not in ignore_set]
1187
+ binfo.bdependsigs = [d.get_ninfo() for d in self.depends]
1188
+
1189
+ # Because self.implicit is initialized to None (and not empty list [])
1190
+ # we have to handle this case
1191
+ if not self.implicit:
1192
+ binfo.bimplicit = []
1193
+ binfo.bimplicitsigs = []
1194
+ else:
1195
+ binfo.bimplicit = [i for i in self.implicit if i not in ignore_set]
1196
+ binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit]
1197
+
1198
+ return binfo
1199
+
1200
+ def del_binfo(self):
1201
+ """Delete the build info from this node."""
1202
+ try:
1203
+ delattr(self, 'binfo')
1204
+ except AttributeError:
1205
+ pass
1206
+
1207
+ def get_csig(self):
1208
+ try:
1209
+ return self.ninfo.csig
1210
+ except AttributeError:
1211
+ ninfo = self.get_ninfo()
1212
+ ninfo.csig = hash_signature(self.get_contents())
1213
+ return self.ninfo.csig
1214
+
1215
+ def get_cachedir_csig(self):
1216
+ return self.get_csig()
1217
+
1218
+ def get_stored_info(self):
1219
+ return None
1220
+
1221
+ def get_stored_implicit(self):
1222
+ """Fetch the stored implicit dependencies"""
1223
+ return None
1224
+
1225
+ #
1226
+ #
1227
+ #
1228
+
1229
+ def set_precious(self, precious = 1):
1230
+ """Set the Node's precious value."""
1231
+ self.precious = precious
1232
+
1233
+ def set_pseudo(self, pseudo = True):
1234
+ """Set the Node's precious value."""
1235
+ self.pseudo = pseudo
1236
+
1237
+ def set_noclean(self, noclean = 1):
1238
+ """Set the Node's noclean value."""
1239
+ # Make sure noclean is an integer so the --debug=stree
1240
+ # output in Util.py can use it as an index.
1241
+ self.noclean = noclean and 1 or 0
1242
+
1243
+ def set_nocache(self, nocache = 1):
1244
+ """Set the Node's nocache value."""
1245
+ # Make sure nocache is an integer so the --debug=stree
1246
+ # output in Util.py can use it as an index.
1247
+ self.nocache = nocache and 1 or 0
1248
+
1249
+ def set_always_build(self, always_build = 1):
1250
+ """Set the Node's always_build value."""
1251
+ self.always_build = always_build
1252
+
1253
+ def exists(self):
1254
+ """Does this node exists?"""
1255
+ return _exists_map[self._func_exists](self)
1256
+
1257
+ def rexists(self):
1258
+ """Does this node exist locally or in a repository?"""
1259
+ # There are no repositories by default:
1260
+ return _rexists_map[self._func_rexists](self)
1261
+
1262
+ def get_contents(self):
1263
+ """Fetch the contents of the entry."""
1264
+ return _get_contents_map[self._func_get_contents](self)
1265
+
1266
+ def missing(self):
1267
+ return not self.is_derived() and \
1268
+ not self.linked and \
1269
+ not self.rexists()
1270
+
1271
+ def remove(self):
1272
+ """Remove this Node: no-op by default."""
1273
+ return None
1274
+
1275
+ def add_dependency(self, depend):
1276
+ """Adds dependencies."""
1277
+ try:
1278
+ self._add_child(self.depends, self.depends_set, depend)
1279
+ except TypeError as e:
1280
+ e = e.args[0]
1281
+ if is_List(e):
1282
+ s = list(map(str, e))
1283
+ else:
1284
+ s = str(e)
1285
+ raise SCons.Errors.UserError("attempted to add a non-Node dependency to %s:\n\t%s is a %s, not a Node" % (str(self), s, type(e)))
1286
+
1287
+ def add_prerequisite(self, prerequisite):
1288
+ """Adds prerequisites"""
1289
+ if self.prerequisites is None:
1290
+ self.prerequisites = UniqueList()
1291
+ self.prerequisites.extend(prerequisite)
1292
+ self._children_reset()
1293
+
1294
+ def add_ignore(self, depend):
1295
+ """Adds dependencies to ignore."""
1296
+ try:
1297
+ self._add_child(self.ignore, self.ignore_set, depend)
1298
+ except TypeError as e:
1299
+ e = e.args[0]
1300
+ if is_List(e):
1301
+ s = list(map(str, e))
1302
+ else:
1303
+ s = str(e)
1304
+ raise SCons.Errors.UserError("attempted to ignore a non-Node dependency of %s:\n\t%s is a %s, not a Node" % (str(self), s, type(e)))
1305
+
1306
+ def add_source(self, source):
1307
+ """Adds sources."""
1308
+ if self._specific_sources:
1309
+ return
1310
+ try:
1311
+ self._add_child(self.sources, self.sources_set, source)
1312
+ except TypeError as e:
1313
+ e = e.args[0]
1314
+ if is_List(e):
1315
+ s = list(map(str, e))
1316
+ else:
1317
+ s = str(e)
1318
+ raise SCons.Errors.UserError("attempted to add a non-Node as source of %s:\n\t%s is a %s, not a Node" % (str(self), s, type(e)))
1319
+
1320
+ def _add_child(self, collection, set, child):
1321
+ """Adds 'child' to 'collection', first checking 'set' to see if it's
1322
+ already present."""
1323
+ added = None
1324
+ for c in child:
1325
+ if c not in set:
1326
+ set.add(c)
1327
+ collection.append(c)
1328
+ added = 1
1329
+ if added:
1330
+ self._children_reset()
1331
+
1332
+ def set_specific_source(self, source):
1333
+ self.add_source(source)
1334
+ self._specific_sources = True
1335
+
1336
+ def add_wkid(self, wkid):
1337
+ """Add a node to the list of kids waiting to be evaluated"""
1338
+ if self.wkids is not None:
1339
+ self.wkids.append(wkid)
1340
+
1341
+ def _children_reset(self):
1342
+ self.clear_memoized_values()
1343
+ # We need to let the Executor clear out any calculated
1344
+ # build info that it's cached so we can re-calculate it.
1345
+ self.executor_cleanup()
1346
+
1347
+ @SCons.Memoize.CountMethodCall
1348
+ def _children_get(self):
1349
+ try:
1350
+ return self._memo['_children_get']
1351
+ except KeyError:
1352
+ pass
1353
+
1354
+ # The return list may contain duplicate Nodes, especially in
1355
+ # source trees where there are a lot of repeated #includes
1356
+ # of a tangle of .h files. Profiling shows, however, that
1357
+ # eliminating the duplicates with a brute-force approach that
1358
+ # preserves the order (that is, something like:
1359
+ #
1360
+ # u = []
1361
+ # for n in list:
1362
+ # if n not in u:
1363
+ # u.append(n)"
1364
+ #
1365
+ # takes more cycles than just letting the underlying methods
1366
+ # hand back cached values if a Node's information is requested
1367
+ # multiple times. (Other methods of removing duplicates, like
1368
+ # using dictionary keys, lose the order, and the only ordered
1369
+ # dictionary patterns I found all ended up using "not in"
1370
+ # internally anyway...)
1371
+ if self.ignore_set:
1372
+ iter = chain.from_iterable([_f for _f in [self.sources, self.depends, self.implicit] if _f])
1373
+
1374
+ children = []
1375
+ for i in iter:
1376
+ if i not in self.ignore_set:
1377
+ children.append(i)
1378
+ else:
1379
+ children = self.all_children(scan=0)
1380
+
1381
+ self._memo['_children_get'] = children
1382
+ return children
1383
+
1384
+ def all_children(self, scan=1):
1385
+ """Return a list of all the node's direct children."""
1386
+ if scan:
1387
+ self.scan()
1388
+
1389
+ # The return list may contain duplicate Nodes, especially in
1390
+ # source trees where there are a lot of repeated #includes
1391
+ # of a tangle of .h files. Profiling shows, however, that
1392
+ # eliminating the duplicates with a brute-force approach that
1393
+ # preserves the order (that is, something like:
1394
+ #
1395
+ # u = []
1396
+ # for n in list:
1397
+ # if n not in u:
1398
+ # u.append(n)"
1399
+ #
1400
+ # takes more cycles than just letting the underlying methods
1401
+ # hand back cached values if a Node's information is requested
1402
+ # multiple times. (Other methods of removing duplicates, like
1403
+ # using dictionary keys, lose the order, and the only ordered
1404
+ # dictionary patterns I found all ended up using "not in"
1405
+ # internally anyway...)
1406
+ return list(chain.from_iterable([_f for _f in [self.sources, self.depends, self.implicit] if _f]))
1407
+
1408
+ def children(self, scan=1):
1409
+ """Return a list of the node's direct children, minus those
1410
+ that are ignored by this node."""
1411
+ if scan:
1412
+ self.scan()
1413
+ return self._children_get()
1414
+
1415
+ def set_state(self, state):
1416
+ self.state = state
1417
+
1418
+ def get_state(self):
1419
+ return self.state
1420
+
1421
+ def get_env(self):
1422
+ env = self.env
1423
+ if not env:
1424
+ import SCons.Defaults
1425
+ env = SCons.Defaults.DefaultEnvironment()
1426
+ return env
1427
+
1428
+ def Decider(self, function):
1429
+ foundkey = None
1430
+ for k, v in _decider_map.items():
1431
+ if v == function:
1432
+ foundkey = k
1433
+ break
1434
+ if not foundkey:
1435
+ foundkey = len(_decider_map)
1436
+ _decider_map[foundkey] = function
1437
+ self.changed_since_last_build = foundkey
1438
+
1439
+ def Tag(self, key, value):
1440
+ """ Add a user-defined tag. """
1441
+ if not self._tags:
1442
+ self._tags = {}
1443
+ self._tags[key] = value
1444
+
1445
+ def GetTag(self, key):
1446
+ """ Return a user-defined tag. """
1447
+ if not self._tags:
1448
+ return None
1449
+ return self._tags.get(key, None)
1450
+
1451
+ def changed(self, node=None, allowcache=False):
1452
+ """
1453
+ Returns if the node is up-to-date with respect to the BuildInfo
1454
+ stored last time it was built. The default behavior is to compare
1455
+ it against our own previously stored BuildInfo, but the stored
1456
+ BuildInfo from another Node (typically one in a Repository)
1457
+ can be used instead.
1458
+
1459
+ Note that we now *always* check every dependency. We used to
1460
+ short-circuit the check by returning as soon as we detected
1461
+ any difference, but we now rely on checking every dependency
1462
+ to make sure that any necessary Node information (for example,
1463
+ the content signature of an #included .h file) is updated.
1464
+
1465
+ The allowcache option was added for supporting the early
1466
+ release of the executor/builder structures, right after
1467
+ a File target was built. When set to true, the return
1468
+ value of this changed method gets cached for File nodes.
1469
+ Like this, the executor isn't needed any longer for subsequent
1470
+ calls to changed().
1471
+
1472
+ @see: FS.File.changed(), FS.File.release_target_info()
1473
+ """
1474
+ t = 0
1475
+ if t: Trace('changed(%s [%s], %s)' % (self, classname(self), node))
1476
+ if node is None:
1477
+ node = self
1478
+
1479
+ result = False
1480
+
1481
+ bi = node.get_stored_info().binfo
1482
+ then = bi.bsourcesigs + bi.bdependsigs + bi.bimplicitsigs
1483
+ children = self.children()
1484
+
1485
+ diff = len(children) - len(then)
1486
+ if diff:
1487
+ # The old and new dependency lists are different lengths.
1488
+ # This always indicates that the Node must be rebuilt.
1489
+ # We also extend the old dependency list with enough None
1490
+ # entries to equal the new dependency list, for the benefit
1491
+ # of the loop below that updates node information.
1492
+ then.extend([None] * diff)
1493
+ if t: Trace(': old %s new %s' % (len(then), len(children)))
1494
+ result = True
1495
+
1496
+ for child, prev_ni in zip(children, then):
1497
+ if _decider_map[child.changed_since_last_build](child, self, prev_ni, node):
1498
+ if t: Trace(': %s changed' % child)
1499
+ result = True
1500
+
1501
+ if self.has_builder():
1502
+ contents = self.get_executor().get_contents()
1503
+ newsig = hash_signature(contents)
1504
+ if bi.bactsig != newsig:
1505
+ if t: Trace(': bactsig %s != newsig %s' % (bi.bactsig, newsig))
1506
+ result = True
1507
+
1508
+ if not result:
1509
+ if t: Trace(': up to date')
1510
+
1511
+ if t: Trace('\n')
1512
+
1513
+ return result
1514
+
1515
+ def is_up_to_date(self):
1516
+ """Default check for whether the Node is current: unknown Node
1517
+ subtypes are always out of date, so they will always get built."""
1518
+ return None
1519
+
1520
+ def children_are_up_to_date(self):
1521
+ """Alternate check for whether the Node is current: If all of
1522
+ our children were up-to-date, then this Node was up-to-date, too.
1523
+
1524
+ The SCons.Node.Alias and SCons.Node.Python.Value subclasses
1525
+ rebind their current() method to this method."""
1526
+ # Allow the children to calculate their signatures.
1527
+ self.binfo = self.get_binfo()
1528
+ if self.always_build:
1529
+ return None
1530
+ state = 0
1531
+ for kid in self.children(None):
1532
+ s = kid.get_state()
1533
+ if s and (not state or s > state):
1534
+ state = s
1535
+ return (state == 0 or state == SCons.Node.up_to_date)
1536
+
1537
+ def is_literal(self):
1538
+ """Always pass the string representation of a Node to
1539
+ the command interpreter literally."""
1540
+ return 1
1541
+
1542
+ def render_include_tree(self):
1543
+ """
1544
+ Return a text representation, suitable for displaying to the
1545
+ user, of the include tree for the sources of this node.
1546
+ """
1547
+ if self.is_derived():
1548
+ env = self.get_build_env()
1549
+ if env:
1550
+ for s in self.sources:
1551
+ scanner = self.get_source_scanner(s)
1552
+ if scanner:
1553
+ path = self.get_build_scanner_path(scanner)
1554
+ else:
1555
+ path = None
1556
+ def f(node, env=env, scanner=scanner, path=path):
1557
+ return node.get_found_includes(env, scanner, path)
1558
+ return render_tree(s, f, 1)
1559
+ else:
1560
+ return None
1561
+
1562
+ def get_abspath(self):
1563
+ """
1564
+ Return an absolute path to the Node. This will return simply
1565
+ str(Node) by default, but for Node types that have a concept of
1566
+ relative path, this might return something different.
1567
+ """
1568
+ return str(self)
1569
+
1570
+ def for_signature(self):
1571
+ """
1572
+ Return a string representation of the Node that will always
1573
+ be the same for this particular Node, no matter what. This
1574
+ is by contrast to the __str__() method, which might, for
1575
+ instance, return a relative path for a file Node. The purpose
1576
+ of this method is to generate a value to be used in signature
1577
+ calculation for the command line used to build a target, and
1578
+ we use this method instead of str() to avoid unnecessary
1579
+ rebuilds. This method does not need to return something that
1580
+ would actually work in a command line; it can return any kind of
1581
+ nonsense, so long as it does not change.
1582
+ """
1583
+ return str(self)
1584
+
1585
+ def get_string(self, for_signature):
1586
+ """This is a convenience function designed primarily to be
1587
+ used in command generators (i.e., CommandGeneratorActions or
1588
+ Environment variables that are callable), which are called
1589
+ with a for_signature argument that is nonzero if the command
1590
+ generator is being called to generate a signature for the
1591
+ command line, which determines if we should rebuild or not.
1592
+
1593
+ Such command generators should use this method in preference
1594
+ to str(Node) when converting a Node to a string, passing
1595
+ in the for_signature parameter, such that we will call
1596
+ Node.for_signature() or str(Node) properly, depending on whether
1597
+ we are calculating a signature or actually constructing a
1598
+ command line."""
1599
+ if for_signature:
1600
+ return self.for_signature()
1601
+ return str(self)
1602
+
1603
+ def get_subst_proxy(self):
1604
+ """
1605
+ This method is expected to return an object that will function
1606
+ exactly like this Node, except that it implements any additional
1607
+ special features that we would like to be in effect for
1608
+ Environment variable substitution. The principle use is that
1609
+ some Nodes would like to implement a __getattr__() method,
1610
+ but putting that in the Node type itself has a tendency to kill
1611
+ performance. We instead put it in a proxy and return it from
1612
+ this method. It is legal for this method to return self
1613
+ if no new functionality is needed for Environment substitution.
1614
+ """
1615
+ return self
1616
+
1617
+ def explain(self):
1618
+ if not self.exists():
1619
+ return "building `%s' because it doesn't exist\n" % self
1620
+
1621
+ if self.always_build:
1622
+ return "rebuilding `%s' because AlwaysBuild() is specified\n" % self
1623
+
1624
+ old = self.get_stored_info()
1625
+ if old is None:
1626
+ return None
1627
+
1628
+ old = old.binfo
1629
+ old.prepare_dependencies()
1630
+
1631
+ try:
1632
+ old_bkids = old.bsources + old.bdepends + old.bimplicit
1633
+ old_bkidsigs = old.bsourcesigs + old.bdependsigs + old.bimplicitsigs
1634
+ except AttributeError:
1635
+ return "Cannot explain why `%s' is being rebuilt: No previous build information found\n" % self
1636
+
1637
+ new = self.get_binfo()
1638
+
1639
+ new_bkids = new.bsources + new.bdepends + new.bimplicit
1640
+ new_bkidsigs = new.bsourcesigs + new.bdependsigs + new.bimplicitsigs
1641
+
1642
+ osig = dict(list(zip(old_bkids, old_bkidsigs)))
1643
+ nsig = dict(list(zip(new_bkids, new_bkidsigs)))
1644
+
1645
+ # The sources and dependencies we'll want to report are all stored
1646
+ # as relative paths to this target's directory, but we want to
1647
+ # report them relative to the top-level SConstruct directory,
1648
+ # so we only print them after running them through this lambda
1649
+ # to turn them into the right relative Node and then return
1650
+ # its string.
1651
+ def stringify( s, E=self.dir.Entry):
1652
+ if hasattr( s, 'dir' ) :
1653
+ return str(E(s))
1654
+ return str(s)
1655
+
1656
+ lines = []
1657
+
1658
+ removed = [x for x in old_bkids if x not in new_bkids]
1659
+ if removed:
1660
+ removed = [stringify(r) for r in removed]
1661
+ fmt = "`%s' is no longer a dependency\n"
1662
+ lines.extend([fmt % s for s in removed])
1663
+
1664
+ for k in new_bkids:
1665
+ if k not in old_bkids:
1666
+ lines.append("`%s' is a new dependency\n" % stringify(k))
1667
+ else:
1668
+ changed = _decider_map[k.changed_since_last_build](k, self, osig[k])
1669
+
1670
+ if changed:
1671
+ lines.append("`%s' changed\n" % stringify(k))
1672
+
1673
+ if len(lines) == 0 and old_bkids != new_bkids:
1674
+ lines.append("the dependency order changed:\n")
1675
+ lines.append("->Sources\n")
1676
+ for (o,n) in zip_longest(old.bsources, new.bsources, fillvalue=None):
1677
+ lines.append("Old:%s\tNew:%s\n"%(o,n))
1678
+ lines.append("->Depends\n")
1679
+ for (o,n) in zip_longest(old.bdepends, new.bdepends, fillvalue=None):
1680
+ lines.append("Old:%s\tNew:%s\n"%(o,n))
1681
+ lines.append("->Implicit\n")
1682
+ for (o,n) in zip_longest(old.bimplicit, new.bimplicit, fillvalue=None):
1683
+ lines.append("Old:%s\tNew:%s\n"%(o,n))
1684
+
1685
+ if len(lines) == 0:
1686
+ def fmt_with_title(title, strlines):
1687
+ lines = strlines.split('\n')
1688
+ sep = '\n' + ' '*(15 + len(title))
1689
+ return ' '*15 + title + sep.join(lines) + '\n'
1690
+ if old.bactsig != new.bactsig:
1691
+ if old.bact == new.bact:
1692
+ lines.append("the contents of the build action changed\n" +
1693
+ fmt_with_title('action: ', new.bact))
1694
+
1695
+ # lines.append("the contents of the build action changed [%s] [%s]\n"%(old.bactsig,new.bactsig) +
1696
+ # fmt_with_title('action: ', new.bact))
1697
+ else:
1698
+ lines.append("the build action changed:\n" +
1699
+ fmt_with_title('old: ', old.bact) +
1700
+ fmt_with_title('new: ', new.bact))
1701
+
1702
+ if len(lines) == 0:
1703
+ return "rebuilding `%s' for unknown reasons\n" % self
1704
+
1705
+ preamble = "rebuilding `%s' because" % self
1706
+ if len(lines) == 1:
1707
+ return "%s %s" % (preamble, lines[0])
1708
+ else:
1709
+ lines = ["%s:\n" % preamble] + lines
1710
+ return ( ' '*11).join(lines)
1711
+
1712
+ class NodeList(collections.UserList):
1713
+ def __str__(self):
1714
+ return str(list(map(str, self.data)))
1715
+
1716
+ def get_children(node, parent): return node.children()
1717
+ def ignore_cycle(node, stack): pass
1718
+ def do_nothing(node, parent): pass
1719
+
1720
+ class Walker:
1721
+ """An iterator for walking a Node tree.
1722
+
1723
+ This is depth-first, children are visited before the parent.
1724
+ The Walker object can be initialized with any node, and
1725
+ returns the next node on the descent with each get_next() call.
1726
+ get the children of a node instead of calling 'children'.
1727
+ 'cycle_func' is an optional function that will be called
1728
+ when a cycle is detected.
1729
+
1730
+ This class does not get caught in node cycles caused, for example,
1731
+ by C header file include loops.
1732
+ """
1733
+ def __init__(self, node, kids_func=get_children,
1734
+ cycle_func=ignore_cycle,
1735
+ eval_func=do_nothing):
1736
+ self.kids_func = kids_func
1737
+ self.cycle_func = cycle_func
1738
+ self.eval_func = eval_func
1739
+ node.wkids = copy.copy(kids_func(node, None))
1740
+ self.stack = [node]
1741
+ self.history = {} # used to efficiently detect and avoid cycles
1742
+ self.history[node] = None
1743
+
1744
+ def get_next(self):
1745
+ """Return the next node for this walk of the tree.
1746
+
1747
+ This function is intentionally iterative, not recursive,
1748
+ to sidestep any issues of stack size limitations.
1749
+ """
1750
+
1751
+ while self.stack:
1752
+ if self.stack[-1].wkids:
1753
+ node = self.stack[-1].wkids.pop(0)
1754
+ if not self.stack[-1].wkids:
1755
+ self.stack[-1].wkids = None
1756
+ if node in self.history:
1757
+ self.cycle_func(node, self.stack)
1758
+ else:
1759
+ node.wkids = copy.copy(self.kids_func(node, self.stack[-1]))
1760
+ self.stack.append(node)
1761
+ self.history[node] = None
1762
+ else:
1763
+ node = self.stack.pop()
1764
+ del self.history[node]
1765
+ if node:
1766
+ if self.stack:
1767
+ parent = self.stack[-1]
1768
+ else:
1769
+ parent = None
1770
+ self.eval_func(node, parent)
1771
+ return node
1772
+ return None
1773
+
1774
+ def is_done(self):
1775
+ return not self.stack
1776
+
1777
+
1778
+ arg2nodes_lookups = []
1779
+
1780
+ # Local Variables:
1781
+ # tab-width:4
1782
+ # indent-tabs-mode:nil
1783
+ # End:
1784
+ # vim: set expandtab tabstop=4 shiftwidth=4: