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,2473 @@
1
+ # Copyright 2025, Kay Hayen, mailto:kay.hayen@gmail.com find license text at end of file
2
+
3
+
4
+ """ Command line options of Nuitka.
5
+
6
+ These provide only the optparse options to use, and the mechanic to actually
7
+ do it, but updating and checking module "nuitka.Options" values is not in
8
+ the scope, to make sure it can be used without.
9
+
10
+ Note: This is using "optparse", because "argparse" is only Python 2.7 and
11
+ higher, and we still support Python 2.6 due to the RHELs still being used,
12
+ and despite the long deprecation, it's in every later release, and actually
13
+ pretty good.
14
+ """
15
+
16
+ import os
17
+ import re
18
+ import sys
19
+ from string import Formatter
20
+
21
+ from nuitka.PythonFlavors import getPythonFlavorName
22
+ from nuitka.PythonVersions import isPythonWithGil
23
+ from nuitka.utils.CommandLineOptions import SUPPRESS_HELP, makeOptionsParser
24
+ from nuitka.utils.FileOperations import getFileContentByLine
25
+ from nuitka.utils.Utils import (
26
+ getArchitecture,
27
+ getLinuxDistribution,
28
+ getOS,
29
+ getWindowsRelease,
30
+ isLinux,
31
+ isMacOS,
32
+ isWin32OrPosixWindows,
33
+ isWin32Windows,
34
+ withNoSyntaxWarning,
35
+ )
36
+ from nuitka.Version import getCommercialVersion, getNuitkaVersion
37
+
38
+ # Indicator if we were called as "nuitka-run" in which case we assume some
39
+ # other defaults and work a bit different with parameters.
40
+ _nuitka_binary_name = os.path.basename(sys.argv[0])
41
+ if _nuitka_binary_name == "__main__.py":
42
+ _nuitka_binary_name = "%s -m nuitka" % os.path.basename(sys.executable)
43
+ is_nuitka_run = _nuitka_binary_name.lower().endswith("-run")
44
+
45
+ if not is_nuitka_run:
46
+ usage_template = (
47
+ "usage: %s [--mode=compilation_mode] [--run] [options] main_module.py"
48
+ )
49
+ else:
50
+ usage_template = "usage: %s [--mode=compilation_mode] [options] main_module.py"
51
+
52
+
53
+ def _handleHelpModes():
54
+ result = False
55
+ for count, arg in enumerate(sys.argv[1:], start=1):
56
+ if arg == "--":
57
+ break
58
+ if arg in ("--help-all", "--help-plugin", "--help-plugins"):
59
+ result = True
60
+ sys.argv[count] = "--help"
61
+ break
62
+ return result
63
+
64
+
65
+ plugin_help_mode = _handleHelpModes()
66
+
67
+
68
+ if not plugin_help_mode:
69
+ usage_template += """\n
70
+ Note: For general plugin help (they often have their own
71
+ command line options too), consider the output of
72
+ '--help-plugins'."""
73
+
74
+ parser = makeOptionsParser(usage=usage_template % _nuitka_binary_name)
75
+
76
+ parser.add_option(
77
+ "--version",
78
+ dest="version",
79
+ action="store_true",
80
+ default=False,
81
+ require_compiling=False,
82
+ help="""\
83
+ Show version information and important details for bug reports, then exit. Defaults to off.""",
84
+ )
85
+
86
+ parser.add_option(
87
+ "--module",
88
+ action="store_true",
89
+ dest="module_mode",
90
+ default=False,
91
+ github_action=False,
92
+ help="""\
93
+ Create an importable binary extension module executable instead of a program. Defaults to off.""",
94
+ )
95
+
96
+ parser.add_option(
97
+ "--mode",
98
+ action="store",
99
+ dest="compilation_mode",
100
+ metavar="COMPILATION_MODE",
101
+ choices=("app", "onefile", "standalone", "accelerated", "module", "package", "dll"),
102
+ default=None,
103
+ github_action_default="app",
104
+ help="""\
105
+ Mode in which to compile. Accelerated runs in your Python
106
+ installation and depends on it. Standalone creates a folder
107
+ with an executable contained to run it. Onefile creates a
108
+ single executable to deploy. App is onefile except on macOS
109
+ where it's not to be used. Module makes a module, and
110
+ package includes also all sub-modules and sub-packages. Dll
111
+ is currently under development and not for users yet.
112
+ Default is 'accelerated'.""",
113
+ )
114
+
115
+ parser.add_option(
116
+ "--standalone",
117
+ action="store_true",
118
+ dest="is_standalone",
119
+ default=False,
120
+ github_action=False,
121
+ help="""\
122
+ Enable standalone mode for output. This allows you to transfer the created binary
123
+ to other machines without it using an existing Python installation. This also
124
+ means it will become big. It implies these options: "--follow-imports" and
125
+ "--python-flag=no_site". Defaults to off.""",
126
+ )
127
+
128
+ parser.add_option(
129
+ "--no-standalone",
130
+ action="store_false",
131
+ dest="is_standalone",
132
+ default=False,
133
+ help=SUPPRESS_HELP,
134
+ )
135
+
136
+
137
+ parser.add_option(
138
+ "--onefile",
139
+ action="store_true",
140
+ dest="is_onefile",
141
+ default=False,
142
+ github_action=False,
143
+ help="""\
144
+ On top of standalone mode, enable onefile mode. This means not a folder,
145
+ but a compressed executable is created and used. Defaults to off.""",
146
+ )
147
+
148
+ parser.add_option(
149
+ "--no-onefile",
150
+ action="store_false",
151
+ dest="is_onefile",
152
+ default=False,
153
+ help=SUPPRESS_HELP,
154
+ )
155
+
156
+ parser.add_option(
157
+ "--python-flag",
158
+ action="append",
159
+ dest="python_flags",
160
+ metavar="FLAG",
161
+ default=[],
162
+ help="""\
163
+ Python flags to use. Default is what you are using to run Nuitka, this
164
+ enforces a specific mode. These are options that also exist to standard
165
+ Python executable. Currently supported: "-S" (alias "no_site"),
166
+ "static_hashes" (do not use hash randomization), "no_warnings" (do not
167
+ give Python run time warnings), "-O" (alias "no_asserts"), "no_docstrings"
168
+ (do not use doc strings), "-u" (alias "unbuffered"), "isolated" (do not
169
+ load outside code), "-P" (alias "safe_path", do not used current directory
170
+ in module search) and "-m" (package mode, compile as "package.__main__").
171
+ Default empty.""",
172
+ )
173
+
174
+ parser.add_option(
175
+ "--python-debug",
176
+ action="store_true",
177
+ dest="python_debug",
178
+ default=None,
179
+ help="""\
180
+ Use debug version or not. Default uses what you are using to run Nuitka, most
181
+ likely a non-debug version. Only for debugging and testing purposes.""",
182
+ )
183
+
184
+ parser.add_option(
185
+ "--python-for-scons",
186
+ action="store",
187
+ dest="python_scons",
188
+ metavar="PATH",
189
+ default=None,
190
+ github_action=False,
191
+ help="""\
192
+ When compiling with Python 3.4 provide the path of a
193
+ Python binary to use for Scons. Otherwise Nuitka can
194
+ use what you run Nuitka with, or find Python installation,
195
+ e.g. from Windows registry. On Windows, a Python 3.5 or
196
+ higher is needed. On non-Windows, a Python 2.6 or 2.7
197
+ will do as well.""",
198
+ )
199
+
200
+ parser.add_option(
201
+ "--main",
202
+ "--script-name",
203
+ action="append",
204
+ dest="mains",
205
+ metavar="PATH",
206
+ default=[],
207
+ help="""\
208
+ If specified once, this takes the place of the
209
+ positional argument, i.e. the filename to compile.
210
+ When given multiple times, it enables "multidist"
211
+ (see User Manual) it allows you to create binaries
212
+ that depending on file name or invocation name.
213
+ """,
214
+ )
215
+
216
+ # Option for use with GitHub action workflow, where options are read
217
+ # from the environment variable with the input values given there.
218
+ parser.add_option(
219
+ "--github-workflow-options",
220
+ action="store_true",
221
+ dest="github_workflow_options",
222
+ default=False,
223
+ github_action=False,
224
+ help=SUPPRESS_HELP, # For use in GitHub Action only.
225
+ )
226
+
227
+ include_group = parser.add_option_group(
228
+ "Control the inclusion of modules and packages in result",
229
+ link="include-section",
230
+ )
231
+
232
+ include_group.add_option(
233
+ "--include-package",
234
+ action="append",
235
+ dest="include_packages",
236
+ metavar="PACKAGE",
237
+ default=[],
238
+ help="""\
239
+ Include a whole package. Give as a Python namespace, e.g. "some_package.sub_package"
240
+ and Nuitka will then find it and include it and all the modules found below that
241
+ disk location in the binary or extension module it creates, and make it available
242
+ for import by the code. To avoid unwanted sub packages, e.g. tests you can e.g. do
243
+ this "--nofollow-import-to=*.tests". Default empty.""",
244
+ )
245
+
246
+ include_group.add_option(
247
+ "--include-module",
248
+ action="append",
249
+ dest="include_modules",
250
+ metavar="MODULE",
251
+ default=[],
252
+ help="""\
253
+ Include a single module. Give as a Python namespace, e.g. "some_package.some_module"
254
+ and Nuitka will then find it and include it in the binary or extension module
255
+ it creates, and make it available for import by the code. Default empty.""",
256
+ )
257
+
258
+ include_group.add_option(
259
+ "--include-plugin-directory",
260
+ action="append",
261
+ dest="include_extra",
262
+ metavar="MODULE/PACKAGE",
263
+ default=[],
264
+ help="""\
265
+ Include also the code found in that directory, considering as if
266
+ they are each given as a main file. Overrides all other inclusion
267
+ options. You ought to prefer other inclusion options, that go by
268
+ names, rather than filenames, those find things through being in
269
+ "sys.path". This option is for very special use cases only. Can
270
+ be given multiple times. Default empty.""",
271
+ )
272
+
273
+ include_group.add_option(
274
+ "--include-plugin-files",
275
+ action="append",
276
+ dest="include_extra_files",
277
+ metavar="PATTERN",
278
+ default=[],
279
+ help="""\
280
+ Include into files matching the PATTERN. Overrides all other follow options.
281
+ Can be given multiple times. Default empty.""",
282
+ )
283
+
284
+ include_group.add_option(
285
+ "--prefer-source-code",
286
+ action="store_true",
287
+ dest="prefer_source_code",
288
+ default=None,
289
+ help="""\
290
+ For already compiled extension modules, where there is both a source file and an
291
+ extension module, normally the extension module is used, but it should be better
292
+ to compile the module from available source code for best performance. If not
293
+ desired, there is --no-prefer-source-code to disable warnings about it. Default
294
+ off.""",
295
+ )
296
+ include_group.add_option(
297
+ "--no-prefer-source-code",
298
+ action="store_false",
299
+ dest="prefer_source_code",
300
+ default=None,
301
+ help=SUPPRESS_HELP,
302
+ )
303
+
304
+ del include_group
305
+
306
+
307
+ follow_group = parser.add_option_group("Control the following into imported modules")
308
+
309
+ follow_group.add_option(
310
+ "--follow-imports",
311
+ action="store_true",
312
+ dest="follow_all",
313
+ default=None,
314
+ help="""\
315
+ Descend into all imported modules. Defaults to on in standalone mode, otherwise off.""",
316
+ )
317
+
318
+ follow_group.add_option(
319
+ "--follow-import-to",
320
+ action="append",
321
+ dest="follow_modules",
322
+ metavar="MODULE/PACKAGE",
323
+ default=[],
324
+ help="""\
325
+ Follow to that module if used, or if a package, to the whole package. Can be given
326
+ multiple times. Default empty.""",
327
+ )
328
+
329
+ follow_group.add_option(
330
+ "--nofollow-import-to",
331
+ action="append",
332
+ dest="follow_not_modules",
333
+ metavar="MODULE/PACKAGE",
334
+ default=[],
335
+ help="""\
336
+ Do not follow to that module name even if used, or if a package name, to the
337
+ whole package in any case, overrides all other options. This can also contain
338
+ patterns, e.g. "*.tests". Can be given multiple times. Default empty.""",
339
+ )
340
+
341
+ follow_group.add_option(
342
+ "--nofollow-imports",
343
+ action="store_false",
344
+ dest="follow_all",
345
+ default=None,
346
+ help="""\
347
+ Do not descend into any imported modules at all, overrides all other inclusion
348
+ options and not usable for standalone mode. Defaults to off.""",
349
+ )
350
+
351
+ follow_group.add_option(
352
+ "--follow-stdlib",
353
+ action="store_true",
354
+ dest="follow_stdlib",
355
+ default=False,
356
+ help="""\
357
+ Also descend into imported modules from standard library. This will increase
358
+ the compilation time by a lot and is also not well tested at this time and
359
+ sometimes won't work. Defaults to off.""",
360
+ )
361
+
362
+ del follow_group
363
+
364
+ onefile_group = parser.add_option_group("Onefile options")
365
+
366
+ onefile_group.add_option(
367
+ "--onefile-tempdir-spec",
368
+ action="store",
369
+ dest="onefile_tempdir_spec",
370
+ metavar="ONEFILE_TEMPDIR_SPEC",
371
+ default=None,
372
+ help="""\
373
+ Use this as a folder to unpack to in onefile mode. Defaults to
374
+ '{TEMP}/onefile_{PID}_{TIME}', i.e. user temporary directory
375
+ and being non-static it's removed. Use e.g. a string like
376
+ '{CACHE_DIR}/{COMPANY}/{PRODUCT}/{VERSION}' which is a good
377
+ static cache path, this will then not be removed.""",
378
+ )
379
+
380
+ onefile_group.add_option(
381
+ "--onefile-cache-mode",
382
+ action="store",
383
+ dest="onefile_cached_mode",
384
+ metavar="ONEFILE_CACHED_MODE",
385
+ choices=("auto", "cached", "temporary"),
386
+ default="auto",
387
+ help="""\
388
+ This mode is inferred from your use of the spec. If it contains
389
+ runtime dependent paths, "auto" resolves to "temporary" which
390
+ will make sure to remove the unpacked binaries after execution,
391
+ and cached will not remove it and see to reuse its contents
392
+ during next execution for faster startup times.""",
393
+ )
394
+
395
+
396
+ onefile_group.add_option(
397
+ "--onefile-child-grace-time",
398
+ action="store",
399
+ dest="onefile_child_grace_time",
400
+ metavar="GRACE_TIME_MS",
401
+ default=None,
402
+ help="""\
403
+ When stopping the child, e.g. due to CTRL-C or shutdown, etc. the
404
+ Python code gets a "KeyboardInterrupt", that it may handle e.g. to
405
+ flush data. This is the amount of time in ms, before the child it
406
+ killed in the hard way. Unit is ms, and default 5000.""",
407
+ )
408
+
409
+ onefile_group.add_option(
410
+ "--onefile-no-compression",
411
+ action="store_true",
412
+ dest="onefile_no_compression",
413
+ default=False,
414
+ help="""\
415
+ When creating the onefile, disable compression of the payload. This is
416
+ mostly for debug purposes, or to save time. Default is off.""",
417
+ )
418
+
419
+ onefile_group.add_option(
420
+ "--onefile-as-archive",
421
+ action="store_true",
422
+ dest="onefile_as_archive",
423
+ default=False,
424
+ help="""\
425
+ When creating the onefile, use an archive format, that can be unpacked
426
+ with "nuitka-onefile-unpack" rather than a stream that only the onefile
427
+ program itself unpacks. Default is off.""",
428
+ )
429
+
430
+ onefile_group.add_option(
431
+ "--onefile-no-dll",
432
+ action="store_true",
433
+ dest="onefile_no_dll",
434
+ default=False,
435
+ help="""\
436
+ When creating the onefile, some platforms (Windows currently, if not
437
+ using a cached location) default to using DLL rather than an executable
438
+ for the Python code. This makes it use an executable in the unpacked
439
+ files as well. Default is off.""",
440
+ )
441
+
442
+ del onefile_group
443
+
444
+ data_group = parser.add_option_group("Data files")
445
+
446
+ data_group.add_option(
447
+ "--include-package-data",
448
+ action="append",
449
+ dest="package_data",
450
+ metavar="PACKAGE",
451
+ default=[],
452
+ help="""\
453
+ Include data files for the given package name. DLLs and extension modules
454
+ are not data files and never included like this. Can use patterns the
455
+ filenames as indicated below. Data files of packages are not included
456
+ by default, but package configuration can do it.
457
+ This will only include non-DLL, non-extension modules, i.e. actual data
458
+ files. After a ":" optionally a filename pattern can be given as
459
+ well, selecting only matching files. Examples:
460
+ "--include-package-data=package_name" (all files)
461
+ "--include-package-data=package_name:*.txt" (only certain type)
462
+ "--include-package-data=package_name:some_filename.dat (concrete file)
463
+ Default empty.""",
464
+ )
465
+
466
+ data_group.add_option(
467
+ "--include-data-files",
468
+ "--include-data-file",
469
+ action="append",
470
+ dest="data_files",
471
+ metavar="DESC",
472
+ default=[],
473
+ help="""\
474
+ Include data files by filenames in the distribution. There are many
475
+ allowed forms. With '--include-data-files=/path/to/file/*.txt=folder_name/some.txt' it
476
+ will copy a single file and complain if it's multiple. With
477
+ '--include-data-files=/path/to/files/*.txt=folder_name/' it will put
478
+ all matching files into that folder. For recursive copy there is a
479
+ form with 3 values that '--include-data-files=/path/to/scan=folder_name/=**/*.txt'
480
+ that will preserve directory structure. Default empty.""",
481
+ )
482
+
483
+ data_group.add_option(
484
+ "--include-data-dir",
485
+ action="append",
486
+ dest="data_dirs",
487
+ metavar="DIRECTORY",
488
+ default=[],
489
+ help="""\
490
+ Include data files from complete directory in the distribution. This is
491
+ recursive. Check '--include-data-files' with patterns if you want non-recursive
492
+ inclusion. An example would be '--include-data-dir=/path/some_dir=data/some_dir'
493
+ for plain copy, of the whole directory. All non-code files are copied, if you
494
+ want to use '--noinclude-data-files' option to remove them. Default empty.""",
495
+ )
496
+
497
+ data_group.add_option(
498
+ "--noinclude-data-files",
499
+ action="append",
500
+ dest="data_files_inhibited",
501
+ metavar="PATTERN",
502
+ default=[],
503
+ help="""\
504
+ Do not include data files matching the filename pattern given. This is against
505
+ the target filename, not source paths. So to ignore a file pattern from package
506
+ data for 'package_name' should be matched as 'package_name/*.txt'. Or for the
507
+ whole directory simply use 'package_name'. Default empty.""",
508
+ )
509
+
510
+ data_group.add_option(
511
+ "--include-onefile-external-data",
512
+ "--include-data-files-external",
513
+ action="append",
514
+ dest="data_files_external",
515
+ metavar="PATTERN",
516
+ default=[],
517
+ help="""\
518
+ Include the specified data file patterns outside of the onefile binary,
519
+ rather than on the inside. Makes only sense in case of '--onefile'
520
+ compilation. First files have to be specified as included with other
521
+ `--include-*data*` options, and then this refers to target paths
522
+ inside the distribution. Default empty.""",
523
+ )
524
+
525
+ data_group.add_option(
526
+ "--list-package-data",
527
+ action="store",
528
+ dest="list_package_data",
529
+ default="",
530
+ require_compiling=False,
531
+ help="""\
532
+ Output the data files found for a given package name. Default not done.""",
533
+ )
534
+
535
+ data_group.add_option(
536
+ "--include-raw-dir",
537
+ action="append",
538
+ dest="raw_dirs",
539
+ metavar="DIRECTORY",
540
+ default=[],
541
+ help="""\
542
+ Include raw directories completely in the distribution. This is
543
+ recursive. Check '--include-data-dir' to use the sane option.
544
+ Default empty.""",
545
+ )
546
+
547
+
548
+ del data_group
549
+
550
+ metadata_group = parser.add_option_group("Metadata support")
551
+
552
+ metadata_group.add_option(
553
+ "--include-distribution-metadata",
554
+ action="append",
555
+ dest="include_distribution_metadata",
556
+ metavar="DISTRIBUTION",
557
+ default=[],
558
+ help="""\
559
+ Include metadata information for the given distribution name. Some packages
560
+ check metadata for presence, version, entry points, etc. and without this
561
+ option given, it only works when it's recognized at compile time which is
562
+ not always happening. This of course only makes sense for packages that are
563
+ included in the compilation. Default empty.""",
564
+ )
565
+
566
+ metadata_group.add_option(
567
+ "--list-distribution-metadata",
568
+ action="store_true",
569
+ dest="list_distribution_metadata",
570
+ default=False,
571
+ require_compiling=False,
572
+ help="""\
573
+ Output the list of distributions and their details for all packages. Default not done.""",
574
+ )
575
+
576
+
577
+ del metadata_group
578
+
579
+ dll_group = parser.add_option_group("DLL files")
580
+
581
+ dll_group.add_option(
582
+ "--noinclude-dlls",
583
+ action="append",
584
+ dest="dll_files_inhibited",
585
+ metavar="PATTERN",
586
+ default=[],
587
+ help="""\
588
+ Do not include DLL files matching the filename pattern given. This is against
589
+ the target filename, not source paths. So ignore a DLL 'someDLL' contained in
590
+ the package 'package_name' it should be matched as 'package_name/someDLL.*'.
591
+ Default empty.""",
592
+ )
593
+
594
+
595
+ dll_group.add_option(
596
+ "--list-package-dlls",
597
+ action="store",
598
+ dest="list_package_dlls",
599
+ default="",
600
+ require_compiling=False,
601
+ help="""\
602
+ Output the DLLs found for a given package name. Default not done.""",
603
+ )
604
+
605
+ dll_group.add_option(
606
+ "--list-package-exe",
607
+ action="store",
608
+ dest="list_package_exe",
609
+ default="",
610
+ require_compiling=False,
611
+ help="""\
612
+ Output the EXEs found for a given package name. Default not done.""",
613
+ )
614
+
615
+
616
+ del dll_group
617
+
618
+ warnings_group = parser.add_option_group("Control the warnings to be given by Nuitka")
619
+
620
+
621
+ warnings_group.add_option(
622
+ "--warn-implicit-exceptions",
623
+ action="store_true",
624
+ dest="warn_implicit_exceptions",
625
+ default=False,
626
+ help="""\
627
+ Enable warnings for implicit exceptions detected at compile time.""",
628
+ )
629
+
630
+ warnings_group.add_option(
631
+ "--warn-unusual-code",
632
+ action="store_true",
633
+ dest="warn_unusual_code",
634
+ default=False,
635
+ help="""\
636
+ Enable warnings for unusual code detected at compile time.""",
637
+ )
638
+
639
+ warnings_group.add_option(
640
+ "--assume-yes-for-downloads",
641
+ action="store_true",
642
+ dest="assume_yes_for_downloads",
643
+ default=False,
644
+ github_action_default=True,
645
+ help="""\
646
+ Allow Nuitka to download external code if necessary, e.g. dependency
647
+ walker, ccache, and even gcc on Windows. To disable, redirect input
648
+ from nul device, e.g. "</dev/null" or "<NUL:". Default is to prompt.""",
649
+ )
650
+
651
+
652
+ warnings_group.add_option(
653
+ "--nowarn-mnemonic",
654
+ action="append",
655
+ dest="nowarn_mnemonics",
656
+ metavar="MNEMONIC",
657
+ default=[],
658
+ help="""\
659
+ Disable warning for a given mnemonic. These are given to make sure you are aware of
660
+ certain topics, and typically point to the Nuitka website. The mnemonic is the part
661
+ of the URL at the end, without the HTML suffix. Can be given multiple times and
662
+ accepts shell pattern. Default empty.""",
663
+ )
664
+
665
+ del warnings_group
666
+
667
+
668
+ execute_group = parser.add_option_group("Immediate execution after compilation")
669
+
670
+ execute_group.add_option(
671
+ "--run",
672
+ action="store_true",
673
+ dest="immediate_execution",
674
+ default=is_nuitka_run,
675
+ help="""\
676
+ Execute immediately the created binary (or import the compiled module).
677
+ Defaults to %s."""
678
+ % ("on" if is_nuitka_run else "off"),
679
+ )
680
+
681
+ execute_group.add_option(
682
+ "--debugger",
683
+ "--gdb",
684
+ action="store_true",
685
+ dest="debugger",
686
+ default=False,
687
+ help="""\
688
+ Execute inside a debugger, e.g. "gdb" or "lldb" to automatically get a stack trace. The
689
+ debugger is automatically chosen unless specified by name with the NUITKA_DEBUGGER_CHOICE
690
+ environment variable. Defaults to off.""",
691
+ )
692
+
693
+ del execute_group
694
+
695
+
696
+ compilation_group = parser.add_option_group("Compilation choices")
697
+
698
+ compilation_group.add_option(
699
+ "--user-package-configuration-file",
700
+ action="append",
701
+ dest="user_yaml_files",
702
+ default=[],
703
+ metavar="YAML_FILENAME",
704
+ help="""\
705
+ User provided Yaml file with package configuration. You can include DLLs,
706
+ remove bloat, add hidden dependencies. Check the Nuitka Package Configuration
707
+ Manual for a complete description of the format to use. Can be given
708
+ multiple times. Defaults to empty.""",
709
+ )
710
+
711
+ compilation_group.add_option(
712
+ "--full-compat",
713
+ action="store_false",
714
+ dest="improved",
715
+ default=True,
716
+ help="""\
717
+ Enforce absolute compatibility with CPython. Do not even allow minor
718
+ deviations from CPython behavior, e.g. not having better tracebacks
719
+ or exception messages which are not really incompatible, but only
720
+ different or worse. This is intended for tests only and should *not*
721
+ be used.""",
722
+ )
723
+
724
+ compilation_group.add_option(
725
+ "--file-reference-choice",
726
+ action="store",
727
+ dest="file_reference_mode",
728
+ metavar="FILE_MODE",
729
+ choices=("original", "runtime", "frozen"),
730
+ default=None,
731
+ help="""\
732
+ Select what value "__file__" is going to be. With "runtime" (default for
733
+ standalone binary mode and module mode), the created binaries and modules,
734
+ use the location of themselves to deduct the value of "__file__". Included
735
+ packages pretend to be in directories below that location. This allows you
736
+ to include data files in deployments. If you merely seek acceleration, it's
737
+ better for you to use the "original" value, where the source files location
738
+ will be used. With "frozen" a notation "<frozen module_name>" is used. For
739
+ compatibility reasons, the "__file__" value will always have ".py" suffix
740
+ independent of what it really is.""",
741
+ )
742
+
743
+ compilation_group.add_option(
744
+ "--module-name-choice",
745
+ action="store",
746
+ dest="module_name_mode",
747
+ metavar="MODULE_NAME_MODE",
748
+ choices=("original", "runtime"),
749
+ default=None,
750
+ help="""\
751
+ Select what value "__name__" and "__package__" are going to be. With "runtime"
752
+ (default for module mode), the created module uses the parent package to
753
+ deduce the value of "__package__", to be fully compatible. The value "original"
754
+ (default for other modes) allows for more static optimization to happen, but
755
+ is incompatible for modules that normally can be loaded into any package.""",
756
+ )
757
+
758
+
759
+ del compilation_group
760
+
761
+ output_group = parser.add_option_group("Output choices")
762
+
763
+ output_group.add_option(
764
+ "--output-filename",
765
+ "-o",
766
+ action="store",
767
+ dest="output_filename",
768
+ metavar="FILENAME",
769
+ default=None,
770
+ help="""\
771
+ Specify how the executable should be named. For extension modules there is no
772
+ choice, also not for standalone mode and using it will be an error. This may
773
+ include path information that needs to exist though. Defaults to '%s' on this
774
+ platform.
775
+ """
776
+ % ("<program_name>" + (".exe" if isWin32OrPosixWindows() else ".bin")),
777
+ )
778
+
779
+ output_group.add_option(
780
+ "--output-dir",
781
+ action="store",
782
+ dest="output_dir",
783
+ metavar="DIRECTORY",
784
+ default="",
785
+ help="""\
786
+ Specify where intermediate and final output files should be put. The DIRECTORY
787
+ will be populated with build folder, dist folder, binaries, etc.
788
+ Defaults to current directory.
789
+ """,
790
+ )
791
+
792
+ output_group.add_option(
793
+ "--remove-output",
794
+ action="store_true",
795
+ dest="remove_build",
796
+ default=False,
797
+ help="""\
798
+ Removes the build directory after producing the module or exe file.
799
+ Defaults to off.""",
800
+ )
801
+
802
+ output_group.add_option(
803
+ "--no-pyi-file",
804
+ action="store_false",
805
+ dest="pyi_file",
806
+ default=True,
807
+ help="""\
808
+ Do not create a '.pyi' file for extension modules created by Nuitka. This is
809
+ used to detect implicit imports.
810
+ Defaults to off.""",
811
+ )
812
+
813
+ output_group.add_option(
814
+ "--no-pyi-stubs",
815
+ action="store_false",
816
+ dest="pyi_stubs",
817
+ default=True,
818
+ help="""\
819
+ Do not use stubgen when creating a '.pyi' file for extension modules
820
+ created by Nuitka. They expose your API, but stubgen may cause issues.
821
+ Defaults to off.""",
822
+ )
823
+
824
+
825
+ del output_group
826
+
827
+ deployment_group = parser.add_option_group("Deployment control")
828
+
829
+ deployment_group.add_option(
830
+ "--deployment",
831
+ action="store_true",
832
+ dest="is_deployment",
833
+ default=False,
834
+ help="""\
835
+ Disable code aimed at making finding compatibility issues easier. This
836
+ will e.g. prevent execution with "-c" argument, which is often used by
837
+ code that attempts run a module, and causes a program to start itself
838
+ over and over potentially. Disable once you deploy to end users, for
839
+ finding typical issues, this is very helpful during development. Default
840
+ off.""",
841
+ )
842
+
843
+ deployment_group.add_option(
844
+ "--no-deployment-flag",
845
+ action="append",
846
+ dest="no_deployment_flags",
847
+ metavar="FLAG",
848
+ default=[],
849
+ help="""\
850
+ Keep deployment mode, but disable selectively parts of it. Errors from
851
+ deployment mode will output these identifiers. Default empty.""",
852
+ )
853
+
854
+ environment_group = parser.add_option_group("Environment control")
855
+
856
+ environment_group.add_option(
857
+ "--force-runtime-environment-variable",
858
+ action="append",
859
+ dest="forced_runtime_env_variables",
860
+ metavar="VARIABLE_SPEC",
861
+ default=[],
862
+ help="""\
863
+ Force an environment variables to a given value. Default empty.""",
864
+ )
865
+
866
+ del environment_group
867
+
868
+ debug_group = parser.add_option_group("Debug features")
869
+
870
+ debug_group.add_option(
871
+ "--debug",
872
+ action="store_true",
873
+ dest="debug",
874
+ default=False,
875
+ help="""\
876
+ Executing all self checks possible to find errors in Nuitka, do not use for
877
+ production. Defaults to off.""",
878
+ )
879
+
880
+ debug_group.add_option(
881
+ "--no-debug-immortal-assumptions",
882
+ action="store_false",
883
+ dest="debug_immortal",
884
+ default=None,
885
+ help="""\
886
+ Disable check normally done with "--debug". With Python3.12+ do not check known
887
+ immortal object assumptions. Some C libraries corrupt them. Defaults to check
888
+ being made if "--debug" is on.""",
889
+ )
890
+
891
+ debug_group.add_option(
892
+ "--debug-immortal-assumptions",
893
+ action="store_true",
894
+ dest="debug_immortal",
895
+ default=None,
896
+ help=SUPPRESS_HELP,
897
+ )
898
+
899
+ debug_group.add_option(
900
+ "--no-debug-c-warnings",
901
+ action="store_false",
902
+ dest="debug_c_warnings",
903
+ default=None,
904
+ help="""\
905
+ Disable check normally done with "--debug". The C compilation may produce
906
+ warnings, which it often does for some packages without these being issues,
907
+ esp. for unused values.""",
908
+ )
909
+
910
+ debug_group.add_option(
911
+ "--debug-c-warnings",
912
+ action="store_true",
913
+ dest="debug_c_warnings",
914
+ default=None,
915
+ help=SUPPRESS_HELP,
916
+ )
917
+
918
+ debug_group.add_option(
919
+ "--unstripped",
920
+ "--unstriped",
921
+ action="store_true",
922
+ dest="unstripped",
923
+ default=False,
924
+ help="""\
925
+ Keep debug info in the resulting object file for better debugger interaction.
926
+ Defaults to off.""",
927
+ )
928
+
929
+ debug_group.add_option(
930
+ "--profile",
931
+ action="store_true",
932
+ dest="profile",
933
+ default=False,
934
+ github_action=False,
935
+ help="""\
936
+ Enable vmprof based profiling of time spent. Not working currently. Defaults to off.""",
937
+ )
938
+
939
+ debug_group.add_option(
940
+ "--trace-execution",
941
+ action="store_true",
942
+ dest="trace_execution",
943
+ default=False,
944
+ help="""\
945
+ Traced execution output, output the line of code before executing it.
946
+ Defaults to off.""",
947
+ )
948
+
949
+ debug_group.add_option(
950
+ "--xml",
951
+ action="store",
952
+ dest="xml_output",
953
+ metavar="XML_FILENAME",
954
+ default=None,
955
+ help="Write the internal program structure, result of optimization in XML form to given filename.",
956
+ )
957
+
958
+ debug_group.add_option(
959
+ "--experimental",
960
+ action="append",
961
+ dest="experimental",
962
+ metavar="FLAG",
963
+ default=[],
964
+ help="""\
965
+ Use features declared as 'experimental'. May have no effect if no experimental
966
+ features are present in the code. Uses secret tags (check source) per
967
+ experimented feature.""",
968
+ )
969
+
970
+ debug_group.add_option(
971
+ "--explain-imports",
972
+ action="store_true",
973
+ dest="explain_imports",
974
+ default=False,
975
+ help=SUPPRESS_HELP,
976
+ )
977
+
978
+ debug_group.add_option(
979
+ "--low-memory",
980
+ action="store_true",
981
+ dest="low_memory",
982
+ default=False,
983
+ help="""\
984
+ Attempt to use less memory, by forking less C compilation jobs and using
985
+ options that use less memory. For use on embedded machines. Use this in
986
+ case of out of memory problems. Defaults to off.""",
987
+ )
988
+
989
+ debug_group.add_option(
990
+ "--create-environment-from-report",
991
+ action="store",
992
+ dest="create_environment_from_report",
993
+ default="",
994
+ require_compiling=False,
995
+ help="""\
996
+ Create a new virtualenv in that non-existing path from the report file given with
997
+ e.g. '--report=compilation-report.xml'. Default not done.""",
998
+ )
999
+
1000
+ debug_group.add_option(
1001
+ "--generate-c-only",
1002
+ action="store_true",
1003
+ dest="generate_c_only",
1004
+ default=False,
1005
+ github_action=False,
1006
+ help="""\
1007
+ Generate only C source code, and do not compile it to binary or module. This
1008
+ is for debugging and code coverage analysis that doesn't waste CPU. Defaults to
1009
+ off. Do not think you can use this directly.""",
1010
+ )
1011
+
1012
+
1013
+ del debug_group
1014
+
1015
+
1016
+ development_group = parser.add_option_group("Nuitka Development features")
1017
+
1018
+
1019
+ development_group.add_option(
1020
+ "--devel-missing-code-helpers",
1021
+ action="store_true",
1022
+ dest="report_missing_code_helpers",
1023
+ default=False,
1024
+ help="""\
1025
+ Report warnings for code helpers for types that were attempted, but don't
1026
+ exist. This helps to identify opportunities for improving optimization of
1027
+ generated code from type knowledge not used. Default False.""",
1028
+ )
1029
+
1030
+ development_group.add_option(
1031
+ "--devel-missing-trust",
1032
+ action="store_true",
1033
+ dest="report_missing_trust",
1034
+ default=False,
1035
+ help="""\
1036
+ Report warnings for imports that could be trusted, but currently are not. This
1037
+ is to identify opportunities for improving handling of hard modules, where this
1038
+ sometimes could allow more static optimization. Default False.""",
1039
+ )
1040
+
1041
+ development_group.add_option(
1042
+ "--devel-recompile-c-only",
1043
+ action="store_true",
1044
+ dest="recompile_c_only",
1045
+ default=False,
1046
+ github_action=False,
1047
+ help="""\
1048
+ This is not incremental compilation, but for Nuitka development only. Takes
1049
+ existing files and simply compiles them as C again after doing the Python
1050
+ steps. Allows compiling edited C files for manual debugging changes to the
1051
+ generated source. Allows us to add printing, check and print values, but it
1052
+ is now what users would want. Depends on compiling Python source to
1053
+ determine which files it should look at.""",
1054
+ )
1055
+
1056
+ development_group.add_option(
1057
+ "--devel-internal-graph",
1058
+ action="store_true",
1059
+ dest="internal_graph",
1060
+ default=False,
1061
+ github_action=False,
1062
+ help="""\
1063
+ Create graph of optimization process internals, do not use for whole programs, but only
1064
+ for small test cases. Defaults to off.""",
1065
+ )
1066
+
1067
+ development_group.add_option(
1068
+ "--devel-generate-ming64-header",
1069
+ action="store_true",
1070
+ dest="generate_mingw64_header",
1071
+ default=False,
1072
+ require_compiling=False,
1073
+ github_action=False,
1074
+ help=SUPPRESS_HELP,
1075
+ )
1076
+
1077
+ del development_group
1078
+
1079
+ # This is for testing framework, "coverage.py" hates to loose the process. And
1080
+ # we can use it to make sure it's not done unknowingly.
1081
+ parser.add_option(
1082
+ "--must-not-re-execute",
1083
+ action="store_false",
1084
+ dest="allow_reexecute",
1085
+ default=True,
1086
+ github_action=False,
1087
+ help=SUPPRESS_HELP,
1088
+ )
1089
+
1090
+ # Not sure where to put this yet, intended to helps me edit code faster, will
1091
+ # make it public if it becomes useful.
1092
+ parser.add_option(
1093
+ "--edit-module-code",
1094
+ action="store",
1095
+ dest="edit_module_code",
1096
+ default=None,
1097
+ require_compiling=False,
1098
+ help=SUPPRESS_HELP,
1099
+ )
1100
+
1101
+
1102
+ c_compiler_group = parser.add_option_group("Backend C compiler choice")
1103
+
1104
+ c_compiler_group.add_option(
1105
+ "--clang",
1106
+ action="store_true",
1107
+ dest="clang",
1108
+ default=False,
1109
+ help="""\
1110
+ Enforce the use of clang. On Windows this requires a working Visual
1111
+ Studio version to piggy back on. Defaults to off.""",
1112
+ )
1113
+
1114
+ c_compiler_group.add_option(
1115
+ "--mingw64",
1116
+ action="store_true",
1117
+ dest="mingw64",
1118
+ default=None,
1119
+ help="""\
1120
+ Enforce the use of MinGW64 on Windows. Defaults to off unless MSYS2 with MinGW Python is used.""",
1121
+ )
1122
+
1123
+ c_compiler_group.add_option(
1124
+ "--msvc",
1125
+ action="store",
1126
+ dest="msvc_version",
1127
+ default=None,
1128
+ help="""\
1129
+ Enforce the use of specific MSVC version on Windows. Allowed values
1130
+ are e.g. "14.3" (MSVC 2022) and other MSVC version numbers, specify
1131
+ "list" for a list of installed compilers, or use "latest".
1132
+
1133
+ Defaults to latest MSVC being used if installed, otherwise MinGW64
1134
+ is used.""",
1135
+ )
1136
+
1137
+ c_compiler_group.add_option(
1138
+ "--jobs",
1139
+ "-j",
1140
+ action="store",
1141
+ dest="jobs",
1142
+ metavar="N",
1143
+ default=None,
1144
+ help="""\
1145
+ Specify the allowed number of parallel C compiler jobs. Negative values
1146
+ are system CPU minus the given value. Defaults to the full system CPU
1147
+ count unless low memory mode is activated, then it defaults to 1.""",
1148
+ )
1149
+
1150
+ c_compiler_group.add_option(
1151
+ "--lto",
1152
+ action="store",
1153
+ dest="lto",
1154
+ metavar="choice",
1155
+ default="auto",
1156
+ choices=("yes", "no", "auto"),
1157
+ help="""\
1158
+ Use link time optimizations (MSVC, gcc, clang). Allowed values are
1159
+ "yes", "no", and "auto" (when it's known to work). Defaults to
1160
+ "auto".""",
1161
+ )
1162
+
1163
+ c_compiler_group.add_option(
1164
+ "--static-libpython",
1165
+ action="store",
1166
+ dest="static_libpython",
1167
+ metavar="choice",
1168
+ default="auto",
1169
+ choices=("yes", "no", "auto"),
1170
+ help="""\
1171
+ Use static link library of Python. Allowed values are "yes", "no",
1172
+ and "auto" (when it's known to work). Defaults to "auto".""",
1173
+ )
1174
+
1175
+ c_compiler_group.add_option(
1176
+ "--cf-protection",
1177
+ action="store",
1178
+ dest="cf_protection",
1179
+ metavar="PROTECTION_MODE",
1180
+ default="auto",
1181
+ choices=("auto", "full", "branch", "return", "none", "check"),
1182
+ help="""\
1183
+ This option is gcc specific. For the gcc compiler, select the
1184
+ "cf-protection" mode. Default "auto" is to use the gcc default
1185
+ value, but you can override it, e.g. to disable it with "none"
1186
+ value. Refer to gcc documentation for "-fcf-protection" for the
1187
+ details.""",
1188
+ )
1189
+
1190
+ del c_compiler_group
1191
+
1192
+ caching_group = parser.add_option_group("Cache Control")
1193
+
1194
+ _cache_names = ("all", "ccache", "bytecode", "compression")
1195
+
1196
+ if isWin32Windows():
1197
+ _cache_names += ("dll-dependencies",)
1198
+
1199
+ caching_group.add_option(
1200
+ "--disable-cache",
1201
+ action="append",
1202
+ dest="disabled_caches",
1203
+ choices=_cache_names,
1204
+ default=[],
1205
+ help="""\
1206
+ Disable selected caches, specify "all" for all cached. Currently allowed
1207
+ values are: %s. can be given multiple times or with comma separated values.
1208
+ Default none."""
1209
+ % (",".join('"%s"' % cache_name for cache_name in _cache_names)),
1210
+ )
1211
+
1212
+ caching_group.add_option(
1213
+ "--clean-cache",
1214
+ action="append",
1215
+ dest="clean_caches",
1216
+ choices=_cache_names,
1217
+ default=[],
1218
+ require_compiling=False,
1219
+ help="""\
1220
+ Clean the given caches before executing, specify "all" for all cached. Currently
1221
+ allowed values are: %s. can be given multiple times or with comma separated
1222
+ values. Default none."""
1223
+ % (",".join('"%s"' % cache_name for cache_name in _cache_names)),
1224
+ )
1225
+
1226
+ caching_group.add_option(
1227
+ "--disable-bytecode-cache",
1228
+ action="store_true",
1229
+ dest="disable_bytecode_cache",
1230
+ default=False,
1231
+ help=SUPPRESS_HELP,
1232
+ )
1233
+
1234
+ caching_group.add_option(
1235
+ "--disable-ccache",
1236
+ action="store_true",
1237
+ dest="disable_ccache",
1238
+ default=False,
1239
+ help=SUPPRESS_HELP,
1240
+ )
1241
+
1242
+ caching_group.add_option(
1243
+ "--disable-dll-dependency-cache",
1244
+ action="store_true",
1245
+ dest="disable_dll_dependency_cache",
1246
+ default=False,
1247
+ help=SUPPRESS_HELP,
1248
+ )
1249
+
1250
+ if isWin32Windows():
1251
+ caching_group.add_option(
1252
+ "--force-dll-dependency-cache-update",
1253
+ action="store_true",
1254
+ dest="update_dependency_cache",
1255
+ default=False,
1256
+ help="""\
1257
+ For an update of the dependency walker cache. Will result in much longer times
1258
+ to create the distribution folder, but might be used in case the cache is suspect
1259
+ to cause errors or known to need an update.
1260
+ """,
1261
+ )
1262
+
1263
+
1264
+ del caching_group
1265
+
1266
+ pgo_group = parser.add_option_group("PGO compilation choices")
1267
+
1268
+ pgo_group.add_option(
1269
+ "--pgo-c",
1270
+ action="store_true",
1271
+ dest="is_c_pgo",
1272
+ default=False,
1273
+ help="""\
1274
+ Enables C level profile guided optimization (PGO), by executing a dedicated build first
1275
+ for a profiling run, and then using the result to feedback into the C compilation.
1276
+ Note: This is experimental and not working with standalone modes of Nuitka yet.
1277
+ Defaults to off.""",
1278
+ )
1279
+
1280
+ pgo_group.add_option(
1281
+ "--pgo-python",
1282
+ action="store_true",
1283
+ dest="is_python_pgo",
1284
+ default=False,
1285
+ help=SUPPRESS_HELP, # Not yet ready
1286
+ )
1287
+
1288
+ pgo_group.add_option(
1289
+ "--pgo-python-input",
1290
+ action="store",
1291
+ dest="python_pgo_input",
1292
+ default=None,
1293
+ help=SUPPRESS_HELP, # Not yet ready
1294
+ )
1295
+
1296
+ pgo_group.add_option(
1297
+ "--pgo-python-policy-unused-module",
1298
+ action="store",
1299
+ dest="python_pgo_policy_unused_module",
1300
+ choices=("include", "exclude", "bytecode"),
1301
+ default="include",
1302
+ help=SUPPRESS_HELP, # Not yet ready
1303
+ )
1304
+
1305
+ pgo_group.add_option(
1306
+ "--pgo-args",
1307
+ action="store",
1308
+ dest="pgo_args",
1309
+ default="",
1310
+ help="""\
1311
+ Arguments to be passed in case of profile guided optimization. These are passed to the special
1312
+ built executable during the PGO profiling run. Default empty.""",
1313
+ )
1314
+
1315
+ pgo_group.add_option(
1316
+ "--pgo-executable",
1317
+ action="store",
1318
+ dest="pgo_executable",
1319
+ default=None,
1320
+ help="""\
1321
+ Command to execute when collecting profile information. Use this only, if you need to
1322
+ launch it through a script that prepares it to run. Default use created program.""",
1323
+ )
1324
+
1325
+
1326
+ del pgo_group
1327
+
1328
+
1329
+ tracing_group = parser.add_option_group("Tracing features")
1330
+
1331
+ tracing_group.add_option(
1332
+ "--report",
1333
+ action="store",
1334
+ dest="compilation_report_filename",
1335
+ metavar="REPORT_FILENAME",
1336
+ default=None,
1337
+ help="""\
1338
+ Report module, data files, compilation, plugin, etc. details in an XML output file. This
1339
+ is also super useful for issue reporting. These reports can e.g. be used to re-create
1340
+ the environment easily using it with '--create-environment-from-report', but contain a
1341
+ lot of information. Default is off.""",
1342
+ )
1343
+
1344
+ tracing_group.add_option(
1345
+ "--report-diffable",
1346
+ action="store_true",
1347
+ dest="compilation_report_diffable",
1348
+ metavar="REPORT_DIFFABLE",
1349
+ default=False,
1350
+ help="""\
1351
+ Report data in diffable form, i.e. no timing or memory usage values that vary from run
1352
+ to run. Default is off.""",
1353
+ )
1354
+
1355
+ tracing_group.add_option(
1356
+ "--report-user-provided",
1357
+ action="append",
1358
+ dest="compilation_report_user_data",
1359
+ metavar="KEY_VALUE",
1360
+ default=[],
1361
+ help="""\
1362
+ Report data from you. This can be given multiple times and be
1363
+ anything in 'key=value' form, where key should be an identifier, e.g. use
1364
+ '--report-user-provided=pipenv-lock-hash=64a5e4' to track some input values.
1365
+ Default is empty.""",
1366
+ )
1367
+
1368
+
1369
+ tracing_group.add_option(
1370
+ "--report-template",
1371
+ action="append",
1372
+ dest="compilation_report_templates",
1373
+ metavar="REPORT_DESC",
1374
+ default=[],
1375
+ help="""\
1376
+ Report via template. Provide template and output filename 'template.rst.j2:output.rst'. For
1377
+ built-in templates, check the User Manual for what these are. Can be given multiple times.
1378
+ Default is empty.""",
1379
+ )
1380
+
1381
+
1382
+ tracing_group.add_option(
1383
+ "--quiet",
1384
+ action="store_true",
1385
+ dest="quiet",
1386
+ default=False,
1387
+ help="""\
1388
+ Disable all information outputs, but show warnings.
1389
+ Defaults to off.""",
1390
+ )
1391
+
1392
+ tracing_group.add_option(
1393
+ "--show-scons",
1394
+ action="store_true",
1395
+ dest="show_scons",
1396
+ default=False,
1397
+ help="""\
1398
+ Run the C building backend Scons with verbose information, showing the executed commands,
1399
+ detected compilers. Defaults to off.""",
1400
+ )
1401
+
1402
+ tracing_group.add_option(
1403
+ "--no-progressbar",
1404
+ "--no-progress-bar",
1405
+ action="store_false",
1406
+ dest="progress_bar",
1407
+ default=True,
1408
+ github_action=False,
1409
+ help="""Disable progress bars. Defaults to off.""",
1410
+ )
1411
+
1412
+ tracing_group.add_option(
1413
+ "--show-progress",
1414
+ action="store_true",
1415
+ dest="show_progress",
1416
+ default=False,
1417
+ github_action=False,
1418
+ help="""Obsolete: Provide progress information and statistics.
1419
+ Disables normal progress bar. Defaults to off.""",
1420
+ )
1421
+
1422
+ tracing_group.add_option(
1423
+ "--show-memory",
1424
+ action="store_true",
1425
+ dest="show_memory",
1426
+ default=False,
1427
+ help="""Provide memory information and statistics.
1428
+ Defaults to off.""",
1429
+ )
1430
+
1431
+ tracing_group.add_option(
1432
+ "--show-modules",
1433
+ action="store_true",
1434
+ dest="show_inclusion",
1435
+ default=False,
1436
+ github_action=False,
1437
+ help="""\
1438
+ Provide information for included modules and DLLs
1439
+ Obsolete: You should use '--report' file instead. Defaults to off.""",
1440
+ )
1441
+
1442
+ tracing_group.add_option(
1443
+ "--show-modules-output",
1444
+ action="store",
1445
+ dest="show_inclusion_output",
1446
+ metavar="PATH",
1447
+ default=None,
1448
+ github_action=False,
1449
+ help="""\
1450
+ Where to output '--show-modules', should be a filename. Default is standard output.""",
1451
+ )
1452
+
1453
+ tracing_group.add_option(
1454
+ "--verbose",
1455
+ action="store_true",
1456
+ dest="verbose",
1457
+ default=False,
1458
+ github_action=False,
1459
+ help="""\
1460
+ Output details of actions taken, esp. in optimizations. Can become a lot.
1461
+ Defaults to off.""",
1462
+ )
1463
+
1464
+ tracing_group.add_option(
1465
+ "--verbose-output",
1466
+ action="store",
1467
+ dest="verbose_output",
1468
+ metavar="PATH",
1469
+ default=None,
1470
+ github_action=False,
1471
+ help="""\
1472
+ Where to output from '--verbose', should be a filename. Default is standard output.""",
1473
+ )
1474
+
1475
+ del tracing_group
1476
+
1477
+
1478
+ os_group = parser.add_option_group("General OS controls")
1479
+
1480
+ os_group.add_option(
1481
+ "--force-stdout-spec",
1482
+ "--windows-force-stdout-spec",
1483
+ action="store",
1484
+ dest="force_stdout_spec",
1485
+ metavar="FORCE_STDOUT_SPEC",
1486
+ default=None,
1487
+ help="""\
1488
+ Force standard output of the program to go to this location. Useful for programs with
1489
+ disabled console and programs using the Windows Services Plugin of Nuitka commercial.
1490
+ Defaults to not active, use e.g. '{PROGRAM_BASE}.out.txt', i.e. file near your program,
1491
+ check User Manual for full list of available values.""",
1492
+ )
1493
+
1494
+ os_group.add_option(
1495
+ "--force-stderr-spec",
1496
+ "--windows-force-stderr-spec",
1497
+ action="store",
1498
+ dest="force_stderr_spec",
1499
+ metavar="FORCE_STDERR_SPEC",
1500
+ default=None,
1501
+ help="""\
1502
+ Force standard error of the program to go to this location. Useful for programs with
1503
+ disabled console and programs using the Windows Services Plugin of Nuitka commercial.
1504
+ Defaults to not active, use e.g. '{PROGRAM_BASE}.err.txt', i.e. file near your program,
1505
+ check User Manual for full list of available values.""",
1506
+ )
1507
+
1508
+ del os_group
1509
+
1510
+
1511
+ windows_group = parser.add_option_group("Windows specific controls")
1512
+
1513
+ windows_group.add_option(
1514
+ "--windows-console-mode",
1515
+ action="store",
1516
+ dest="console_mode",
1517
+ choices=("force", "disable", "attach", "hide"),
1518
+ metavar="CONSOLE_MODE",
1519
+ default=None,
1520
+ help="""\
1521
+ Select console mode to use. Default mode is 'force' and creates a
1522
+ console window unless the program was started from one. With 'disable'
1523
+ it doesn't create or use a console at all. With 'attach' an existing
1524
+ console will be used for outputs. With 'hide' a newly spawned console
1525
+ will be hidden and an already existing console will behave like
1526
+ 'force'. Default is 'force'.""",
1527
+ )
1528
+
1529
+ windows_group.add_option(
1530
+ "--windows-icon-from-ico",
1531
+ action="append",
1532
+ dest="windows_icon_path",
1533
+ metavar="ICON_PATH",
1534
+ default=[],
1535
+ help="""\
1536
+ Add executable icon. Can be given multiple times for different resolutions
1537
+ or files with multiple icons inside. In the later case, you may also suffix
1538
+ with #<n> where n is an integer index starting from 1, specifying a specific
1539
+ icon to be included, and all others to be ignored.""",
1540
+ )
1541
+
1542
+ windows_group.add_option(
1543
+ "--windows-icon-from-exe",
1544
+ action="store",
1545
+ dest="icon_exe_path",
1546
+ metavar="ICON_EXE_PATH",
1547
+ default=None,
1548
+ help="Copy executable icons from this existing executable (Windows only).",
1549
+ )
1550
+
1551
+ windows_group.add_option(
1552
+ "--onefile-windows-splash-screen-image",
1553
+ action="store",
1554
+ dest="splash_screen_image",
1555
+ default=None,
1556
+ help="""\
1557
+ When compiling for Windows and onefile, show this while loading the application. Defaults to off.""",
1558
+ )
1559
+
1560
+ windows_group.add_option(
1561
+ "--windows-uac-admin",
1562
+ action="store_true",
1563
+ dest="windows_uac_admin",
1564
+ metavar="WINDOWS_UAC_ADMIN",
1565
+ default=False,
1566
+ help="Request Windows User Control, to grant admin rights on execution. (Windows only). Defaults to off.",
1567
+ )
1568
+
1569
+ windows_group.add_option(
1570
+ "--windows-uac-uiaccess", # spell-checker: ignore uiaccess
1571
+ action="store_true",
1572
+ dest="windows_uac_uiaccess",
1573
+ metavar="WINDOWS_UAC_UIACCESS",
1574
+ default=False,
1575
+ help="""\
1576
+ Request Windows User Control, to enforce running from a few folders only, remote
1577
+ desktop access. (Windows only). Defaults to off.""",
1578
+ )
1579
+
1580
+ windows_group.add_option(
1581
+ "--disable-console",
1582
+ "--macos-disable-console",
1583
+ "--windows-disable-console",
1584
+ action="store_true",
1585
+ dest="disable_console",
1586
+ default=None,
1587
+ help=SUPPRESS_HELP,
1588
+ )
1589
+
1590
+ windows_group.add_option(
1591
+ "--enable-console",
1592
+ action="store_false",
1593
+ dest="disable_console",
1594
+ default=None,
1595
+ help=SUPPRESS_HELP,
1596
+ )
1597
+
1598
+ windows_group.add_option(
1599
+ "--windows-dependency-tool",
1600
+ action="store",
1601
+ dest="dependency_tool",
1602
+ default=None,
1603
+ help=SUPPRESS_HELP,
1604
+ )
1605
+
1606
+ windows_group.add_option(
1607
+ "--windows-service",
1608
+ action="store_true",
1609
+ dest="windows_service",
1610
+ metavar="WINDOWS_SERVICE",
1611
+ default=False,
1612
+ help="When compiling for Windows and onefile, enable service mode. Defaults to off.",
1613
+ )
1614
+
1615
+ windows_group.add_option(
1616
+ "--windows-service-name",
1617
+ action="store",
1618
+ dest="windows_service_name",
1619
+ metavar="WINDOWS_SERVICE_NAME",
1620
+ default=None,
1621
+ help="Name of the Windows service.",
1622
+ )
1623
+
1624
+ windows_group.add_option(
1625
+ "--windows-service-display-name",
1626
+ action="store",
1627
+ dest="windows_service_display_name",
1628
+ metavar="WINDOWS_SERVICE_DISPLAY_NAME",
1629
+ default=None,
1630
+ help="Display name of the Windows service.",
1631
+ )
1632
+
1633
+ windows_group.add_option(
1634
+ "--windows-service-description",
1635
+ action="store",
1636
+ dest="windows_service_description",
1637
+ metavar="WINDOWS_SERVICE_DESCRIPTION",
1638
+ default=None,
1639
+ help="Description of the Windows service.",
1640
+ )
1641
+
1642
+ windows_group.add_option(
1643
+ "--windows-service-cmdline",
1644
+ action="store",
1645
+ dest="windows_service_cmdline",
1646
+ metavar="WINDOWS_SERVICE_CMDLINE",
1647
+ default=None,
1648
+ help="Command Line of the Windows service.",
1649
+ )
1650
+
1651
+ windows_group.add_option(
1652
+ "--windows-service-install",
1653
+ action="store",
1654
+ dest="windows_service_install",
1655
+ metavar="WINDOWS_SERVICE_INSTALL",
1656
+ default="install",
1657
+ help="Windows service installation command-line argument (Default \"install\").",
1658
+ )
1659
+
1660
+ windows_group.add_option(
1661
+ "--windows-service-uninstall",
1662
+ action="store",
1663
+ dest="windows_service_uninstall",
1664
+ metavar="WINDOWS_SERVICE_UNINSTALL",
1665
+ default="uninstall",
1666
+ help="Windows service uninstallation command-line argument (Default \"uninstall\").",
1667
+ )
1668
+
1669
+
1670
+ del windows_group
1671
+
1672
+
1673
+ macos_group = parser.add_option_group("macOS specific controls")
1674
+
1675
+ macos_group.add_option(
1676
+ "--macos-create-app-bundle",
1677
+ action="store_true",
1678
+ dest="macos_create_bundle",
1679
+ default=None,
1680
+ github_action=False,
1681
+ help="""\
1682
+ When compiling for macOS, create a bundle rather than a plain binary
1683
+ application. This is the only way to unlock the disabling of console,
1684
+ get high DPI graphics, etc. and implies standalone mode. Defaults to
1685
+ off.""",
1686
+ )
1687
+
1688
+ macos_group.add_option(
1689
+ "--macos-target-arch",
1690
+ action="store",
1691
+ dest="macos_target_arch",
1692
+ choices=("universal", "arm64", "x86_64"),
1693
+ metavar="MACOS_TARGET_ARCH",
1694
+ default=None,
1695
+ help="""\
1696
+ What architectures is this to supposed to run on. Default and limit
1697
+ is what the running Python allows for. Default is "native" which is
1698
+ the architecture the Python is run with.""",
1699
+ )
1700
+
1701
+ macos_group.add_option(
1702
+ "--macos-app-icon",
1703
+ action="append",
1704
+ dest="macos_icon_path",
1705
+ metavar="ICON_PATH",
1706
+ default=[],
1707
+ help="Add icon for the application bundle to use. Can be given only one time. Defaults to Python icon if available.",
1708
+ )
1709
+
1710
+
1711
+ macos_group.add_option(
1712
+ "--macos-signed-app-name",
1713
+ action="store",
1714
+ dest="macos_signed_app_name",
1715
+ metavar="MACOS_SIGNED_APP_NAME",
1716
+ default=None,
1717
+ help="""\
1718
+ Name of the application to use for macOS signing. Follow "com.YourCompany.AppName"
1719
+ naming results for best results, as these have to be globally unique, and will
1720
+ potentially grant protected API accesses.""",
1721
+ )
1722
+
1723
+ macos_group.add_option(
1724
+ "--macos-app-name",
1725
+ action="store",
1726
+ dest="macos_app_name",
1727
+ metavar="MACOS_APP_NAME",
1728
+ default=None,
1729
+ help="""\
1730
+ Name of the product to use in macOS bundle information. Defaults to base
1731
+ filename of the binary.""",
1732
+ )
1733
+
1734
+ macos_group.add_option(
1735
+ "--macos-app-mode",
1736
+ action="store",
1737
+ dest="macos_app_mode",
1738
+ metavar="APP_MODE",
1739
+ choices=("gui", "background", "ui-element"),
1740
+ default=None,
1741
+ help="""\
1742
+ Mode of application for the application bundle. When launching a Window, and appearing
1743
+ in Docker is desired, default value "gui" is a good fit. Without a Window ever, the
1744
+ application is a "background" application. For UI elements that get to display later,
1745
+ "ui-element" is in-between. The application will not appear in dock, but get full
1746
+ access to desktop when it does open a Window later.""",
1747
+ )
1748
+
1749
+ macos_group.add_option(
1750
+ "--macos-prohibit-multiple-instances",
1751
+ action="store_true",
1752
+ dest="macos_prohibit_multiple_instances",
1753
+ default=False,
1754
+ help="""\
1755
+ For application bundles, set the flag "LSMultipleInstancesProhibited" to prevent
1756
+ launching multiple instances of the application. Default is off.""",
1757
+ )
1758
+
1759
+ macos_group.add_option(
1760
+ "--macos-sign-identity",
1761
+ action="store",
1762
+ dest="macos_sign_identity",
1763
+ metavar="MACOS_APP_VERSION",
1764
+ default=None,
1765
+ help="""\
1766
+ When signing on macOS, by default an ad-hoc identify will be used, but with this
1767
+ option your get to specify another identity to use. The signing of code is now
1768
+ mandatory on macOS and cannot be disabled. Use "auto" to detect your only identity
1769
+ installed. Default "ad-hoc" if not given.""",
1770
+ )
1771
+
1772
+ macos_group.add_option(
1773
+ "--macos-sign-notarization",
1774
+ action="store_true",
1775
+ dest="macos_sign_notarization",
1776
+ default=None,
1777
+ help="""\
1778
+ When signing for notarization, using a proper TeamID identity from Apple, use
1779
+ the required runtime signing option, such that it can be accepted.""",
1780
+ )
1781
+
1782
+
1783
+ macos_group.add_option(
1784
+ "--macos-app-version",
1785
+ action="store",
1786
+ dest="macos_app_version",
1787
+ metavar="MACOS_APP_VERSION",
1788
+ default=None,
1789
+ help="""\
1790
+ Product version to use in macOS bundle information. Defaults to "1.0" if
1791
+ not given.""",
1792
+ )
1793
+
1794
+ macos_group.add_option(
1795
+ "--macos-app-protected-resource",
1796
+ action="append",
1797
+ dest="macos_protected_resources",
1798
+ metavar="RESOURCE_DESC",
1799
+ default=[],
1800
+ help="""\
1801
+ Request an entitlement for access to a macOS protected resources, e.g.
1802
+ "NSMicrophoneUsageDescription:Microphone access for recording audio."
1803
+ requests access to the microphone and provides an informative text for
1804
+ the user, why that is needed. Before the colon, is an OS identifier for
1805
+ an access right, then the informative text. Legal values can be found on
1806
+ https://developer.apple.com/documentation/bundleresources/information_property_list/protected_resources and
1807
+ the option can be specified multiple times. Default empty.""",
1808
+ )
1809
+
1810
+
1811
+ del macos_group
1812
+
1813
+
1814
+ linux_group = parser.add_option_group("Linux specific controls")
1815
+
1816
+ linux_group.add_option(
1817
+ "--linux-icon",
1818
+ "--linux-onefile-icon",
1819
+ action="append",
1820
+ dest="linux_icon_path",
1821
+ metavar="ICON_PATH",
1822
+ default=[],
1823
+ help="Add executable icon for onefile binary to use. Can be given only one time. Defaults to Python icon if available.",
1824
+ )
1825
+
1826
+ del linux_group
1827
+
1828
+ version_group = parser.add_option_group("Binary Version Information")
1829
+
1830
+ version_group.add_option(
1831
+ "--company-name",
1832
+ "--windows-company-name",
1833
+ action="store",
1834
+ dest="company_name",
1835
+ metavar="COMPANY_NAME",
1836
+ default=None,
1837
+ help="Name of the company to use in version information. Defaults to unused.",
1838
+ )
1839
+
1840
+ version_group.add_option(
1841
+ "--product-name",
1842
+ "--windows-product-name",
1843
+ action="store",
1844
+ dest="product_name",
1845
+ metavar="PRODUCT_NAME",
1846
+ default=None,
1847
+ help="""\
1848
+ Name of the product to use in version information. Defaults to base filename of the binary.""",
1849
+ )
1850
+
1851
+ version_group.add_option(
1852
+ "--file-version",
1853
+ "--windows-file-version",
1854
+ action="store",
1855
+ dest="file_version",
1856
+ metavar="FILE_VERSION",
1857
+ default=None,
1858
+ help="""\
1859
+ File version to use in version information. Must be a sequence of up to 4
1860
+ numbers, e.g. 1.0 or 1.0.0.0, no more digits are allowed, no strings are
1861
+ allowed. Defaults to unused.""",
1862
+ )
1863
+
1864
+ version_group.add_option(
1865
+ "--product-version",
1866
+ "--windows-product-version",
1867
+ action="store",
1868
+ dest="product_version",
1869
+ metavar="PRODUCT_VERSION",
1870
+ default=None,
1871
+ help="""\
1872
+ Product version to use in version information. Same rules as for file version.
1873
+ Defaults to unused.""",
1874
+ )
1875
+
1876
+ version_group.add_option(
1877
+ "--file-description",
1878
+ "--windows-file-description",
1879
+ action="store",
1880
+ dest="file_description",
1881
+ metavar="FILE_DESCRIPTION",
1882
+ default=None,
1883
+ help="""\
1884
+ Description of the file used in version information. Windows only at this time. Defaults to binary filename.""",
1885
+ )
1886
+
1887
+ version_group.add_option(
1888
+ "--copyright",
1889
+ action="store",
1890
+ dest="legal_copyright",
1891
+ metavar="COPYRIGHT_TEXT",
1892
+ default=None,
1893
+ help="""\
1894
+ Copyright used in version information. Windows/macOS only at this time. Defaults to not present.""",
1895
+ )
1896
+
1897
+ version_group.add_option(
1898
+ "--trademarks",
1899
+ action="store",
1900
+ dest="legal_trademarks",
1901
+ metavar="TRADEMARK_TEXT",
1902
+ default=None,
1903
+ help="""\
1904
+ Trademark used in version information. Windows/macOS only at this time. Defaults to not present.""",
1905
+ )
1906
+
1907
+
1908
+ del version_group
1909
+
1910
+ plugin_group = parser.add_option_group("Plugin control")
1911
+
1912
+ plugin_group.add_option(
1913
+ "--enable-plugins",
1914
+ "--plugin-enable",
1915
+ action="append",
1916
+ dest="plugins_enabled",
1917
+ metavar="PLUGIN_NAME",
1918
+ default=[],
1919
+ help="""\
1920
+ Enabled plugins. Must be plug-in names. Use '--plugin-list' to query the
1921
+ full list and exit. Default empty.""",
1922
+ )
1923
+
1924
+ plugin_group.add_option(
1925
+ "--disable-plugins",
1926
+ "--plugin-disable",
1927
+ action="append",
1928
+ dest="plugins_disabled",
1929
+ metavar="PLUGIN_NAME",
1930
+ default=[],
1931
+ github_action=False,
1932
+ help="""\
1933
+ Disabled plugins. Must be plug-in names. Use '--plugin-list' to query the
1934
+ full list and exit. Most standard plugins are not a good idea to disable.
1935
+ Default empty.""",
1936
+ )
1937
+
1938
+ plugin_group.add_option(
1939
+ "--user-plugin",
1940
+ action="append",
1941
+ dest="user_plugins",
1942
+ metavar="PATH",
1943
+ default=[],
1944
+ help="The file name of user plugin. Can be given multiple times. Default empty.",
1945
+ )
1946
+
1947
+ plugin_group.add_option(
1948
+ "--plugin-list",
1949
+ action="store_true",
1950
+ dest="plugin_list",
1951
+ default=False,
1952
+ require_compiling=False,
1953
+ github_action=False,
1954
+ help="""\
1955
+ Show list of all available plugins and exit. Defaults to off.""",
1956
+ )
1957
+
1958
+ plugin_group.add_option(
1959
+ "--plugin-no-detection",
1960
+ action="store_false",
1961
+ dest="detect_missing_plugins",
1962
+ default=True,
1963
+ help="""\
1964
+ Plugins can detect if they might be used, and the you can disable the warning
1965
+ via "--disable-plugin=plugin-that-warned", or you can use this option to disable
1966
+ the mechanism entirely, which also speeds up compilation slightly of course as
1967
+ this detection code is run in vain once you are certain of which plugins to
1968
+ use. Defaults to off.""",
1969
+ )
1970
+
1971
+ plugin_group.add_option(
1972
+ "--module-parameter",
1973
+ action="append",
1974
+ dest="module_parameters",
1975
+ default=[],
1976
+ help="""\
1977
+ Provide a module parameter. You are asked by some packages
1978
+ to provide extra decisions. Format is currently
1979
+ --module-parameter=module.name-option-name=value
1980
+ Default empty.""",
1981
+ )
1982
+
1983
+ plugin_group.add_option(
1984
+ "--show-source-changes",
1985
+ action="append",
1986
+ dest="show_source_changes",
1987
+ default=[],
1988
+ github_action=False,
1989
+ help="""\
1990
+ Show source changes to original Python file content before compilation. Mostly
1991
+ intended for developing plugins and Nuitka package configuration. Use e.g.
1992
+ '--show-source-changes=numpy.**' to see all changes below a given namespace
1993
+ or use '*' to see everything which can get a lot.
1994
+ Default empty.""",
1995
+ )
1996
+
1997
+ del plugin_group
1998
+
1999
+ target_group = parser.add_option_group("Cross compilation")
2000
+
2001
+
2002
+ target_group.add_option(
2003
+ "--target",
2004
+ action="store",
2005
+ dest="target_desc",
2006
+ metavar="TARGET_DESC",
2007
+ default=None,
2008
+ help="""\
2009
+ Cross compilation target. Highly experimental and in development, not
2010
+ supposed to work yet. We are working on '--target=wasi' and nothing
2011
+ else yet.""",
2012
+ )
2013
+
2014
+ del target_group
2015
+
2016
+
2017
+ def _considerPluginOptions(logger):
2018
+ # Cyclic dependency on plugins during parsing of command line.
2019
+ from nuitka.plugins.Plugins import (
2020
+ addPluginCommandLineOptions,
2021
+ addStandardPluginCommandLineOptions,
2022
+ addUserPluginCommandLineOptions,
2023
+ )
2024
+
2025
+ addStandardPluginCommandLineOptions(
2026
+ parser=parser, plugin_help_mode=plugin_help_mode
2027
+ )
2028
+
2029
+ for arg in sys.argv[1:]:
2030
+ if arg.startswith(
2031
+ ("--enable-plugin=", "--enable-plugins=", "--plugin-enable=")
2032
+ ):
2033
+ plugin_names = arg.split("=", 1)[1]
2034
+ if "=" in plugin_names:
2035
+ logger.sysexit(
2036
+ "Error, plugin options format changed. Use '--enable-plugin=%s --help' to know new options."
2037
+ % plugin_names.split("=", 1)[0]
2038
+ )
2039
+
2040
+ addPluginCommandLineOptions(
2041
+ parser=parser,
2042
+ plugin_names=plugin_names.split(","),
2043
+ plugin_help_mode=plugin_help_mode,
2044
+ )
2045
+
2046
+ if arg.startswith("--user-plugin="):
2047
+ plugin_name = arg[14:]
2048
+ if "=" in plugin_name:
2049
+ logger.sysexit(
2050
+ "Error, plugin options format changed. Use '--user-plugin=%s --help' to know new options."
2051
+ % plugin_name.split("=", 1)[0]
2052
+ )
2053
+
2054
+ addUserPluginCommandLineOptions(parser=parser, filename=plugin_name)
2055
+
2056
+
2057
+ run_time_variable_names = (
2058
+ "TEMP",
2059
+ "PID",
2060
+ "TIME",
2061
+ "PROGRAM",
2062
+ "PROGRAM_BASE",
2063
+ "PROGRAM_DIR",
2064
+ "CACHE_DIR",
2065
+ "COMPANY",
2066
+ "PRODUCT",
2067
+ "VERSION",
2068
+ "HOME",
2069
+ "NONE",
2070
+ "NULL",
2071
+ )
2072
+
2073
+
2074
+ class _RetainingFormatter(Formatter):
2075
+ def get_value(self, key, args, kwargs):
2076
+ if isinstance(key, str):
2077
+ try:
2078
+ return kwargs[key]
2079
+ except KeyError:
2080
+ return "{%s}" % key
2081
+ else:
2082
+ return Formatter.get_value(self, key, args, kwargs)
2083
+
2084
+
2085
+ def _expandProjectArg(arg, filename_arg, for_eval):
2086
+ def wrap(value):
2087
+ if for_eval:
2088
+ return repr(value)
2089
+ else:
2090
+ return value
2091
+
2092
+ values = {
2093
+ "OS": wrap(getOS()),
2094
+ "Arch": wrap(getArchitecture()),
2095
+ "Flavor": wrap(getPythonFlavorName()),
2096
+ "Version": getNuitkaVersion(),
2097
+ "Commercial": wrap(getCommercialVersion()),
2098
+ "MAIN_DIRECTORY": wrap(os.path.dirname(filename_arg) or "."),
2099
+ "GIL": isPythonWithGil(),
2100
+ }
2101
+
2102
+ if isLinux():
2103
+ dist_info = getLinuxDistribution()
2104
+ else:
2105
+ dist_info = "N/A", "N/A", "0"
2106
+
2107
+ values["Linux_Distribution_Name"] = dist_info[0]
2108
+ values["Linux_Distribution_Base"] = dist_info[1] or dist_info[0]
2109
+ values["Linux_Distribution_Version"] = dist_info[2]
2110
+
2111
+ if isWin32OrPosixWindows():
2112
+ values["WindowsRelease"] = getWindowsRelease()
2113
+
2114
+ values.update(
2115
+ (
2116
+ (run_time_variable_name, "{%s}" % run_time_variable_name)
2117
+ for run_time_variable_name in run_time_variable_names
2118
+ )
2119
+ )
2120
+
2121
+ arg = _RetainingFormatter().format(arg, **values)
2122
+
2123
+ return arg
2124
+
2125
+
2126
+ def getNuitkaProjectOptions(logger, filename_arg, module_mode):
2127
+ """Extract the Nuitka project options.
2128
+
2129
+ Note: This is used by Nuitka project and test tools as well.
2130
+ """
2131
+
2132
+ # Complex stuff, pylint: disable=too-many-branches,too-many-locals,too-many-statements
2133
+
2134
+ if os.path.isdir(filename_arg):
2135
+ if module_mode:
2136
+ filename_arg = os.path.join(filename_arg, "__init__.py")
2137
+ else:
2138
+ filename_arg = os.path.join(filename_arg, "__main__.py")
2139
+
2140
+ # The file specified may not exist, let the later parts of Nuitka handle this.
2141
+ try:
2142
+ contents_by_line = getFileContentByLine(filename_arg, "rb")
2143
+ except (OSError, IOError):
2144
+ return
2145
+
2146
+ def sysexit(count, message):
2147
+ logger.sysexit("%s:%d %s" % (filename_arg, count + 1, message))
2148
+
2149
+ execute_block = True
2150
+ expect_block = False
2151
+
2152
+ cond_level = -1
2153
+
2154
+ for line_number, line in enumerate(contents_by_line):
2155
+ match = re.match(b"^\\s*#(\\s*)nuitka-project(.*?):(.*)", line)
2156
+
2157
+ if match:
2158
+ level, command, arg = match.groups()
2159
+ level = len(level)
2160
+ arg = arg.rstrip()
2161
+
2162
+ # Check for empty conditional blocks.
2163
+ if expect_block and level <= cond_level:
2164
+ sysexit(
2165
+ line_number,
2166
+ "Error, 'nuitka-project-if|else' is expected to be followed by block start.",
2167
+ )
2168
+
2169
+ expect_block = False
2170
+
2171
+ if level == cond_level and command == b"-else":
2172
+ execute_block = not execute_block
2173
+ elif level <= cond_level:
2174
+ execute_block = True
2175
+
2176
+ if level > cond_level and not execute_block:
2177
+ continue
2178
+
2179
+ if str is not bytes:
2180
+ command = command.decode("utf8")
2181
+ arg = arg.decode("utf8")
2182
+
2183
+ if command == "-if":
2184
+ if not arg.endswith(":"):
2185
+ sysexit(
2186
+ line_number,
2187
+ "Error, 'nuitka-project-if' needs to start a block with a colon at line end.",
2188
+ )
2189
+
2190
+ arg = arg[:-1].strip()
2191
+
2192
+ expanded = _expandProjectArg(arg, filename_arg, for_eval=True)
2193
+
2194
+ with withNoSyntaxWarning():
2195
+ r = eval( # We allow the user to run any code, pylint: disable=eval-used
2196
+ expanded
2197
+ )
2198
+
2199
+ # Likely mistakes, e.g. with "in" tests.
2200
+ if r is not True and r is not False:
2201
+ sys.exit(
2202
+ "Error, 'nuitka-project-if' condition %r (expanded to %r) does not yield boolean result %r"
2203
+ % (arg, expanded, r)
2204
+ )
2205
+
2206
+ execute_block = r
2207
+ expect_block = True
2208
+ cond_level = level
2209
+ elif command == "-else":
2210
+ if arg:
2211
+ sysexit(
2212
+ line_number,
2213
+ "Error, 'nuitka-project-else' cannot have argument.",
2214
+ )
2215
+
2216
+ if cond_level != level:
2217
+ sysexit(
2218
+ line_number,
2219
+ "Error, 'nuitka-project-else' not currently allowed after nested nuitka-project-if.",
2220
+ )
2221
+
2222
+ expect_block = True
2223
+ cond_level = level
2224
+ elif command == "":
2225
+ arg = re.sub(r"""^([\w-]*=)(['"])(.*)\2$""", r"\1\3", arg.lstrip())
2226
+
2227
+ if not arg:
2228
+ continue
2229
+
2230
+ yield _expandProjectArg(arg, filename_arg, for_eval=False)
2231
+ else:
2232
+ assert False, (command, line)
2233
+
2234
+
2235
+ def _considerGithubWorkflowOptions(phase):
2236
+ try:
2237
+ github_option_index = sys.argv.index("--github-workflow-options")
2238
+ except ValueError:
2239
+ return
2240
+
2241
+ import json
2242
+
2243
+ early_names = (
2244
+ "main",
2245
+ "script-name",
2246
+ "enable-plugin",
2247
+ "enable-plugins",
2248
+ "disable-plugin",
2249
+ "disable-plugins",
2250
+ "user-plugin",
2251
+ )
2252
+
2253
+ def filterByName(key):
2254
+ # Not for Nuitka at all.
2255
+ if key in (
2256
+ "nuitka-version",
2257
+ "working-directory",
2258
+ "access-token",
2259
+ "disable-cache",
2260
+ ):
2261
+ return False
2262
+
2263
+ # Ignore platform specific options.
2264
+ if key.startswith("macos-") and not isMacOS():
2265
+ return False
2266
+ if (key.startswith("windows-") or key == "mingw64") and not isWin32Windows():
2267
+ return False
2268
+ if key.startswith("linux-") and not isLinux():
2269
+ return False
2270
+
2271
+ if phase == "early":
2272
+ return key in early_names
2273
+ else:
2274
+ return key not in early_names
2275
+
2276
+ options_added = []
2277
+
2278
+ for key, value in json.loads(os.environ["NUITKA_WORKFLOW_INPUTS"]).items():
2279
+ if not value:
2280
+ continue
2281
+
2282
+ if not filterByName(key):
2283
+ continue
2284
+
2285
+ option_name = "--%s" % key
2286
+
2287
+ if parser.isBooleanOption(option_name):
2288
+ if value == "false":
2289
+ continue
2290
+
2291
+ options_added.append(option_name)
2292
+ elif parser.isListOption(option_name):
2293
+ for value in value.split("\n"):
2294
+ if not value.strip():
2295
+ continue
2296
+
2297
+ options_added.append("%s=%s" % (option_name, value))
2298
+ else:
2299
+ # Boolean disabled options from inactive plugins that default to off.
2300
+ if value == "false":
2301
+ continue
2302
+
2303
+ options_added.append("%s=%s" % (option_name, value))
2304
+
2305
+ sys.argv = (
2306
+ sys.argv[: github_option_index + (1 if phase == "early" else 0)]
2307
+ + options_added
2308
+ + sys.argv[github_option_index + 1 :]
2309
+ )
2310
+
2311
+
2312
+ def parseOptions(logger):
2313
+ # Pretty complex code, having a small options parser and many details as
2314
+ # well as integrating with plugins and run modes. pylint: disable=too-many-branches
2315
+
2316
+ # First, isolate the first non-option arguments.
2317
+ extra_args = []
2318
+
2319
+ if is_nuitka_run:
2320
+ count = 0
2321
+
2322
+ for count, arg in enumerate(sys.argv):
2323
+ if count == 0:
2324
+ continue
2325
+
2326
+ if arg[0] != "-":
2327
+ break
2328
+
2329
+ # Treat "--" as a terminator.
2330
+ if arg == "--":
2331
+ count += 1
2332
+ break
2333
+
2334
+ if count > 0:
2335
+ extra_args = sys.argv[count + 1 :]
2336
+ sys.argv = sys.argv[0 : count + 1]
2337
+
2338
+ filename_args = []
2339
+ module_mode = False
2340
+
2341
+ # Options may be coming from GitHub workflow configuration as well.
2342
+ _considerGithubWorkflowOptions(phase="early")
2343
+
2344
+ for count, arg in enumerate(sys.argv):
2345
+ if count == 0:
2346
+ continue
2347
+
2348
+ if arg.startswith(("--main=", "--script-name=")):
2349
+ filename_args.append(arg.split("=", 1)[1])
2350
+
2351
+ if arg in ("--mode=module", "--mode=module", "--module=package"):
2352
+ module_mode = True
2353
+
2354
+ if arg[0] != "-":
2355
+ filename_args.append(arg)
2356
+ break
2357
+
2358
+ for filename in filename_args:
2359
+ sys.argv = (
2360
+ [sys.argv[0]]
2361
+ + list(getNuitkaProjectOptions(logger, filename, module_mode))
2362
+ + sys.argv[1:]
2363
+ )
2364
+
2365
+ # Next, lets activate plugins early, so they can inject more options to the parser.
2366
+ _considerPluginOptions(logger)
2367
+
2368
+ # Options may be coming from GitHub workflow configuration as well.
2369
+ _considerGithubWorkflowOptions(phase="late")
2370
+
2371
+ options, positional_args = parser.parse_args()
2372
+
2373
+ if (
2374
+ not positional_args
2375
+ and not options.mains
2376
+ and not parser.hasNonCompilingAction(options)
2377
+ ):
2378
+ parser.print_help()
2379
+
2380
+ logger.sysexit(
2381
+ """
2382
+ Error, need filename argument with python module or main program."""
2383
+ )
2384
+
2385
+ if not options.immediate_execution and len(positional_args) > 1:
2386
+ parser.print_help()
2387
+
2388
+ logger.sysexit(
2389
+ """
2390
+ Error, specify only one positional argument unless "--run" is specified to
2391
+ pass them to the compiled program execution."""
2392
+ )
2393
+
2394
+ return is_nuitka_run, options, positional_args, extra_args
2395
+
2396
+
2397
+ def runSpecialCommandsFromOptions(options):
2398
+ if options.plugin_list:
2399
+ from nuitka.plugins.Plugins import listPlugins
2400
+
2401
+ listPlugins()
2402
+ sys.exit(0)
2403
+
2404
+ if options.list_package_dlls:
2405
+ from nuitka.tools.scanning.DisplayPackageDLLs import displayDLLs
2406
+
2407
+ displayDLLs(options.list_package_dlls)
2408
+ sys.exit(0)
2409
+
2410
+ if options.list_package_exe:
2411
+ from nuitka.tools.scanning.DisplayPackageDLLs import displayEXEs
2412
+
2413
+ displayEXEs(options.list_package_exe)
2414
+ sys.exit(0)
2415
+
2416
+ if options.list_package_data:
2417
+ from nuitka.tools.scanning.DisplayPackageData import displayPackageData
2418
+
2419
+ displayPackageData(options.list_package_data)
2420
+ sys.exit(0)
2421
+
2422
+ if options.list_distribution_metadata:
2423
+ from nuitka.tools.scanning.DisplayDistributions import (
2424
+ displayDistributions,
2425
+ )
2426
+
2427
+ displayDistributions()
2428
+ sys.exit(0)
2429
+
2430
+ if options.edit_module_code:
2431
+ from nuitka.tools.general.find_module.FindModuleCode import (
2432
+ editModuleCode,
2433
+ )
2434
+
2435
+ editModuleCode(options.edit_module_code)
2436
+ sys.exit(0)
2437
+
2438
+ if options.create_environment_from_report:
2439
+ from nuitka.tools.environments.CreateEnvironment import (
2440
+ createEnvironmentFromReport,
2441
+ )
2442
+
2443
+ createEnvironmentFromReport(
2444
+ environment_folder=os.path.expanduser(
2445
+ options.create_environment_from_report
2446
+ ),
2447
+ report_filename=os.path.expanduser(options.compilation_report_filename),
2448
+ )
2449
+ sys.exit(0)
2450
+
2451
+ if options.generate_mingw64_header:
2452
+ from nuitka.tools.general.generate_header.GenerateHeader import (
2453
+ generateHeader,
2454
+ )
2455
+
2456
+ generateHeader()
2457
+ sys.exit(0)
2458
+
2459
+
2460
+ # Part of "Nuitka", an optimizing Python compiler that is compatible and
2461
+ # integrates with CPython, but also works on its own.
2462
+ #
2463
+ # Licensed under the Apache License, Version 2.0 (the "License");
2464
+ # you may not use this file except in compliance with the License.
2465
+ # You may obtain a copy of the License at
2466
+ #
2467
+ # http://www.apache.org/licenses/LICENSE-2.0
2468
+ #
2469
+ # Unless required by applicable law or agreed to in writing, software
2470
+ # distributed under the License is distributed on an "AS IS" BASIS,
2471
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2472
+ # See the License for the specific language governing permissions and
2473
+ # limitations under the License.