pforge 1.0.0__py3-none-any.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.
Files changed (1090) hide show
  1. pforge/Builtins.py +288 -0
  2. pforge/BytecodeCaching.py +209 -0
  3. pforge/Bytecodes.py +124 -0
  4. pforge/CacheCleanup.py +59 -0
  5. pforge/Constants.py +510 -0
  6. pforge/Errors.py +104 -0
  7. pforge/HardImportRegistry.py +591 -0
  8. pforge/MainControl.py +1535 -0
  9. pforge/ModuleRegistry.py +401 -0
  10. pforge/OutputDirectories.py +314 -0
  11. pforge/Policies.py +125 -0
  12. pforge/PostProcessing.py +621 -0
  13. pforge/Progress.py +930 -0
  14. pforge/PythonFlavors.py +556 -0
  15. pforge/PythonOperators.py +319 -0
  16. pforge/PythonPrefixes.py +285 -0
  17. pforge/PythonVersions.py +594 -0
  18. pforge/Serialization.py +359 -0
  19. pforge/SourceCodeReferences.py +181 -0
  20. pforge/States.py +59 -0
  21. pforge/Tracing.py +776 -0
  22. pforge/TreeXML.py +178 -0
  23. pforge/Variables.py +597 -0
  24. pforge/Version.py +91 -0
  25. pforge/VersionCheck.py +364 -0
  26. pforge/__init__.py +35 -0
  27. pforge/__main__.py +340 -0
  28. pforge/__past__.py +280 -0
  29. pforge/build/AIXObjGenerator.py +153 -0
  30. pforge/build/AdaptPythonHeaderFiles.py +505 -0
  31. pforge/build/Backend.scons +555 -0
  32. pforge/build/CCompilerVersion.scons +70 -0
  33. pforge/build/ConstantBlobFormat.py +440 -0
  34. pforge/build/DataComposerInterface.py +217 -0
  35. pforge/build/Offsets.scons +189 -0
  36. pforge/build/Onefile.scons +220 -0
  37. pforge/build/SconsCaching.py +586 -0
  38. pforge/build/SconsCompilerSettings.py +2419 -0
  39. pforge/build/SconsControl.py +170 -0
  40. pforge/build/SconsHacks.py +259 -0
  41. pforge/build/SconsInterface.py +996 -0
  42. pforge/build/SconsProgress.py +104 -0
  43. pforge/build/SconsPythonBuild.py +248 -0
  44. pforge/build/SconsSourceIndex.py +353 -0
  45. pforge/build/SconsSpawn.py +594 -0
  46. pforge/build/SconsStableIncludePaths.py +277 -0
  47. pforge/build/SconsUtils.py +1388 -0
  48. pforge/build/WindowsObjGenerator.py +175 -0
  49. pforge/build/__init__.py +22 -0
  50. pforge/build/include/pforge/allocator.h +1024 -0
  51. pforge/build/include/pforge/blobs.h +130 -0
  52. pforge/build/include/pforge/builtins.h +106 -0
  53. pforge/build/include/pforge/calling.h +140 -0
  54. pforge/build/include/pforge/checkers.h +63 -0
  55. pforge/build/include/pforge/checksum_tools.h +33 -0
  56. pforge/build/include/pforge/compiled_asyncgen.h +285 -0
  57. pforge/build/include/pforge/compiled_cell.h +89 -0
  58. pforge/build/include/pforge/compiled_coroutine.h +282 -0
  59. pforge/build/include/pforge/compiled_frame.h +896 -0
  60. pforge/build/include/pforge/compiled_function.h +176 -0
  61. pforge/build/include/pforge/compiled_generator.h +310 -0
  62. pforge/build/include/pforge/compiled_method.h +64 -0
  63. pforge/build/include/pforge/compiled_types_common.h +117 -0
  64. pforge/build/include/pforge/constants.h +202 -0
  65. pforge/build/include/pforge/constants_blob.h +62 -0
  66. pforge/build/include/pforge/constants_blob_spec.h +116 -0
  67. pforge/build/include/pforge/cpython_api_compat.h +46 -0
  68. pforge/build/include/pforge/debug_settings.h +63 -0
  69. pforge/build/include/pforge/defines.h +79 -0
  70. pforge/build/include/pforge/environment_variables.h +38 -0
  71. pforge/build/include/pforge/environment_variables_system.h +57 -0
  72. pforge/build/include/pforge/exception_groups.h +631 -0
  73. pforge/build/include/pforge/exceptions.h +1495 -0
  74. pforge/build/include/pforge/filesystem_paths.h +130 -0
  75. pforge/build/include/pforge/freelists.h +162 -0
  76. pforge/build/include/pforge/gc_runtime.h +170 -0
  77. pforge/build/include/pforge/hedley.h +1825 -0
  78. pforge/build/include/pforge/helper/attributes.h +98 -0
  79. pforge/build/include/pforge/helper/boolean.h +107 -0
  80. pforge/build/include/pforge/helper/bytearrays.h +44 -0
  81. pforge/build/include/pforge/helper/bytes.h +42 -0
  82. pforge/build/include/pforge/helper/calling_generated.h +139 -0
  83. pforge/build/include/pforge/helper/comparisons_dual_eq.h +58 -0
  84. pforge/build/include/pforge/helper/comparisons_dual_ge.h +50 -0
  85. pforge/build/include/pforge/helper/comparisons_dual_gt.h +50 -0
  86. pforge/build/include/pforge/helper/comparisons_dual_le.h +58 -0
  87. pforge/build/include/pforge/helper/comparisons_dual_lt.h +58 -0
  88. pforge/build/include/pforge/helper/comparisons_dual_ne.h +50 -0
  89. pforge/build/include/pforge/helper/comparisons_eq.h +263 -0
  90. pforge/build/include/pforge/helper/comparisons_ge.h +207 -0
  91. pforge/build/include/pforge/helper/comparisons_gt.h +207 -0
  92. pforge/build/include/pforge/helper/comparisons_le.h +263 -0
  93. pforge/build/include/pforge/helper/comparisons_lt.h +263 -0
  94. pforge/build/include/pforge/helper/comparisons_ne.h +207 -0
  95. pforge/build/include/pforge/helper/complex.h +57 -0
  96. pforge/build/include/pforge/helper/dict_internals.h +123 -0
  97. pforge/build/include/pforge/helper/dictionaries.h +568 -0
  98. pforge/build/include/pforge/helper/floats.h +41 -0
  99. pforge/build/include/pforge/helper/import_hard.h +153 -0
  100. pforge/build/include/pforge/helper/indexes.h +53 -0
  101. pforge/build/include/pforge/helper/ints.h +188 -0
  102. pforge/build/include/pforge/helper/iterators.h +467 -0
  103. pforge/build/include/pforge/helper/lists.h +113 -0
  104. pforge/build/include/pforge/helper/lists_generated.h +43 -0
  105. pforge/build/include/pforge/helper/long_helpers.h +78 -0
  106. pforge/build/include/pforge/helper/mappings.h +67 -0
  107. pforge/build/include/pforge/helper/operations.h +126 -0
  108. pforge/build/include/pforge/helper/operations_binary_add.h +268 -0
  109. pforge/build/include/pforge/helper/operations_binary_bitand.h +118 -0
  110. pforge/build/include/pforge/helper/operations_binary_bitor.h +118 -0
  111. pforge/build/include/pforge/helper/operations_binary_bitxor.h +118 -0
  112. pforge/build/include/pforge/helper/operations_binary_divmod.h +113 -0
  113. pforge/build/include/pforge/helper/operations_binary_dual_add.h +45 -0
  114. pforge/build/include/pforge/helper/operations_binary_dual_sub.h +49 -0
  115. pforge/build/include/pforge/helper/operations_binary_floordiv.h +113 -0
  116. pforge/build/include/pforge/helper/operations_binary_lshift.h +109 -0
  117. pforge/build/include/pforge/helper/operations_binary_matmult.h +70 -0
  118. pforge/build/include/pforge/helper/operations_binary_mod.h +314 -0
  119. pforge/build/include/pforge/helper/operations_binary_mult.h +275 -0
  120. pforge/build/include/pforge/helper/operations_binary_olddiv.h +135 -0
  121. pforge/build/include/pforge/helper/operations_binary_pow.h +100 -0
  122. pforge/build/include/pforge/helper/operations_binary_rshift.h +109 -0
  123. pforge/build/include/pforge/helper/operations_binary_sub.h +142 -0
  124. pforge/build/include/pforge/helper/operations_binary_truediv.h +113 -0
  125. pforge/build/include/pforge/helper/operations_builtin_types.h +268 -0
  126. pforge/build/include/pforge/helper/operations_inplace_add.h +181 -0
  127. pforge/build/include/pforge/helper/operations_inplace_bitand.h +84 -0
  128. pforge/build/include/pforge/helper/operations_inplace_bitor.h +84 -0
  129. pforge/build/include/pforge/helper/operations_inplace_bitxor.h +84 -0
  130. pforge/build/include/pforge/helper/operations_inplace_floordiv.h +103 -0
  131. pforge/build/include/pforge/helper/operations_inplace_lshift.h +70 -0
  132. pforge/build/include/pforge/helper/operations_inplace_matmult.h +68 -0
  133. pforge/build/include/pforge/helper/operations_inplace_mod.h +226 -0
  134. pforge/build/include/pforge/helper/operations_inplace_mult.h +192 -0
  135. pforge/build/include/pforge/helper/operations_inplace_olddiv.h +123 -0
  136. pforge/build/include/pforge/helper/operations_inplace_pow.h +95 -0
  137. pforge/build/include/pforge/helper/operations_inplace_rshift.h +70 -0
  138. pforge/build/include/pforge/helper/operations_inplace_sub.h +110 -0
  139. pforge/build/include/pforge/helper/operations_inplace_truediv.h +103 -0
  140. pforge/build/include/pforge/helper/pow_helpers.h +41 -0
  141. pforge/build/include/pforge/helper/raising.h +130 -0
  142. pforge/build/include/pforge/helper/rangeobjects.h +75 -0
  143. pforge/build/include/pforge/helper/repeat_helpers.h +41 -0
  144. pforge/build/include/pforge/helper/richcomparisons.h +39 -0
  145. pforge/build/include/pforge/helper/sequences.h +42 -0
  146. pforge/build/include/pforge/helper/sets.h +30 -0
  147. pforge/build/include/pforge/helper/slices.h +320 -0
  148. pforge/build/include/pforge/helper/strings.h +41 -0
  149. pforge/build/include/pforge/helper/subscripts.h +463 -0
  150. pforge/build/include/pforge/helper/tuples.h +220 -0
  151. pforge/build/include/pforge/helpers.h +512 -0
  152. pforge/build/include/pforge/importing.h +180 -0
  153. pforge/build/include/pforge/incbin.h +360 -0
  154. pforge/build/include/pforge/jit_sources.h +34 -0
  155. pforge/build/include/pforge/prelude.h +610 -0
  156. pforge/build/include/pforge/printing.h +92 -0
  157. pforge/build/include/pforge/python_internals_access.h +461 -0
  158. pforge/build/include/pforge/python_pgo.h +66 -0
  159. pforge/build/include/pforge/python_pgo_spec.h +69 -0
  160. pforge/build/include/pforge/safe_string_ops.h +78 -0
  161. pforge/build/include/pforge/string_functions.h +99 -0
  162. pforge/build/include/pforge/threading.h +158 -0
  163. pforge/build/include/pforge/tracing.h +86 -0
  164. pforge/build/include/pforge/type_aliases.h +42 -0
  165. pforge/build/include/pforge/unfreezing.h +200 -0
  166. pforge/build/inline_copy/appdirs/LICENSE.txt +23 -0
  167. pforge/build/inline_copy/appdirs/appdirs.py +611 -0
  168. pforge/build/inline_copy/bin/scons.py +68 -0
  169. pforge/build/inline_copy/jinja2/LICENSE.rst +28 -0
  170. pforge/build/inline_copy/jinja2/README.rst +2 -0
  171. pforge/build/inline_copy/jinja2/jinja2/__init__.py +72 -0
  172. pforge/build/inline_copy/jinja2/jinja2/_compat.py +105 -0
  173. pforge/build/inline_copy/jinja2/jinja2/_identifier.py +2 -0
  174. pforge/build/inline_copy/jinja2/jinja2/bccache.py +361 -0
  175. pforge/build/inline_copy/jinja2/jinja2/compiler.py +1721 -0
  176. pforge/build/inline_copy/jinja2/jinja2/constants.py +32 -0
  177. pforge/build/inline_copy/jinja2/jinja2/debug.py +378 -0
  178. pforge/build/inline_copy/jinja2/jinja2/defaults.py +56 -0
  179. pforge/build/inline_copy/jinja2/jinja2/environment.py +1276 -0
  180. pforge/build/inline_copy/jinja2/jinja2/exceptions.py +146 -0
  181. pforge/build/inline_copy/jinja2/jinja2/ext.py +627 -0
  182. pforge/build/inline_copy/jinja2/jinja2/filters.py +1190 -0
  183. pforge/build/inline_copy/jinja2/jinja2/idtracking.py +286 -0
  184. pforge/build/inline_copy/jinja2/jinja2/lexer.py +739 -0
  185. pforge/build/inline_copy/jinja2/jinja2/loaders.py +481 -0
  186. pforge/build/inline_copy/jinja2/jinja2/meta.py +106 -0
  187. pforge/build/inline_copy/jinja2/jinja2/nativetypes.py +220 -0
  188. pforge/build/inline_copy/jinja2/jinja2/nodes.py +999 -0
  189. pforge/build/inline_copy/jinja2/jinja2/optimizer.py +49 -0
  190. pforge/build/inline_copy/jinja2/jinja2/parser.py +903 -0
  191. pforge/build/inline_copy/jinja2/jinja2/runtime.py +808 -0
  192. pforge/build/inline_copy/jinja2/jinja2/sandbox.py +488 -0
  193. pforge/build/inline_copy/jinja2/jinja2/tests.py +174 -0
  194. pforge/build/inline_copy/jinja2/jinja2/utils.py +642 -0
  195. pforge/build/inline_copy/jinja2/jinja2/visitor.py +87 -0
  196. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Action.py +1619 -0
  197. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Builder.py +918 -0
  198. pforge/build/inline_copy/lib/scons-4.10.1/SCons/CacheDir.py +404 -0
  199. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Conftest.py +870 -0
  200. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Debug.py +254 -0
  201. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Defaults.py +760 -0
  202. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Environment.py +2910 -0
  203. pforge/build/inline_copy/lib/scons-4.10.1/SCons/EnvironmentValues.py +119 -0
  204. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Errors.py +222 -0
  205. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Executor.py +665 -0
  206. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Memoize.py +242 -0
  207. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Node/Alias.py +150 -0
  208. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Node/FS.py +3861 -0
  209. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Node/__init__.py +1807 -0
  210. pforge/build/inline_copy/lib/scons-4.10.1/SCons/PathList.py +227 -0
  211. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/__init__.py +381 -0
  212. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/aix.py +80 -0
  213. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/cygwin.py +62 -0
  214. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/darwin.py +71 -0
  215. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/hpux.py +45 -0
  216. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/irix.py +41 -0
  217. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/mingw.py +35 -0
  218. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/os2.py +56 -0
  219. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/posix.py +125 -0
  220. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/virtualenv.py +135 -0
  221. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Platform/win32.py +447 -0
  222. pforge/build/inline_copy/lib/scons-4.10.1/SCons/SConf.py +1174 -0
  223. pforge/build/inline_copy/lib/scons-4.10.1/SCons/SConsign.py +442 -0
  224. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Scanner/C.py +333 -0
  225. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Scanner/Dir.py +131 -0
  226. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Scanner/Prog.py +114 -0
  227. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Scanner/RC.py +57 -0
  228. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Scanner/__init__.py +438 -0
  229. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Script/Interactive.py +377 -0
  230. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Script/Main.py +1601 -0
  231. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Script/SConsOptions.py +1260 -0
  232. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Script/SConscript.py +713 -0
  233. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Script/__init__.py +498 -0
  234. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Subst.py +1003 -0
  235. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Taskmaster/Job.py +762 -0
  236. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Taskmaster/__init__.py +1137 -0
  237. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/386asm.py +61 -0
  238. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/GettextCommon.py +429 -0
  239. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/Config.py +396 -0
  240. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/Dispatcher.py +84 -0
  241. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/Exceptions.py +56 -0
  242. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/Kind.py +668 -0
  243. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/Policy.py +330 -0
  244. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/Registry.py +121 -0
  245. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/ScriptArguments.py +1103 -0
  246. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/SetupEnvDefault.py +236 -0
  247. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/Util.py +494 -0
  248. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/Warnings.py +35 -0
  249. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/WinSDK.py +264 -0
  250. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/MSVC/__init__.py +56 -0
  251. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/__init__.py +101 -0
  252. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/arch.py +66 -0
  253. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/common.py +653 -0
  254. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/netframework.py +82 -0
  255. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/sdk.py +412 -0
  256. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/vc.py +2949 -0
  257. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/MSCommon/vs.py +647 -0
  258. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/PharLapCommon.py +116 -0
  259. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/__init__.py +893 -0
  260. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/aixc++.py +43 -0
  261. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/aixcc.py +74 -0
  262. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/aixcxx.py +77 -0
  263. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/aixlink.py +78 -0
  264. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/applelink.py +209 -0
  265. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/ar.py +63 -0
  266. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/as.py +49 -0
  267. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/asm.py +78 -0
  268. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/bcc32.py +81 -0
  269. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/c++.py +44 -0
  270. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/cc.py +105 -0
  271. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/clang.py +91 -0
  272. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/clangCommon/__init__.py +18 -0
  273. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/clangxx.py +99 -0
  274. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/cxx.py +95 -0
  275. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/cyglink.py +235 -0
  276. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/default.py +45 -0
  277. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/filesystem.py +94 -0
  278. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/g++.py +45 -0
  279. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/gas.py +56 -0
  280. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/gcc.py +108 -0
  281. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/gnulink.py +73 -0
  282. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/gxx.py +80 -0
  283. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/hpc++.py +45 -0
  284. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/hpcc.py +53 -0
  285. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/hpcxx.py +85 -0
  286. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/hplink.py +72 -0
  287. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/icc.py +59 -0
  288. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/icl.py +52 -0
  289. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/ilink32.py +60 -0
  290. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/install.py +510 -0
  291. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/intelc.py +617 -0
  292. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/link.py +72 -0
  293. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/linkCommon/LoadableModule.py +131 -0
  294. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/linkCommon/SharedLibrary.py +218 -0
  295. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/linkCommon/__init__.py +175 -0
  296. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/linkloc.py +112 -0
  297. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/m4.py +63 -0
  298. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/masm.py +77 -0
  299. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/mingw.py +224 -0
  300. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/msgfmt.py +132 -0
  301. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/msginit.py +137 -0
  302. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/msgmerge.py +125 -0
  303. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/mslib.py +78 -0
  304. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/mslink.py +344 -0
  305. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/mssdk.py +52 -0
  306. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/msvc.py +333 -0
  307. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/msvs.py +2197 -0
  308. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/mwcc.py +207 -0
  309. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/mwld.py +108 -0
  310. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/nasm.py +72 -0
  311. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/rpcgen.py +70 -0
  312. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/tlib.py +53 -0
  313. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/wix.py +104 -0
  314. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Tool/xgettext.py +337 -0
  315. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Util/__init__.py +1423 -0
  316. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Util/envs.py +350 -0
  317. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Util/filelock.py +151 -0
  318. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Util/hashes.py +406 -0
  319. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Util/sctypes.py +383 -0
  320. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Util/stats.py +224 -0
  321. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Utilities/ConfigureCache.py +171 -0
  322. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Utilities/__init__.py +0 -0
  323. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Utilities/sconsign.py +492 -0
  324. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Variables/BoolVariable.py +105 -0
  325. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Variables/EnumVariable.py +148 -0
  326. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Variables/ListVariable.py +237 -0
  327. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Variables/PackageVariable.py +136 -0
  328. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Variables/PathVariable.py +174 -0
  329. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Variables/__init__.py +468 -0
  330. pforge/build/inline_copy/lib/scons-4.10.1/SCons/Warnings.py +300 -0
  331. pforge/build/inline_copy/lib/scons-4.10.1/SCons/__init__.py +9 -0
  332. pforge/build/inline_copy/lib/scons-4.10.1/SCons/compat/__init__.py +104 -0
  333. pforge/build/inline_copy/lib/scons-4.10.1/SCons/compat/_scons_dbm.py +42 -0
  334. pforge/build/inline_copy/lib/scons-4.10.1/SCons/compat/win32.py +101 -0
  335. pforge/build/inline_copy/lib/scons-4.10.1/SCons/cpp.py +684 -0
  336. pforge/build/inline_copy/lib/scons-4.10.1/SCons/dblite.py +351 -0
  337. pforge/build/inline_copy/lib/scons-4.10.1/SCons/exitfuncs.py +59 -0
  338. pforge/build/inline_copy/markupsafe/LICENSE.rst +28 -0
  339. pforge/build/inline_copy/markupsafe/markupsafe/__init__.py +327 -0
  340. pforge/build/inline_copy/markupsafe/markupsafe/_compat.py +33 -0
  341. pforge/build/inline_copy/markupsafe/markupsafe/_constants.py +264 -0
  342. pforge/build/inline_copy/markupsafe/markupsafe/_native.py +69 -0
  343. pforge/build/inline_copy/pkg_resources/pkg_resources/__init__.py +3275 -0
  344. pforge/build/inline_copy/pkg_resources/pkg_resources/py31compat.py +21 -0
  345. pforge/build/inline_copy/python_hacl/LICENSE.txt +201 -0
  346. pforge/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.c +1430 -0
  347. pforge/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_MD5.h +66 -0
  348. pforge/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.c +463 -0
  349. pforge/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA1.h +66 -0
  350. pforge/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.c +1273 -0
  351. pforge/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA2.h +204 -0
  352. pforge/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.c +734 -0
  353. pforge/build/inline_copy/python_hacl/hacl_312/Hacl_Hash_SHA3.h +131 -0
  354. pforge/build/inline_copy/python_hacl/hacl_312/Hacl_Streaming_Types.h +83 -0
  355. pforge/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt128_Verified.h +346 -0
  356. pforge/build/inline_copy/python_hacl/hacl_312/include/krml/FStar_UInt_8_16_32_64.h +107 -0
  357. pforge/build/inline_copy/python_hacl/hacl_312/include/krml/fstar_uint128_struct_endianness.h +68 -0
  358. pforge/build/inline_copy/python_hacl/hacl_312/include/krml/internal/target.h +293 -0
  359. pforge/build/inline_copy/python_hacl/hacl_312/include/krml/lowstar_endianness.h +231 -0
  360. pforge/build/inline_copy/python_hacl/hacl_312/include/krml/types.h +14 -0
  361. pforge/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_MD5.h +56 -0
  362. pforge/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA1.h +56 -0
  363. pforge/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA2.h +164 -0
  364. pforge/build/inline_copy/python_hacl/hacl_312/internal/Hacl_Hash_SHA3.h +65 -0
  365. pforge/build/inline_copy/python_hacl/hacl_312/python_hacl_namespaces.h +89 -0
  366. pforge/build/inline_copy/stubgen/astunparse.py +938 -0
  367. pforge/build/inline_copy/stubgen/six.py +998 -0
  368. pforge/build/inline_copy/stubgen/stubgen.py +850 -0
  369. pforge/build/inline_copy/tqdm/tqdm/__init__.py +40 -0
  370. pforge/build/inline_copy/tqdm/tqdm/_main.py +9 -0
  371. pforge/build/inline_copy/tqdm/tqdm/_monitor.py +97 -0
  372. pforge/build/inline_copy/tqdm/tqdm/_tqdm.py +9 -0
  373. pforge/build/inline_copy/tqdm/tqdm/_tqdm_notebook.py +9 -0
  374. pforge/build/inline_copy/tqdm/tqdm/_tqdm_pandas.py +24 -0
  375. pforge/build/inline_copy/tqdm/tqdm/_utils.py +12 -0
  376. pforge/build/inline_copy/tqdm/tqdm/auto.py +44 -0
  377. pforge/build/inline_copy/tqdm/tqdm/autonotebook.py +28 -0
  378. pforge/build/inline_copy/tqdm/tqdm/dask.py +46 -0
  379. pforge/build/inline_copy/tqdm/tqdm/notebook.py +316 -0
  380. pforge/build/inline_copy/tqdm/tqdm/std.py +1527 -0
  381. pforge/build/inline_copy/tqdm/tqdm/tk.py +207 -0
  382. pforge/build/inline_copy/tqdm/tqdm/utils.py +351 -0
  383. pforge/build/inline_copy/tqdm/tqdm/version.py +2 -0
  384. pforge/build/inline_copy/yaml/LICENSE +20 -0
  385. pforge/build/inline_copy/yaml/yaml/__init__.py +427 -0
  386. pforge/build/inline_copy/yaml/yaml/composer.py +139 -0
  387. pforge/build/inline_copy/yaml/yaml/constructor.py +748 -0
  388. pforge/build/inline_copy/yaml/yaml/cyaml.py +101 -0
  389. pforge/build/inline_copy/yaml/yaml/dumper.py +62 -0
  390. pforge/build/inline_copy/yaml/yaml/emitter.py +1137 -0
  391. pforge/build/inline_copy/yaml/yaml/error.py +75 -0
  392. pforge/build/inline_copy/yaml/yaml/events.py +86 -0
  393. pforge/build/inline_copy/yaml/yaml/loader.py +63 -0
  394. pforge/build/inline_copy/yaml/yaml/nodes.py +49 -0
  395. pforge/build/inline_copy/yaml/yaml/parser.py +589 -0
  396. pforge/build/inline_copy/yaml/yaml/reader.py +185 -0
  397. pforge/build/inline_copy/yaml/yaml/representer.py +389 -0
  398. pforge/build/inline_copy/yaml/yaml/resolver.py +227 -0
  399. pforge/build/inline_copy/yaml/yaml/scanner.py +1435 -0
  400. pforge/build/inline_copy/yaml/yaml/serializer.py +111 -0
  401. pforge/build/inline_copy/yaml/yaml/tokens.py +104 -0
  402. pforge/build/inline_copy/zlib/LICENSE +22 -0
  403. pforge/build/inline_copy/zlib/crc32.c +991 -0
  404. pforge/build/inline_copy/zlib/crc32.h +9446 -0
  405. pforge/build/inline_copy/zlib/zconf.h +397 -0
  406. pforge/build/inline_copy/zlib/zutil.h +275 -0
  407. pforge/build/inline_copy/zstd/LICENSE.txt +30 -0
  408. pforge/build/inline_copy/zstd/common/bitstream.h +463 -0
  409. pforge/build/inline_copy/zstd/common/compiler.h +288 -0
  410. pforge/build/inline_copy/zstd/common/cpu.h +213 -0
  411. pforge/build/inline_copy/zstd/common/debug.h +107 -0
  412. pforge/build/inline_copy/zstd/common/entropy_common.c +360 -0
  413. pforge/build/inline_copy/zstd/common/error_private.c +56 -0
  414. pforge/build/inline_copy/zstd/common/error_private.h +80 -0
  415. pforge/build/inline_copy/zstd/common/fse.h +715 -0
  416. pforge/build/inline_copy/zstd/common/fse_decompress.c +393 -0
  417. pforge/build/inline_copy/zstd/common/huf.h +361 -0
  418. pforge/build/inline_copy/zstd/common/mem.h +426 -0
  419. pforge/build/inline_copy/zstd/common/xxhash.c +826 -0
  420. pforge/build/inline_copy/zstd/common/xxhash.h +285 -0
  421. pforge/build/inline_copy/zstd/common/zstd_common.c +83 -0
  422. pforge/build/inline_copy/zstd/common/zstd_deps.h +111 -0
  423. pforge/build/inline_copy/zstd/common/zstd_errors.h +95 -0
  424. pforge/build/inline_copy/zstd/common/zstd_internal.h +478 -0
  425. pforge/build/inline_copy/zstd/decompress/huf_decompress.c +1350 -0
  426. pforge/build/inline_copy/zstd/decompress/zstd_ddict.c +244 -0
  427. pforge/build/inline_copy/zstd/decompress/zstd_ddict.h +44 -0
  428. pforge/build/inline_copy/zstd/decompress/zstd_decompress.c +1930 -0
  429. pforge/build/inline_copy/zstd/decompress/zstd_decompress_block.c +1540 -0
  430. pforge/build/inline_copy/zstd/decompress/zstd_decompress_block.h +62 -0
  431. pforge/build/inline_copy/zstd/decompress/zstd_decompress_internal.h +190 -0
  432. pforge/build/inline_copy/zstd/zstd.h +2391 -0
  433. pforge/build/python_internal_offset/offsets_3.13-Windows-x86-gil-debug.json +6 -0
  434. pforge/build/python_internal_offset/offsets_3.13-Windows-x86-gil.json +6 -0
  435. pforge/build/python_internal_offset/offsets_3.13-Windows-x86_64-gil-debug.json +6 -0
  436. pforge/build/python_internal_offset/offsets_3.13-Windows-x86_64-gil.json +6 -0
  437. pforge/build/python_internal_offset/offsets_3.14-Windows-x86-gil-debug.json +7 -0
  438. pforge/build/python_internal_offset/offsets_3.14-Windows-x86-gil.json +7 -0
  439. pforge/build/python_internal_offset/offsets_3.14-Windows-x86_64-gil-debug.json +7 -0
  440. pforge/build/python_internal_offset/offsets_3.14-Windows-x86_64-gil.json +7 -0
  441. pforge/build/python_internal_offset/offsets_3.15-Windows-x86-gil-debug.json +7 -0
  442. pforge/build/python_internal_offset/offsets_3.15-Windows-x86-gil.json +7 -0
  443. pforge/build/python_internal_offset/offsets_3.15-Windows-x86_64-gil-debug.json +7 -0
  444. pforge/build/python_internal_offset/offsets_3.15-Windows-x86_64-gil.json +7 -0
  445. pforge/build/static_src/CompiledAsyncgenType.c +2393 -0
  446. pforge/build/static_src/CompiledCellType.c +324 -0
  447. pforge/build/static_src/CompiledCodeHelpers.c +2387 -0
  448. pforge/build/static_src/CompiledCoroutineType.c +2061 -0
  449. pforge/build/static_src/CompiledFrameLocalsProxyType.c +868 -0
  450. pforge/build/static_src/CompiledFrameType.c +1752 -0
  451. pforge/build/static_src/CompiledFunctionType.c +3608 -0
  452. pforge/build/static_src/CompiledGeneratorType.c +2064 -0
  453. pforge/build/static_src/CompiledGeneratorTypeUncompiledIntegration.c +2708 -0
  454. pforge/build/static_src/CompiledMethodType.c +701 -0
  455. pforge/build/static_src/HelpersAllocator.c +1132 -0
  456. pforge/build/static_src/HelpersAttributes.c +1261 -0
  457. pforge/build/static_src/HelpersBuiltin.c +1104 -0
  458. pforge/build/static_src/HelpersBuiltinTypeMethods.c +3678 -0
  459. pforge/build/static_src/HelpersBytes.c +148 -0
  460. pforge/build/static_src/HelpersCalling.c +400 -0
  461. pforge/build/static_src/HelpersCallingGenerated.c +14688 -0
  462. pforge/build/static_src/HelpersChecksumTools.c +72 -0
  463. pforge/build/static_src/HelpersClasses.c +94 -0
  464. pforge/build/static_src/HelpersComparisonDualEq.c +201 -0
  465. pforge/build/static_src/HelpersComparisonDualGe.c +139 -0
  466. pforge/build/static_src/HelpersComparisonDualGt.c +139 -0
  467. pforge/build/static_src/HelpersComparisonDualLe.c +201 -0
  468. pforge/build/static_src/HelpersComparisonDualLt.c +201 -0
  469. pforge/build/static_src/HelpersComparisonDualNe.c +139 -0
  470. pforge/build/static_src/HelpersComparisonEq.c +12140 -0
  471. pforge/build/static_src/HelpersComparisonEqUtils.c +174 -0
  472. pforge/build/static_src/HelpersComparisonGe.c +11910 -0
  473. pforge/build/static_src/HelpersComparisonGt.c +11894 -0
  474. pforge/build/static_src/HelpersComparisonLe.c +12032 -0
  475. pforge/build/static_src/HelpersComparisonLt.c +12016 -0
  476. pforge/build/static_src/HelpersComparisonNe.c +12014 -0
  477. pforge/build/static_src/HelpersConsole.c +233 -0
  478. pforge/build/static_src/HelpersConstantsBlob.c +1780 -0
  479. pforge/build/static_src/HelpersDeepcopy.c +810 -0
  480. pforge/build/static_src/HelpersDialogs.c +232 -0
  481. pforge/build/static_src/HelpersDictionaries.c +4383 -0
  482. pforge/build/static_src/HelpersDictionariesGenerated.c +476 -0
  483. pforge/build/static_src/HelpersDictionariesSetGenerated.c +1043 -0
  484. pforge/build/static_src/HelpersDumpBacktraces.c +157 -0
  485. pforge/build/static_src/HelpersEnvironmentVariables.c +68 -0
  486. pforge/build/static_src/HelpersEnvironmentVariablesSystem.c +125 -0
  487. pforge/build/static_src/HelpersExceptions.c +322 -0
  488. pforge/build/static_src/HelpersFiles.c +366 -0
  489. pforge/build/static_src/HelpersFilesystemPaths.c +1636 -0
  490. pforge/build/static_src/HelpersFloats.c +107 -0
  491. pforge/build/static_src/HelpersHeapStorage.c +99 -0
  492. pforge/build/static_src/HelpersImport.c +604 -0
  493. pforge/build/static_src/HelpersImportHard.c +644 -0
  494. pforge/build/static_src/HelpersJitSources.c +52 -0
  495. pforge/build/static_src/HelpersLists.c +1214 -0
  496. pforge/build/static_src/HelpersListsGenerated.c +568 -0
  497. pforge/build/static_src/HelpersMappings.c +49 -0
  498. pforge/build/static_src/HelpersMatching.c +212 -0
  499. pforge/build/static_src/HelpersOperationBinaryAdd.c +6751 -0
  500. pforge/build/static_src/HelpersOperationBinaryAddUtils.c +834 -0
  501. pforge/build/static_src/HelpersOperationBinaryBitand.c +2744 -0
  502. pforge/build/static_src/HelpersOperationBinaryBitor.c +2744 -0
  503. pforge/build/static_src/HelpersOperationBinaryBitxor.c +2744 -0
  504. pforge/build/static_src/HelpersOperationBinaryDivmod.c +2412 -0
  505. pforge/build/static_src/HelpersOperationBinaryDivmodUtils.c +36 -0
  506. pforge/build/static_src/HelpersOperationBinaryDualAdd.c +176 -0
  507. pforge/build/static_src/HelpersOperationBinaryDualSub.c +242 -0
  508. pforge/build/static_src/HelpersOperationBinaryFloordiv.c +2428 -0
  509. pforge/build/static_src/HelpersOperationBinaryLshift.c +2852 -0
  510. pforge/build/static_src/HelpersOperationBinaryMatmult.c +459 -0
  511. pforge/build/static_src/HelpersOperationBinaryMod.c +6555 -0
  512. pforge/build/static_src/HelpersOperationBinaryMult.c +6712 -0
  513. pforge/build/static_src/HelpersOperationBinaryMultUtils.c +142 -0
  514. pforge/build/static_src/HelpersOperationBinaryOlddiv.c +2361 -0
  515. pforge/build/static_src/HelpersOperationBinaryPow.c +2923 -0
  516. pforge/build/static_src/HelpersOperationBinaryPowUtils.c +29 -0
  517. pforge/build/static_src/HelpersOperationBinaryRshift.c +2712 -0
  518. pforge/build/static_src/HelpersOperationBinarySub.c +2880 -0
  519. pforge/build/static_src/HelpersOperationBinaryTruediv.c +2421 -0
  520. pforge/build/static_src/HelpersOperationInplaceAdd.c +5219 -0
  521. pforge/build/static_src/HelpersOperationInplaceAddUtils.c +151 -0
  522. pforge/build/static_src/HelpersOperationInplaceBitand.c +1830 -0
  523. pforge/build/static_src/HelpersOperationInplaceBitor.c +1830 -0
  524. pforge/build/static_src/HelpersOperationInplaceBitxor.c +1830 -0
  525. pforge/build/static_src/HelpersOperationInplaceFloordiv.c +2609 -0
  526. pforge/build/static_src/HelpersOperationInplaceLshift.c +1598 -0
  527. pforge/build/static_src/HelpersOperationInplaceMatmult.c +607 -0
  528. pforge/build/static_src/HelpersOperationInplaceMod.c +4766 -0
  529. pforge/build/static_src/HelpersOperationInplaceMult.c +4695 -0
  530. pforge/build/static_src/HelpersOperationInplaceOlddiv.c +2557 -0
  531. pforge/build/static_src/HelpersOperationInplacePow.c +3063 -0
  532. pforge/build/static_src/HelpersOperationInplaceRshift.c +1538 -0
  533. pforge/build/static_src/HelpersOperationInplaceSub.c +2900 -0
  534. pforge/build/static_src/HelpersOperationInplaceTruediv.c +2616 -0
  535. pforge/build/static_src/HelpersProfiling.c +107 -0
  536. pforge/build/static_src/HelpersPythonPgo.c +1137 -0
  537. pforge/build/static_src/HelpersRaising.c +473 -0
  538. pforge/build/static_src/HelpersSafeStrings.c +282 -0
  539. pforge/build/static_src/HelpersSequences.c +179 -0
  540. pforge/build/static_src/HelpersSlices.c +87 -0
  541. pforge/build/static_src/HelpersStrings.c +1260 -0
  542. pforge/build/static_src/HelpersTuples.c +180 -0
  543. pforge/build/static_src/HelpersTypes.c +1240 -0
  544. pforge/build/static_src/HelpersWarnings.c +86 -0
  545. pforge/build/static_src/InspectPatcher.c +700 -0
  546. pforge/build/static_src/MainProgram.c +2611 -0
  547. pforge/build/static_src/MetaPathBasedLoader.c +3817 -0
  548. pforge/build/static_src/MetaPathBasedLoaderImportlibMetadataDistribution.c +135 -0
  549. pforge/build/static_src/MetaPathBasedLoaderResourceReader.c +218 -0
  550. pforge/build/static_src/MetaPathBasedLoaderResourceReaderFiles.c +845 -0
  551. pforge/build/static_src/OnefileBootstrap.c +2098 -0
  552. pforge/build/static_src/OnefileSplashScreen.cpp +301 -0
  553. pforge/code_generation/AnnotateFunctionCodes.py +234 -0
  554. pforge/code_generation/AsyncgenCodes.py +199 -0
  555. pforge/code_generation/AttributeCodes.py +360 -0
  556. pforge/code_generation/BinaryOperationHelperDefinitions.py +740 -0
  557. pforge/code_generation/BranchCodes.py +68 -0
  558. pforge/code_generation/BuiltinCodes.py +642 -0
  559. pforge/code_generation/CallCodes.py +1280 -0
  560. pforge/code_generation/ClassCodes.py +288 -0
  561. pforge/code_generation/CodeGeneration.py +1228 -0
  562. pforge/code_generation/CodeHelperSelection.py +84 -0
  563. pforge/code_generation/CodeHelpers.py +459 -0
  564. pforge/code_generation/CodeObjectCodes.py +33 -0
  565. pforge/code_generation/ComparisonCodes.py +575 -0
  566. pforge/code_generation/ComparisonHelperDefinitions.py +158 -0
  567. pforge/code_generation/ConditionalCodes.py +236 -0
  568. pforge/code_generation/ConstantCodes.py +454 -0
  569. pforge/code_generation/Contexts.py +1275 -0
  570. pforge/code_generation/CoroutineCodes.py +265 -0
  571. pforge/code_generation/CtypesCodes.py +49 -0
  572. pforge/code_generation/DeferredReleaseCodes.py +68 -0
  573. pforge/code_generation/DictCodes.py +946 -0
  574. pforge/code_generation/Emission.py +69 -0
  575. pforge/code_generation/ErrorCodes.py +457 -0
  576. pforge/code_generation/EvalCodes.py +464 -0
  577. pforge/code_generation/ExceptionCodes.py +378 -0
  578. pforge/code_generation/ExpressionCTypeSelectionHelpers.py +230 -0
  579. pforge/code_generation/ExpressionCodes.py +64 -0
  580. pforge/code_generation/FrameCodes.py +669 -0
  581. pforge/code_generation/FunctionCodes.py +1064 -0
  582. pforge/code_generation/GeneratorCodes.py +230 -0
  583. pforge/code_generation/GlobalConstants.py +286 -0
  584. pforge/code_generation/GlobalsLocalsCodes.py +226 -0
  585. pforge/code_generation/IdCodes.py +54 -0
  586. pforge/code_generation/ImportCodes.py +789 -0
  587. pforge/code_generation/Indentation.py +34 -0
  588. pforge/code_generation/IndexCodes.py +53 -0
  589. pforge/code_generation/IntegerCodes.py +111 -0
  590. pforge/code_generation/IteratorCodes.py +588 -0
  591. pforge/code_generation/JitCodes.py +47 -0
  592. pforge/code_generation/LabelCodes.py +68 -0
  593. pforge/code_generation/LineNumberCodes.py +98 -0
  594. pforge/code_generation/ListCodes.py +506 -0
  595. pforge/code_generation/LoaderCodes.py +449 -0
  596. pforge/code_generation/LocalsDictCodes.py +370 -0
  597. pforge/code_generation/LoopCodes.py +111 -0
  598. pforge/code_generation/MatchCodes.py +68 -0
  599. pforge/code_generation/ModuleCodes.py +313 -0
  600. pforge/code_generation/Namify.py +292 -0
  601. pforge/code_generation/NetworkxCodes.py +54 -0
  602. pforge/code_generation/OperationCodes.py +404 -0
  603. pforge/code_generation/PackageResourceCodes.py +1129 -0
  604. pforge/code_generation/PgoCodes.py +217 -0
  605. pforge/code_generation/PrintCodes.py +96 -0
  606. pforge/code_generation/PythonAPICodes.py +279 -0
  607. pforge/code_generation/PythonSourceCodeGeneration.py +1247 -0
  608. pforge/code_generation/RaisingCodes.py +490 -0
  609. pforge/code_generation/Reports.py +118 -0
  610. pforge/code_generation/ReturnCodes.py +166 -0
  611. pforge/code_generation/SetCodes.py +199 -0
  612. pforge/code_generation/SliceCodes.py +468 -0
  613. pforge/code_generation/SpecialConstantData.py +76 -0
  614. pforge/code_generation/StringCodes.py +406 -0
  615. pforge/code_generation/SubscriptCodes.py +255 -0
  616. pforge/code_generation/TensorflowCodes.py +57 -0
  617. pforge/code_generation/TryCodes.py +360 -0
  618. pforge/code_generation/TupleCodes.py +116 -0
  619. pforge/code_generation/TypeAliasCodes.py +182 -0
  620. pforge/code_generation/VariableCodes.py +596 -0
  621. pforge/code_generation/VariableDeclarations.py +432 -0
  622. pforge/code_generation/YieldCodes.py +274 -0
  623. pforge/code_generation/__init__.py +22 -0
  624. pforge/code_generation/c_types/CTypeBases.py +191 -0
  625. pforge/code_generation/c_types/CTypeBooleans.py +105 -0
  626. pforge/code_generation/c_types/CTypeCFloats.py +62 -0
  627. pforge/code_generation/c_types/CTypeCLongs.py +46 -0
  628. pforge/code_generation/c_types/CTypeModuleDictVariables.py +114 -0
  629. pforge/code_generation/c_types/CTypePforgeBooleans.py +151 -0
  630. pforge/code_generation/c_types/CTypePforgeInts.py +201 -0
  631. pforge/code_generation/c_types/CTypePforgeVoids.py +110 -0
  632. pforge/code_generation/c_types/CTypePyObjectPointers.py +709 -0
  633. pforge/code_generation/c_types/CTypeVoids.py +93 -0
  634. pforge/code_generation/c_types/__init__.py +22 -0
  635. pforge/code_generation/templates/CodeTemplatesAsyncgens.py +108 -0
  636. pforge/code_generation/templates/CodeTemplatesConstants.py +323 -0
  637. pforge/code_generation/templates/CodeTemplatesCoroutines.py +111 -0
  638. pforge/code_generation/templates/CodeTemplatesExceptions.py +81 -0
  639. pforge/code_generation/templates/CodeTemplatesFrames.py +225 -0
  640. pforge/code_generation/templates/CodeTemplatesFunction.py +131 -0
  641. pforge/code_generation/templates/CodeTemplatesGeneratorFunction.py +131 -0
  642. pforge/code_generation/templates/CodeTemplatesIterators.py +40 -0
  643. pforge/code_generation/templates/CodeTemplatesLoader.py +183 -0
  644. pforge/code_generation/templates/CodeTemplatesModules.py +714 -0
  645. pforge/code_generation/templates/CodeTemplatesVariables.py +439 -0
  646. pforge/code_generation/templates/TemplateDebugWrapper.py +83 -0
  647. pforge/code_generation/templates/__init__.py +22 -0
  648. pforge/code_generation/templates_c/CodeTemplateCallsMethodPositional.c.j2 +324 -0
  649. pforge/code_generation/templates_c/CodeTemplateCallsMixed.c.j2 +146 -0
  650. pforge/code_generation/templates_c/CodeTemplateCallsPositional.c.j2 +694 -0
  651. pforge/code_generation/templates_c/CodeTemplateCallsPositionalMethodDescr.c.j2 +169 -0
  652. pforge/code_generation/templates_c/CodeTemplateMakeListHinted.c.j2 +41 -0
  653. pforge/code_generation/templates_c/CodeTemplateMakeListSmall.c.j2 +44 -0
  654. pforge/code_generation/templates_c/HelperBuiltinMethodOperation.c.j2 +56 -0
  655. pforge/code_generation/templates_c/HelperDictionaryCopy.c.j2 +334 -0
  656. pforge/code_generation/templates_c/HelperDictionarySet.c.j2 +613 -0
  657. pforge/code_generation/templates_c/HelperImportHard.c.j2 +40 -0
  658. pforge/code_generation/templates_c/HelperLongTools.c.j2 +56 -0
  659. pforge/code_generation/templates_c/HelperObjectTools.c.j2 +23 -0
  660. pforge/code_generation/templates_c/HelperOperationBinary.c.j2 +151 -0
  661. pforge/code_generation/templates_c/HelperOperationBinaryDual.c.j2 +118 -0
  662. pforge/code_generation/templates_c/HelperOperationComparison.c.j2 +355 -0
  663. pforge/code_generation/templates_c/HelperOperationComparisonBytes.c.j2 +118 -0
  664. pforge/code_generation/templates_c/HelperOperationComparisonDual.c.j2 +89 -0
  665. pforge/code_generation/templates_c/HelperOperationComparisonFloat.c.j2 +34 -0
  666. pforge/code_generation/templates_c/HelperOperationComparisonInt.c.j2 +35 -0
  667. pforge/code_generation/templates_c/HelperOperationComparisonList.c.j2 +131 -0
  668. pforge/code_generation/templates_c/HelperOperationComparisonLong.c.j2 +160 -0
  669. pforge/code_generation/templates_c/HelperOperationComparisonStr.c.j2 +118 -0
  670. pforge/code_generation/templates_c/HelperOperationComparisonTuple.c.j2 +102 -0
  671. pforge/code_generation/templates_c/HelperOperationComparisonUnicode.c.j2 +118 -0
  672. pforge/code_generation/templates_c/HelperOperationInplace.c.j2 +290 -0
  673. pforge/code_generation/templates_c/HelperSlotsBinary.c.j2 +441 -0
  674. pforge/code_generation/templates_c/HelperSlotsBytes.c.j2 +54 -0
  675. pforge/code_generation/templates_c/HelperSlotsCommon.c.j2 +74 -0
  676. pforge/code_generation/templates_c/HelperSlotsFloat.c.j2 +387 -0
  677. pforge/code_generation/templates_c/HelperSlotsInt.c.j2 +414 -0
  678. pforge/code_generation/templates_c/HelperSlotsList.c.j2 +62 -0
  679. pforge/code_generation/templates_c/HelperSlotsLong.c.j2 +232 -0
  680. pforge/code_generation/templates_c/HelperSlotsSet.c.j2 +50 -0
  681. pforge/code_generation/templates_c/HelperSlotsStr.c.j2 +58 -0
  682. pforge/code_generation/templates_c/HelperSlotsTuple.c.j2 +61 -0
  683. pforge/code_generation/templates_c/HelperSlotsUnicode.c.j2 +65 -0
  684. pforge/containers/Namedtuples.py +63 -0
  685. pforge/containers/OrderedDicts.py +191 -0
  686. pforge/containers/OrderedSets.py +43 -0
  687. pforge/containers/OrderedSetsFallback.py +142 -0
  688. pforge/containers/__init__.py +22 -0
  689. pforge/distutils/Build.py +79 -0
  690. pforge/distutils/DistutilsCommands.py +516 -0
  691. pforge/distutils/__init__.py +22 -0
  692. pforge/finalizations/Finalization.py +38 -0
  693. pforge/finalizations/FinalizeMarkups.py +124 -0
  694. pforge/finalizations/__init__.py +22 -0
  695. pforge/format/BiomeFormatter.py +147 -0
  696. pforge/format/FileFormatting.py +392 -0
  697. pforge/format/PythonFormatting.py +477 -0
  698. pforge/format/YamlChecker.py +239 -0
  699. pforge/format/YamlFormatter.py +476 -0
  700. pforge/format/__init__.py +28 -0
  701. pforge/format/biome.json +10 -0
  702. pforge/freezer/DllDependenciesCommon.py +221 -0
  703. pforge/freezer/DllDependenciesMacOS.py +642 -0
  704. pforge/freezer/DllDependenciesPosix.py +256 -0
  705. pforge/freezer/DllDependenciesWin32.py +683 -0
  706. pforge/freezer/DllDependenciesWin32DependsExe.py +331 -0
  707. pforge/freezer/DllDependenciesWin32PEFile.py +130 -0
  708. pforge/freezer/DllDependenciesWin32WinDepends.py +329 -0
  709. pforge/freezer/ImportDetection.py +367 -0
  710. pforge/freezer/IncludedDataFiles.py +1319 -0
  711. pforge/freezer/IncludedEntryPoints.py +568 -0
  712. pforge/freezer/LinuxApp.py +256 -0
  713. pforge/freezer/MacOSApp.py +270 -0
  714. pforge/freezer/Onefile.py +364 -0
  715. pforge/freezer/Standalone.py +845 -0
  716. pforge/freezer/__init__.py +22 -0
  717. pforge/importing/FakeModules.py +117 -0
  718. pforge/importing/IgnoreListing.py +449 -0
  719. pforge/importing/ImportCache.py +98 -0
  720. pforge/importing/ImportResolving.py +187 -0
  721. pforge/importing/Importing.py +1729 -0
  722. pforge/importing/ImportingResults.py +48 -0
  723. pforge/importing/PreloadedPackages.py +169 -0
  724. pforge/importing/Recursion.py +881 -0
  725. pforge/importing/StandardLibrary.py +459 -0
  726. pforge/importing/__init__.py +22 -0
  727. pforge/installer/Installer.py +147 -0
  728. pforge/installer/LinuxInstaller.py +137 -0
  729. pforge/installer/MacOSDmg.py +197 -0
  730. pforge/installer/WindowsInstaller.py +162 -0
  731. pforge/installer/__init__.py +22 -0
  732. pforge/installer/backends/AppImageBackend.py +261 -0
  733. pforge/installer/backends/NsisBackend.py +522 -0
  734. pforge/installer/backends/NsisTemplate.nsi +105 -0
  735. pforge/installer/backends/__init__.py +26 -0
  736. pforge/nodes/AsyncgenNodes.py +89 -0
  737. pforge/nodes/AttributeLookupNodes.py +127 -0
  738. pforge/nodes/AttributeNodes.py +400 -0
  739. pforge/nodes/AttributeNodesGenerated.py +10978 -0
  740. pforge/nodes/BuiltinAllNodes.py +116 -0
  741. pforge/nodes/BuiltinAnyNodes.py +125 -0
  742. pforge/nodes/BuiltinComplexNodes.py +92 -0
  743. pforge/nodes/BuiltinDecodingNodes.py +55 -0
  744. pforge/nodes/BuiltinDecoratorNodes.py +92 -0
  745. pforge/nodes/BuiltinDictNodes.py +231 -0
  746. pforge/nodes/BuiltinFormatNodes.py +165 -0
  747. pforge/nodes/BuiltinHashNodes.py +70 -0
  748. pforge/nodes/BuiltinInputNodes.py +46 -0
  749. pforge/nodes/BuiltinIntegerNodes.py +194 -0
  750. pforge/nodes/BuiltinIteratorNodes.py +743 -0
  751. pforge/nodes/BuiltinLenNodes.py +64 -0
  752. pforge/nodes/BuiltinNextNodes.py +118 -0
  753. pforge/nodes/BuiltinOpenNodes.py +103 -0
  754. pforge/nodes/BuiltinOperationNodeBasesGenerated.py +7382 -0
  755. pforge/nodes/BuiltinRangeNodes.py +701 -0
  756. pforge/nodes/BuiltinRefNodes.py +328 -0
  757. pforge/nodes/BuiltinSumNodes.py +111 -0
  758. pforge/nodes/BuiltinTemplateNodes.py +74 -0
  759. pforge/nodes/BuiltinTypeNodes.py +491 -0
  760. pforge/nodes/BuiltinVarsNodes.py +51 -0
  761. pforge/nodes/BytesNodes.py +830 -0
  762. pforge/nodes/CallNodes.py +220 -0
  763. pforge/nodes/Checkers.py +58 -0
  764. pforge/nodes/ChildrenHavingMixins.py +24956 -0
  765. pforge/nodes/ClassNodes.py +581 -0
  766. pforge/nodes/CodeObjectSpecs.py +518 -0
  767. pforge/nodes/ComparisonNodes.py +691 -0
  768. pforge/nodes/ConditionalNodes.py +946 -0
  769. pforge/nodes/ConstantRefNodes.py +1894 -0
  770. pforge/nodes/ContainerMakingNodes.py +412 -0
  771. pforge/nodes/ContainerOperationNodes.py +97 -0
  772. pforge/nodes/CoroutineNodes.py +126 -0
  773. pforge/nodes/CtypesNodes.py +52 -0
  774. pforge/nodes/DictionaryNodes.py +1571 -0
  775. pforge/nodes/ExceptionNodes.py +467 -0
  776. pforge/nodes/ExecEvalNodes.py +246 -0
  777. pforge/nodes/ExpressionBases.py +1356 -0
  778. pforge/nodes/ExpressionBasesGenerated.py +3183 -0
  779. pforge/nodes/ExpressionShapeMixins.py +965 -0
  780. pforge/nodes/FrameNodes.py +516 -0
  781. pforge/nodes/FunctionAttributeNodes.py +105 -0
  782. pforge/nodes/FunctionNodes.py +1347 -0
  783. pforge/nodes/FutureSpecs.py +227 -0
  784. pforge/nodes/GeneratorNodes.py +204 -0
  785. pforge/nodes/GlobalsLocalsNodes.py +226 -0
  786. pforge/nodes/HardImportNodes.py +52 -0
  787. pforge/nodes/HardImportNodesGenerated.py +5059 -0
  788. pforge/nodes/ImportHardNodes.py +193 -0
  789. pforge/nodes/ImportNodes.py +1542 -0
  790. pforge/nodes/IndicatorMixins.py +82 -0
  791. pforge/nodes/IterationHandles.py +412 -0
  792. pforge/nodes/KeyValuePairNodes.py +381 -0
  793. pforge/nodes/ListOperationNodes.py +534 -0
  794. pforge/nodes/LocalsDictNodes.py +778 -0
  795. pforge/nodes/LocalsScopes.py +539 -0
  796. pforge/nodes/LoopNodes.py +605 -0
  797. pforge/nodes/MatchNodes.py +63 -0
  798. pforge/nodes/ModuleAttributeNodes.py +209 -0
  799. pforge/nodes/ModuleNodes.py +1233 -0
  800. pforge/nodes/NetworkxNodes.py +46 -0
  801. pforge/nodes/NodeBases.py +957 -0
  802. pforge/nodes/NodeMakingHelpers.py +500 -0
  803. pforge/nodes/NodeMetaClasses.py +171 -0
  804. pforge/nodes/OperatorNodes.py +1094 -0
  805. pforge/nodes/OperatorNodesUnary.py +406 -0
  806. pforge/nodes/OsSysNodes.py +344 -0
  807. pforge/nodes/OutlineNodes.py +504 -0
  808. pforge/nodes/PackageMetadataNodes.py +999 -0
  809. pforge/nodes/PackageResourceNodes.py +566 -0
  810. pforge/nodes/PrintNodes.py +178 -0
  811. pforge/nodes/ReturnNodes.py +258 -0
  812. pforge/nodes/RuntimePathNodes.py +44 -0
  813. pforge/nodes/SideEffectNodes.py +142 -0
  814. pforge/nodes/SliceNodes.py +401 -0
  815. pforge/nodes/StatementBasesGenerated.py +3896 -0
  816. pforge/nodes/StatementNodes.py +299 -0
  817. pforge/nodes/StrNodes.py +989 -0
  818. pforge/nodes/StringConcatenationNodes.py +130 -0
  819. pforge/nodes/SubscriptNodes.py +248 -0
  820. pforge/nodes/TensorflowNodes.py +39 -0
  821. pforge/nodes/TryNodes.py +523 -0
  822. pforge/nodes/TypeMatchNodes.py +68 -0
  823. pforge/nodes/TypeNodes.py +450 -0
  824. pforge/nodes/VariableAssignNodes.py +1256 -0
  825. pforge/nodes/VariableDelNodes.py +364 -0
  826. pforge/nodes/VariableNameNodes.py +156 -0
  827. pforge/nodes/VariableRefNodes.py +886 -0
  828. pforge/nodes/VariableReleaseNodes.py +179 -0
  829. pforge/nodes/YieldNodes.py +124 -0
  830. pforge/nodes/__init__.py +22 -0
  831. pforge/nodes/shapes/BuiltinTypeShapes.py +4461 -0
  832. pforge/nodes/shapes/ControlFlowDescriptions.py +224 -0
  833. pforge/nodes/shapes/IteratorShapes.py +70 -0
  834. pforge/nodes/shapes/ShapeMixins.py +272 -0
  835. pforge/nodes/shapes/StandardShapes.py +1417 -0
  836. pforge/nodes/shapes/__init__.py +22 -0
  837. pforge/optimizations/BytecodeDemotion.py +103 -0
  838. pforge/optimizations/FunctionInlining.py +113 -0
  839. pforge/optimizations/Graphs.py +73 -0
  840. pforge/optimizations/Optimization.py +429 -0
  841. pforge/optimizations/OptimizeBuiltinCalls.py +1668 -0
  842. pforge/optimizations/Tags.py +86 -0
  843. pforge/optimizations/TraceCollections.py +1523 -0
  844. pforge/optimizations/__init__.py +22 -0
  845. pforge/optimizations/bench_startup.py +62 -0
  846. pforge/optimizations/bench_tags.py +55 -0
  847. pforge/optimizations/value_traces/ValueTraces.py +61 -0
  848. pforge/optimizations/value_traces/ValueTracesGenerated.py +1920 -0
  849. pforge/optimizations/value_traces/ValueTracesStatic.py +1596 -0
  850. pforge/optimizations/value_traces/__init__.py +22 -0
  851. pforge/options/BuildPackage.py +193 -0
  852. pforge/options/BuildPackageCommon.py +109 -0
  853. pforge/options/CommandLineOptionsTools.py +359 -0
  854. pforge/options/OptionParsing.py +3385 -0
  855. pforge/options/Options.py +3736 -0
  856. pforge/options/PathSpecs.py +246 -0
  857. pforge/options/Poetry.py +96 -0
  858. pforge/options/UvBuild.py +159 -0
  859. pforge/options/__init__.py +22 -0
  860. pforge/package_config/__init__.py +22 -0
  861. pforge/pgo/Pgo.py +865 -0
  862. pforge/pgo/PgoFormat.py +240 -0
  863. pforge/pgo/__init__.py +22 -0
  864. pforge/plugins/Hooks.py +437 -0
  865. pforge/plugins/PluginBase.py +2267 -0
  866. pforge/plugins/Plugins.py +2681 -0
  867. pforge/plugins/PluginsUsage.py +72 -0
  868. pforge/plugins/YamlPluginBase.py +132 -0
  869. pforge/plugins/__init__.py +22 -0
  870. pforge/plugins/standard/AntiBloatPlugin.py +1134 -0
  871. pforge/plugins/standard/ConsiderPyLintAnnotationsPlugin.py +97 -0
  872. pforge/plugins/standard/DataFilesPlugin.py +347 -0
  873. pforge/plugins/standard/DelvewheelPlugin.py +161 -0
  874. pforge/plugins/standard/DillPlugin/DillPlugin.c +40 -0
  875. pforge/plugins/standard/DillPlugin/cloudpickle-postLoad.py +69 -0
  876. pforge/plugins/standard/DillPlugin/dill-postLoad.py +228 -0
  877. pforge/plugins/standard/DillPlugin.py +152 -0
  878. pforge/plugins/standard/DllFilesPlugin.py +564 -0
  879. pforge/plugins/standard/EnumPlugin.py +67 -0
  880. pforge/plugins/standard/EventletPlugin.py +37 -0
  881. pforge/plugins/standard/GeventPlugin.py +66 -0
  882. pforge/plugins/standard/GiPlugin.py +278 -0
  883. pforge/plugins/standard/GlfwPlugin.py +179 -0
  884. pforge/plugins/standard/ImplicitImports.py +1023 -0
  885. pforge/plugins/standard/KivyPlugin.py +143 -0
  886. pforge/plugins/standard/MatplotlibPlugin.py +260 -0
  887. pforge/plugins/standard/MultiprocessingPlugin.py +372 -0
  888. pforge/plugins/standard/NumbaPlugin.py +110 -0
  889. pforge/plugins/standard/NumpyPlugin.py +37 -0
  890. pforge/plugins/standard/OptionsNannyPlugin.py +145 -0
  891. pforge/plugins/standard/PbrPlugin.py +65 -0
  892. pforge/plugins/standard/PkgResourcesPlugin.py +171 -0
  893. pforge/plugins/standard/PlaywrightPlugin.py +181 -0
  894. pforge/plugins/standard/PmwPlugin.py +249 -0
  895. pforge/plugins/standard/PySidePyQtPlugin.py +1830 -0
  896. pforge/plugins/standard/PywebViewPlugin.py +85 -0
  897. pforge/plugins/standard/SourceInclusionPlugin.py +671 -0
  898. pforge/plugins/standard/SpacyPlugin.py +138 -0
  899. pforge/plugins/standard/TensorflowPlugin.py +37 -0
  900. pforge/plugins/standard/TkinterPlugin.py +636 -0
  901. pforge/plugins/standard/TorchHubPlugin.py +521 -0
  902. pforge/plugins/standard/TorchJitPlugin.py +236 -0
  903. pforge/plugins/standard/TorchPlugin.py +37 -0
  904. pforge/plugins/standard/TransformersPlugin.py +333 -0
  905. pforge/plugins/standard/TrioPlugin.py +35 -0
  906. pforge/plugins/standard/UpxPlugin.py +191 -0
  907. pforge/plugins/standard/__init__.py +22 -0
  908. pforge/plugins/standard/standard.pforge-package.config.yml +10867 -0
  909. pforge/plugins/standard/stdlib.pforge-package.config.yml +410 -0
  910. pforge/plugins/standard/stdlib2.pforge-package.config.yml +72 -0
  911. pforge/plugins/standard/stdlib3.pforge-package.config.yml +100 -0
  912. pforge/reports/CompilationReportReader.py +134 -0
  913. pforge/reports/LicenseReport.rst.j2 +44 -0
  914. pforge/reports/Reports.py +1560 -0
  915. pforge/reports/__init__.py +22 -0
  916. pforge/specs/BuiltinBytesOperationSpecs.py +196 -0
  917. pforge/specs/BuiltinDictOperationSpecs.py +96 -0
  918. pforge/specs/BuiltinListOperationSpecs.py +83 -0
  919. pforge/specs/BuiltinParameterSpecs.py +953 -0
  920. pforge/specs/BuiltinStrOperationSpecs.py +215 -0
  921. pforge/specs/BuiltinTypeOperationSpecs.py +37 -0
  922. pforge/specs/BuiltinUnicodeOperationSpecs.py +132 -0
  923. pforge/specs/HardImportSpecs.py +275 -0
  924. pforge/specs/ParameterSpecs.py +683 -0
  925. pforge/specs/__init__.py +22 -0
  926. pforge/targets/TargetLinux.py +278 -0
  927. pforge/targets/TargetMatrix.py +415 -0
  928. pforge/targets/TargetNative.py +132 -0
  929. pforge/targets/TargetPython.py +914 -0
  930. pforge/targets/TargetWASI.py +124 -0
  931. pforge/targets/TargetWin32.py +304 -0
  932. pforge/targets/Targets.py +378 -0
  933. pforge/targets/__init__.py +22 -0
  934. pforge/tools/Basics.py +60 -0
  935. pforge/tools/__init__.py +22 -0
  936. pforge/tools/commercial/__init__.py +22 -0
  937. pforge/tools/data_composer/DataComposer.py +764 -0
  938. pforge/tools/data_composer/__init__.py +22 -0
  939. pforge/tools/data_composer/__main__.py +42 -0
  940. pforge/tools/environments/CreateEnvironment.py +72 -0
  941. pforge/tools/environments/Virtualenv.py +219 -0
  942. pforge/tools/environments/__init__.py +22 -0
  943. pforge/tools/general/__init__.py +22 -0
  944. pforge/tools/general/dll_report/__init__.py +22 -0
  945. pforge/tools/general/dll_report/__main__.py +87 -0
  946. pforge/tools/general/extract_poetry_config/__init__.py +22 -0
  947. pforge/tools/general/extract_poetry_config/__main__.py +144 -0
  948. pforge/tools/general/extract_uv_config/__init__.py +24 -0
  949. pforge/tools/general/extract_uv_config/__main__.py +202 -0
  950. pforge/tools/general/find_module/FindModuleCode.py +127 -0
  951. pforge/tools/general/find_module/__init__.py +22 -0
  952. pforge/tools/general/generate_header/GenerateHeader.py +168 -0
  953. pforge/tools/general/generate_header/GenerateOffsets.py +395 -0
  954. pforge/tools/general/generate_header/__init__.py +22 -0
  955. pforge/tools/onefile_compressor/OnefileCompressor.py +535 -0
  956. pforge/tools/onefile_compressor/__init__.py +22 -0
  957. pforge/tools/onefile_compressor/__main__.py +42 -0
  958. pforge/tools/podman/Container.py +850 -0
  959. pforge/tools/podman/Podman.py +58 -0
  960. pforge/tools/podman/__init__.py +22 -0
  961. pforge/tools/podman/__main__.py +173 -0
  962. pforge/tools/podman/containers/CI.containerfile +69 -0
  963. pforge/tools/podman/containers/Python-Minor-Versions.containerfile.j2 +39 -0
  964. pforge/tools/profiler/__init__.py +22 -0
  965. pforge/tools/profiler/__main__.py +96 -0
  966. pforge/tools/scanning/DisplayDistributions.py +60 -0
  967. pforge/tools/scanning/DisplayPackageDLLs.py +159 -0
  968. pforge/tools/scanning/DisplayPackageData.py +78 -0
  969. pforge/tools/scanning/__init__.py +22 -0
  970. pforge/tools/specialize/CTypeDescriptions.py +1931 -0
  971. pforge/tools/specialize/Common.py +454 -0
  972. pforge/tools/specialize/SpecializeC.py +1896 -0
  973. pforge/tools/specialize/SpecializePython.py +1356 -0
  974. pforge/tools/specialize/__init__.py +22 -0
  975. pforge/tools/testing/Common.py +2190 -0
  976. pforge/tools/testing/Constructs.py +54 -0
  977. pforge/tools/testing/Coverage.py +197 -0
  978. pforge/tools/testing/DocTests.py +159 -0
  979. pforge/tools/testing/OutputComparison.py +492 -0
  980. pforge/tools/testing/Pythons.py +37 -0
  981. pforge/tools/testing/RuntimeTracing.py +296 -0
  982. pforge/tools/testing/SearchModes.py +292 -0
  983. pforge/tools/testing/Valgrind.py +106 -0
  984. pforge/tools/testing/__init__.py +22 -0
  985. pforge/tools/testing/check_reference_counts/__init__.py +22 -0
  986. pforge/tools/testing/check_reference_counts/__main__.py +108 -0
  987. pforge/tools/testing/compare_with_cpython/__init__.py +22 -0
  988. pforge/tools/testing/compare_with_cpython/__main__.py +1107 -0
  989. pforge/tools/testing/find_sxs_modules/__init__.py +22 -0
  990. pforge/tools/testing/find_sxs_modules/__main__.py +74 -0
  991. pforge/tools/testing/measure_construct_performance/__init__.py +22 -0
  992. pforge/tools/testing/measure_construct_performance/__main__.py +291 -0
  993. pforge/tools/testing/run_pforge_tests/__init__.py +22 -0
  994. pforge/tools/testing/run_pforge_tests/__main__.py +1146 -0
  995. pforge/tools/watch/AutoStage.py +462 -0
  996. pforge/tools/watch/Common.py +54 -0
  997. pforge/tools/watch/Conda.py +128 -0
  998. pforge/tools/watch/GitHub.py +116 -0
  999. pforge/tools/watch/Pacman.py +76 -0
  1000. pforge/tools/watch/Pipenv.py +165 -0
  1001. pforge/tools/watch/__init__.py +22 -0
  1002. pforge/tools/watch/__main__.py +727 -0
  1003. pforge/tree/Building.py +1595 -0
  1004. pforge/tree/ComplexCallHelperFunctions.py +2279 -0
  1005. pforge/tree/Extractions.py +75 -0
  1006. pforge/tree/FutureSpecState.py +76 -0
  1007. pforge/tree/InternalModule.py +99 -0
  1008. pforge/tree/Operations.py +108 -0
  1009. pforge/tree/ReformulationAssertStatements.py +110 -0
  1010. pforge/tree/ReformulationAssignmentStatements.py +1513 -0
  1011. pforge/tree/ReformulationBooleanExpressions.py +100 -0
  1012. pforge/tree/ReformulationCallExpressions.py +336 -0
  1013. pforge/tree/ReformulationClasses.py +403 -0
  1014. pforge/tree/ReformulationClasses3.py +1519 -0
  1015. pforge/tree/ReformulationComparisonExpressions.py +177 -0
  1016. pforge/tree/ReformulationContractionExpressions.py +809 -0
  1017. pforge/tree/ReformulationDictionaryCreation.py +308 -0
  1018. pforge/tree/ReformulationExecStatements.py +387 -0
  1019. pforge/tree/ReformulationForLoopStatements.py +218 -0
  1020. pforge/tree/ReformulationFunctionStatements.py +1306 -0
  1021. pforge/tree/ReformulationImportStatements.py +350 -0
  1022. pforge/tree/ReformulationLambdaExpressions.py +196 -0
  1023. pforge/tree/ReformulationMatchStatements.py +902 -0
  1024. pforge/tree/ReformulationMultidist.py +83 -0
  1025. pforge/tree/ReformulationNamespacePackages.py +264 -0
  1026. pforge/tree/ReformulationPrintStatements.py +130 -0
  1027. pforge/tree/ReformulationSequenceCreation.py +443 -0
  1028. pforge/tree/ReformulationSubscriptExpressions.py +126 -0
  1029. pforge/tree/ReformulationTryExceptStatements.py +720 -0
  1030. pforge/tree/ReformulationTryFinallyStatements.py +244 -0
  1031. pforge/tree/ReformulationWhileLoopStatements.py +162 -0
  1032. pforge/tree/ReformulationWithStatements.py +394 -0
  1033. pforge/tree/ReformulationYieldExpressions.py +136 -0
  1034. pforge/tree/SourceHandling.py +522 -0
  1035. pforge/tree/SyntaxErrors.py +245 -0
  1036. pforge/tree/TreeHelpers.py +759 -0
  1037. pforge/tree/VariableClosure.py +554 -0
  1038. pforge/tree/__init__.py +22 -0
  1039. pforge/utils/AppDirs.py +148 -0
  1040. pforge/utils/CStrings.py +208 -0
  1041. pforge/utils/Diffs.py +192 -0
  1042. pforge/utils/Distributions.py +901 -0
  1043. pforge/utils/Download.py +466 -0
  1044. pforge/utils/Execution.py +1154 -0
  1045. pforge/utils/FileOperations.py +2481 -0
  1046. pforge/utils/Hashing.py +159 -0
  1047. pforge/utils/Images.py +75 -0
  1048. pforge/utils/Importing.py +392 -0
  1049. pforge/utils/InlineCopies.py +132 -0
  1050. pforge/utils/InstalledPythons.py +281 -0
  1051. pforge/utils/InstanceCounters.py +89 -0
  1052. pforge/utils/Jinja2.py +195 -0
  1053. pforge/utils/Json.py +96 -0
  1054. pforge/utils/LinuxPython.py +365 -0
  1055. pforge/utils/MemoryUsage.py +166 -0
  1056. pforge/utils/ModuleNames.py +384 -0
  1057. pforge/utils/PackageResources.py +67 -0
  1058. pforge/utils/PrivatePipSpace.py +1317 -0
  1059. pforge/utils/Profiling.py +243 -0
  1060. pforge/utils/PythonPrefetch.py +391 -0
  1061. pforge/utils/ReExecute.py +120 -0
  1062. pforge/utils/Rest.py +63 -0
  1063. pforge/utils/SharedLibraries.py +1623 -0
  1064. pforge/utils/Shebang.py +114 -0
  1065. pforge/utils/Signing.py +500 -0
  1066. pforge/utils/SlotMetaClasses.py +60 -0
  1067. pforge/utils/StaticLibraries.py +422 -0
  1068. pforge/utils/ThreadedExecutor.py +90 -0
  1069. pforge/utils/Timing.py +201 -0
  1070. pforge/utils/Toml.py +65 -0
  1071. pforge/utils/Utils.py +643 -0
  1072. pforge/utils/WasiPython.py +428 -0
  1073. pforge/utils/WasiSDK.py +226 -0
  1074. pforge/utils/Wasmtime.py +178 -0
  1075. pforge/utils/WindowsFileUsage.py +338 -0
  1076. pforge/utils/WindowsResources.py +659 -0
  1077. pforge/utils/Yaml.py +1143 -0
  1078. pforge/utils/Zipfiles.py +131 -0
  1079. pforge/utils/__init__.py +22 -0
  1080. pforge/utils/requirements-private.txt +26 -0
  1081. pforge-1.0.0.data/scripts/compile-python-for-pforge-linux.sh +232 -0
  1082. pforge-1.0.0.dist-info/METADATA +2228 -0
  1083. pforge-1.0.0.dist-info/RECORD +1090 -0
  1084. pforge-1.0.0.dist-info/WHEEL +5 -0
  1085. pforge-1.0.0.dist-info/entry_points.txt +11 -0
  1086. pforge-1.0.0.dist-info/licenses/LICENSE-RUNTIME.txt +57 -0
  1087. pforge-1.0.0.dist-info/licenses/LICENSE.txt +661 -0
  1088. pforge-1.0.0.dist-info/licenses/NOTICE.txt +11 -0
  1089. pforge-1.0.0.dist-info/top_level.txt +1 -0
  1090. pforge-1.0.0.dist-info/zip-safe +1 -0
@@ -0,0 +1,1174 @@
1
+ # MIT License
2
+ #
3
+ # Copyright The SCons Foundation
4
+ #
5
+ # Permission is hereby granted, free of charge, to any person obtaining
6
+ # a copy of this software and associated documentation files (the
7
+ # "Software"), to deal in the Software without restriction, including
8
+ # without limitation the rights to use, copy, modify, merge, publish,
9
+ # distribute, sublicense, and/or sell copies of the Software, and to
10
+ # permit persons to whom the Software is furnished to do so, subject to
11
+ # the following conditions:
12
+ #
13
+ # The above copyright notice and this permission notice shall be included
14
+ # in all copies or substantial portions of the Software.
15
+ #
16
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
17
+ # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
18
+ # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ """Autoconf-like configuration support.
25
+
26
+ In other words, SConf allows to run tests on the build machine to detect
27
+ capabilities of system and do some things based on result: generate config
28
+ files, header files for C/C++, update variables in environment.
29
+
30
+ Tests on the build system can detect if compiler sees header files, if
31
+ libraries are installed, if some command line options are supported etc.
32
+ """
33
+
34
+ from __future__ import annotations
35
+
36
+ import SCons.compat
37
+
38
+ import atexit
39
+ import io
40
+ import os
41
+ import re
42
+ import sys
43
+ import traceback
44
+
45
+ import SCons.Action
46
+ import SCons.Builder
47
+ import SCons.Errors
48
+ import SCons.Taskmaster.Job
49
+ import SCons.Node.FS
50
+ import SCons.Taskmaster
51
+ import SCons.Util
52
+ import SCons.Warnings
53
+ import SCons.Conftest
54
+
55
+ from SCons.Debug import Trace
56
+ from collections import defaultdict
57
+
58
+ # Turn off the Conftest error logging
59
+ SCons.Conftest.LogInputFiles = 0
60
+ SCons.Conftest.LogErrorMessages = 0
61
+
62
+ # Set
63
+ build_type = None
64
+ build_types = ['clean', 'help']
65
+
66
+ def SetBuildType(buildtype):
67
+ global build_type
68
+ build_type = buildtype
69
+
70
+ # to be set, if we are in dry-run mode
71
+ dryrun = 0
72
+
73
+ AUTO=0 # use SCons dependency scanning for up-to-date checks
74
+ FORCE=1 # force all tests to be rebuilt
75
+ CACHE=2 # force all tests to be taken from cache (raise an error, if necessary)
76
+ cache_mode = AUTO
77
+
78
+ def _set_conftest_node(node):
79
+ node.attributes.conftest_node = 1
80
+
81
+ def SetCacheMode(mode):
82
+ """Set the Configure cache mode. mode must be one of "auto", "force",
83
+ or "cache"."""
84
+ global cache_mode
85
+ if mode == "auto":
86
+ cache_mode = AUTO
87
+ elif mode == "force":
88
+ cache_mode = FORCE
89
+ elif mode == "cache":
90
+ cache_mode = CACHE
91
+ else:
92
+ raise ValueError("SCons.SConf.SetCacheMode: Unknown mode " + mode)
93
+
94
+ progress_display = SCons.Util.display # will be overwritten by SCons.Script
95
+ def SetProgressDisplay(display):
96
+ """Set the progress display to use (called from SCons.Script)"""
97
+ global progress_display
98
+ progress_display = display
99
+
100
+ SConfFS = None
101
+
102
+ _ac_build_counter = defaultdict(int)
103
+ _ac_config_logs = {} # all config.log files created in this build
104
+ _ac_config_hs = {} # all config.h files created in this build
105
+ sconf_global = None # current sconf object
106
+
107
+ def _createConfigH(target, source, env):
108
+ t = open(str(target[0]), "w")
109
+ defname = re.sub('[^A-Za-z0-9_]', '_', str(target[0]).upper())
110
+ t.write("""#ifndef %(DEFNAME)s_SEEN
111
+ #define %(DEFNAME)s_SEEN
112
+
113
+ """ % {'DEFNAME' : defname})
114
+ t.write(source[0].get_contents().decode())
115
+ t.write("""
116
+ #endif /* %(DEFNAME)s_SEEN */
117
+ """ % {'DEFNAME' : defname})
118
+ t.close()
119
+
120
+ def _stringConfigH(target, source, env):
121
+ return "scons: Configure: creating " + str(target[0])
122
+
123
+
124
+ def NeedConfigHBuilder():
125
+ if len(_ac_config_hs) == 0:
126
+ return False
127
+ else:
128
+ return True
129
+
130
+ def CreateConfigHBuilder(env):
131
+ """Called if necessary just before the building targets phase begins."""
132
+ action = SCons.Action.Action(_createConfigH,
133
+ _stringConfigH)
134
+ sconfigHBld = SCons.Builder.Builder(action=action)
135
+ env.Append( BUILDERS={'SConfigHBuilder':sconfigHBld} )
136
+ for k, v in _ac_config_hs.items():
137
+ env.SConfigHBuilder(k, env.Value(v))
138
+
139
+
140
+ class SConfWarning(SCons.Warnings.SConsWarning):
141
+ pass
142
+ SCons.Warnings.enableWarningClass(SConfWarning)
143
+
144
+ # some error definitions
145
+ class SConfError(SCons.Errors.UserError):
146
+ def __init__(self,msg):
147
+ super().__init__(msg)
148
+
149
+ class ConfigureDryRunError(SConfError):
150
+ """Raised when a file or directory needs to be updated during a Configure
151
+ process, but the user requested a dry-run"""
152
+ def __init__(self,target):
153
+ if not isinstance(target, SCons.Node.FS.File):
154
+ msg = 'Cannot create configure directory "%s" within a dry-run.' % str(target)
155
+ else:
156
+ msg = 'Cannot update configure test "%s" within a dry-run.' % str(target)
157
+ super().__init__(msg)
158
+
159
+ class ConfigureCacheError(SConfError):
160
+ """Raised when a use explicitely requested the cache feature, but the test
161
+ is run the first time."""
162
+ def __init__(self,target):
163
+ super().__init__('"%s" is not yet built and cache is forced.' % str(target))
164
+
165
+
166
+ # define actions for building text files
167
+ def _createSource(target, source, env):
168
+ fd = open(str(target[0]), "w")
169
+ fd.write(source[0].get_contents().decode())
170
+ fd.close()
171
+
172
+
173
+ def _stringSource( target, source, env ):
174
+ return (str(target[0]) + ' <-\n |' +
175
+ source[0].get_contents().decode().replace( '\n', "\n |" ) )
176
+
177
+ class SConfBuildInfo(SCons.Node.FS.FileBuildInfo):
178
+ """
179
+ Special build info for targets of configure tests. Additional members
180
+ are result (did the builder succeed last time?) and string, which
181
+ contains messages of the original build phase.
182
+ """
183
+ __slots__ = ('result', 'string')
184
+
185
+ def __init__(self):
186
+ self.result = None # -> 0/None -> no error, != 0 error
187
+ self.string = None # the stdout / stderr output when building the target
188
+
189
+ def set_build_result(self, result, string):
190
+ self.result = result
191
+ self.string = string
192
+
193
+
194
+ class Streamer:
195
+ """
196
+ 'Sniffer' for a file-like writable object. Similar to the unix tool tee.
197
+ """
198
+ def __init__(self, orig):
199
+ self.orig = orig
200
+ self.s = io.StringIO()
201
+
202
+ def write(self, str):
203
+ if self.orig:
204
+ self.orig.write(str)
205
+ try:
206
+ self.s.write(str)
207
+ except TypeError as e:
208
+ # "unicode argument expected" bug in IOStream (python 2.x)
209
+ self.s.write(str.decode())
210
+
211
+ def writelines(self, lines):
212
+ for l in lines:
213
+ self.write(l + '\n')
214
+
215
+ def getvalue(self):
216
+ """
217
+ Return everything written to orig since the Streamer was created.
218
+ """
219
+ return self.s.getvalue()
220
+
221
+ def flush(self):
222
+ if self.orig:
223
+ self.orig.flush()
224
+ self.s.flush()
225
+
226
+
227
+ class SConfBuildTask(SCons.Taskmaster.AlwaysTask):
228
+ """
229
+ This is almost the same as SCons.Script.BuildTask. Handles SConfErrors
230
+ correctly and knows about the current cache_mode.
231
+ """
232
+ non_sconf_nodes = set()
233
+
234
+ def display(self, message):
235
+ if sconf_global.logstream:
236
+ sconf_global.logstream.write("scons: Configure: " + message + "\n")
237
+
238
+ def display_cached_string(self, bi):
239
+ """
240
+ Logs the original builder messages, given the SConfBuildInfo instance
241
+ bi.
242
+ """
243
+ if not isinstance(bi, SConfBuildInfo):
244
+ SCons.Warnings.warn(
245
+ SConfWarning,
246
+ "The stored build information has an unexpected class: %s" % bi.__class__
247
+ )
248
+ else:
249
+ self.display("The original builder output was:\n" +
250
+ (" |" + str(bi.string)).replace("\n", "\n |"))
251
+
252
+ def failed(self):
253
+ # check, if the reason was a ConfigureDryRunError or a
254
+ # ConfigureCacheError and if yes, reraise the exception
255
+ exc_type, exc, _ = self.exc_info()
256
+ if issubclass(exc_type, SConfError):
257
+ raise exc
258
+ elif issubclass(exc_type, SCons.Errors.BuildError):
259
+ # we ignore Build Errors (occurs, when a test doesn't pass)
260
+ # Clear the exception to prevent the contained traceback
261
+ # to build a reference cycle.
262
+ self.exc_clear()
263
+ else:
264
+ self.display('Caught exception while building "%s":\n' %
265
+ self.targets[0])
266
+ sys.excepthook(*self.exc_info())
267
+ return SCons.Taskmaster.Task.failed(self)
268
+
269
+ def collect_node_states(self):
270
+ # returns (is_up_to_date, cached_error, cachable)
271
+ # where is_up_to_date is True if the node(s) are up_to_date
272
+ # cached_error is True if the node(s) are up_to_date, but the
273
+ # build will fail
274
+ # cachable is False if some nodes are not in our cache
275
+ T = 0
276
+ changed = False
277
+ cached_error = False
278
+ cachable = True
279
+ for t in self.targets:
280
+ if T: Trace('%s' % t)
281
+ bi = t.get_stored_info().binfo
282
+ if isinstance(bi, SConfBuildInfo):
283
+ if T: Trace(': SConfBuildInfo')
284
+ if cache_mode == CACHE:
285
+ t.set_state(SCons.Node.up_to_date)
286
+ if T: Trace(': set_state(up_to-date)')
287
+ else:
288
+ if T: Trace(': get_state() %s' % t.get_state())
289
+ if T: Trace(': changed() %s' % t.changed())
290
+ if t.get_state() != SCons.Node.up_to_date and t.changed():
291
+ changed = True
292
+ if T: Trace(': changed %s' % changed)
293
+ cached_error = cached_error or bi.result
294
+ else:
295
+ if T: Trace(': else')
296
+ # the node hasn't been built in a SConf context or doesn't
297
+ # exist
298
+ cachable = False
299
+ changed = ( t.get_state() != SCons.Node.up_to_date )
300
+ if T: Trace(': changed %s' % changed)
301
+ if T: Trace('\n')
302
+ return (not changed, cached_error, cachable)
303
+
304
+ def execute(self):
305
+ if not self.targets[0].has_builder():
306
+ return
307
+
308
+ sconf = sconf_global
309
+
310
+ is_up_to_date, cached_error, cachable = self.collect_node_states()
311
+
312
+ if cache_mode == CACHE and not cachable:
313
+ raise ConfigureCacheError(self.targets[0])
314
+ elif cache_mode == FORCE:
315
+ is_up_to_date = False
316
+
317
+ if cached_error and is_up_to_date:
318
+ self.display("Building \"%s\" failed in a previous run and all "
319
+ "its sources are up to date." % str(self.targets[0]))
320
+ binfo = self.targets[0].get_stored_info().binfo
321
+ self.display_cached_string(binfo)
322
+ raise SCons.Errors.BuildError # will be 'caught' in self.failed
323
+ elif is_up_to_date:
324
+ self.display("\"%s\" is up to date." % str(self.targets[0]))
325
+ binfo = self.targets[0].get_stored_info().binfo
326
+ self.display_cached_string(binfo)
327
+ elif dryrun:
328
+ raise ConfigureDryRunError(self.targets[0])
329
+ else:
330
+ # note stdout and stderr are the same here
331
+ s = sys.stdout = sys.stderr = Streamer(sys.stdout)
332
+ try:
333
+ env = self.targets[0].get_build_env()
334
+ env['PSTDOUT'] = env['PSTDERR'] = s
335
+ try:
336
+ sconf.cached = 0
337
+ self.targets[0].build()
338
+ finally:
339
+ sys.stdout = sys.stderr = env['PSTDOUT'] = \
340
+ env['PSTDERR'] = sconf.logstream
341
+ except KeyboardInterrupt:
342
+ raise
343
+ except SystemExit:
344
+ exc_value = sys.exc_info()[1]
345
+ raise SCons.Errors.ExplicitExit(self.targets[0],exc_value.code)
346
+ except Exception as e:
347
+ for t in self.targets:
348
+ binfo = SConfBuildInfo()
349
+ binfo.merge(t.get_binfo())
350
+ binfo.set_build_result(1, s.getvalue())
351
+ sconsign_entry = SCons.SConsign.SConsignEntry()
352
+ sconsign_entry.binfo = binfo
353
+ #sconsign_entry.ninfo = self.get_ninfo()
354
+ # We'd like to do this as follows:
355
+ # t.store_info(binfo)
356
+ # However, we need to store it as an SConfBuildInfo
357
+ # object, and store_info() will turn it into a
358
+ # regular FileNodeInfo if the target is itself a
359
+ # regular File.
360
+ sconsign = t.dir.sconsign()
361
+ sconsign.set_entry(t.name, sconsign_entry)
362
+ sconsign.merge()
363
+ raise e
364
+ else:
365
+ for t in self.targets:
366
+ binfo = SConfBuildInfo()
367
+ binfo.merge(t.get_binfo())
368
+ binfo.set_build_result(0, s.getvalue())
369
+ sconsign_entry = SCons.SConsign.SConsignEntry()
370
+ sconsign_entry.binfo = binfo
371
+ #sconsign_entry.ninfo = self.get_ninfo()
372
+ # We'd like to do this as follows:
373
+ # t.store_info(binfo)
374
+ # However, we need to store it as an SConfBuildInfo
375
+ # object, and store_info() will turn it into a
376
+ # regular FileNodeInfo if the target is itself a
377
+ # regular File.
378
+ sconsign = t.dir.sconsign()
379
+ sconsign.set_entry(t.name, sconsign_entry)
380
+ sconsign.merge()
381
+
382
+ def make_ready_current(self):
383
+ # We're overriding make_ready_current() call to add to the list
384
+ # of nodes used by this task, filtering out any nodes created
385
+ # by the checker for it's own purpose.
386
+ self.non_sconf_nodes.update([t for t in self.targets if not t.is_conftest()])
387
+ super().make_ready_current()
388
+ make_ready = make_ready_current
389
+
390
+ def postprocess(self):
391
+ # We're done executing this task, so now we'll go through all the
392
+ # nodes used by this task which aren't nodes created for
393
+ # Configure checkers, but rather are existing or built files
394
+ # and reset their node info.
395
+ # If we do not reset their node info, any changes in these
396
+ # nodes will not trigger builds in the normal build process
397
+ for node in self.non_sconf_nodes:
398
+ node.ninfo = node.new_ninfo()
399
+ super().postprocess()
400
+
401
+ class SConfBase:
402
+ """This is simply a class to represent a configure context. After
403
+ creating a SConf object, you can call any tests. After finished with your
404
+ tests, be sure to call the Finish() method, which returns the modified
405
+ environment.
406
+ Some words about caching: In most cases, it is not necessary to cache
407
+ Test results explicitly. Instead, we use the scons dependency checking
408
+ mechanism. For example, if one wants to compile a test program
409
+ (SConf.TryLink), the compiler is only called, if the program dependencies
410
+ have changed. However, if the program could not be compiled in a former
411
+ SConf run, we need to explicitly cache this error.
412
+ """
413
+
414
+ def __init__(self, env, custom_tests = {}, conf_dir='$CONFIGUREDIR',
415
+ log_file='$CONFIGURELOG', config_h = None, _depth = 0):
416
+ """Constructor. Pass additional tests in the custom_tests-dictionary,
417
+ e.g. custom_tests={'CheckPrivate':MyPrivateTest}, where MyPrivateTest
418
+ defines a custom test.
419
+ Note also the conf_dir and log_file arguments (you may want to
420
+ build tests in the VariantDir, not in the SourceDir)
421
+ """
422
+ global SConfFS
423
+
424
+ # Now create isolated override so setting source_decider doesn't affect parent Environment
425
+ if cache_mode == FORCE:
426
+ self.original_env = env
427
+ self.env = env.Clone()
428
+
429
+ # Set up the Decider() to force rebuilds by saying
430
+ # that every source has changed. Note that we still
431
+ # call the environment's underlying source decider so
432
+ # that the correct .sconsign info will get calculated
433
+ # and keep the build state consistent.
434
+ def force_build(dependency, target, prev_ni,
435
+ repo_node=None,
436
+ env_decider=env.decide_source):
437
+ try:
438
+ env_decider(dependency, target, prev_ni, repo_node)
439
+ except Exception as e:
440
+ raise e
441
+ return True
442
+
443
+ if self.env.decide_source.__code__ is not force_build.__code__:
444
+ self.env.Decider(force_build)
445
+
446
+ else:
447
+ self.env = env
448
+
449
+ # print("Override env:%s"%env)
450
+
451
+ if not SConfFS:
452
+ SConfFS = SCons.Node.FS.default_fs or \
453
+ SCons.Node.FS.FS(env.fs.pathTop)
454
+ if sconf_global is not None:
455
+ raise SCons.Errors.UserError("""Configure() called while another Configure() exists.
456
+ Please call .Finish() before creating and second Configure() context""")
457
+
458
+ if log_file is not None:
459
+ log_file = SConfFS.File(env.subst(log_file))
460
+ self.logfile = log_file
461
+ self.logstream = None
462
+ self.lastTarget = None
463
+ self.depth = _depth
464
+ self.cached = 0 # will be set, if all test results are cached
465
+
466
+ # add default tests
467
+ default_tests = {
468
+ 'CheckCC' : CheckCC,
469
+ 'CheckCXX' : CheckCXX,
470
+ 'CheckSHCC' : CheckSHCC,
471
+ 'CheckSHCXX' : CheckSHCXX,
472
+ 'CheckFunc' : CheckFunc,
473
+ 'CheckType' : CheckType,
474
+ 'CheckTypeSize' : CheckTypeSize,
475
+ 'CheckMember' : CheckMember,
476
+ 'CheckDeclaration' : CheckDeclaration,
477
+ 'CheckHeader' : CheckHeader,
478
+ 'CheckCHeader' : CheckCHeader,
479
+ 'CheckCXXHeader' : CheckCXXHeader,
480
+ 'CheckLib' : CheckLib,
481
+ 'CheckLibWithHeader' : CheckLibWithHeader,
482
+ 'CheckProg' : CheckProg,
483
+ }
484
+ self.AddTests(default_tests)
485
+ self.AddTests(custom_tests)
486
+ self.confdir = SConfFS.Dir(env.subst(conf_dir))
487
+ if config_h is not None:
488
+ config_h = SConfFS.File(config_h)
489
+ self.config_h = config_h
490
+ self._startup()
491
+
492
+ def Finish(self):
493
+ """Call this method after finished with your tests:
494
+ env = sconf.Finish()
495
+ """
496
+ self._shutdown()
497
+
498
+ return self.env
499
+
500
+ def Define(self, name, value = None, comment = None):
501
+ """
502
+ Define a pre processor symbol name, with the optional given value in the
503
+ current config header.
504
+
505
+ If value is None (default), then #define name is written. If value is not
506
+ none, then #define name value is written.
507
+
508
+ comment is a string which will be put as a C comment in the header, to explain the meaning of the value
509
+ (appropriate C comments will be added automatically).
510
+ """
511
+ lines = []
512
+ if comment:
513
+ comment_str = "/* %s */" % comment
514
+ lines.append(comment_str)
515
+
516
+ if value is not None:
517
+ define_str = "#define %s %s" % (name, value)
518
+ else:
519
+ define_str = "#define %s" % name
520
+ lines.append(define_str)
521
+ lines.append('')
522
+
523
+ self.config_h_text = self.config_h_text + '\n'.join(lines)
524
+
525
+ def BuildNodes(self, nodes):
526
+ """
527
+ Tries to build the given nodes immediately. Returns 1 on success,
528
+ 0 on error.
529
+ """
530
+ if self.logstream is not None:
531
+ # override stdout / stderr to write in log file
532
+ oldStdout = sys.stdout
533
+ sys.stdout = self.logstream
534
+ oldStderr = sys.stderr
535
+ sys.stderr = self.logstream
536
+
537
+ # the engine assumes the current path is the SConstruct directory ...
538
+ old_fs_dir = SConfFS.getcwd()
539
+ old_os_dir = os.getcwd()
540
+ SConfFS.chdir(SConfFS.Top, change_os_dir=True)
541
+
542
+ # Because we take responsibility here for writing out our
543
+ # own .sconsign info (see SConfBuildTask.execute(), above),
544
+ # we override the store_info() method with a null place-holder
545
+ # so we really control how it gets written.
546
+ for n in nodes:
547
+ _set_conftest_node(n)
548
+ n.store_info = 0
549
+ if not hasattr(n, 'attributes'):
550
+ n.attributes = SCons.Node.Node.Attrs()
551
+ n.attributes.keep_targetinfo = 1
552
+
553
+ if True:
554
+ # Some checkers have intermediate files (for example anything that compiles a c file into a program to run
555
+ # Those files need to be set to not release their target info, otherwise taskmaster will throw a
556
+ # Nonetype not callable
557
+ for c in n.children(scan=False):
558
+ # Keep debug code here.
559
+ # print("Checking [%s] for builders and then setting keep_targetinfo"%c)
560
+ _set_conftest_node(c)
561
+ if c.has_builder():
562
+ n.store_info = 0
563
+ if not hasattr(c, 'attributes'):
564
+ c.attributes = SCons.Node.Node.Attrs()
565
+ c.attributes.keep_targetinfo = 1
566
+ # pass
567
+
568
+ ret = 1
569
+
570
+ try:
571
+ # ToDo: use user options for calc
572
+ save_max_drift = SConfFS.get_max_drift()
573
+ SConfFS.set_max_drift(0)
574
+ tm = SCons.Taskmaster.Taskmaster(nodes, SConfBuildTask)
575
+ # we don't want to build tests in parallel
576
+ jobs = SCons.Taskmaster.Job.Jobs(1, tm)
577
+ jobs.run()
578
+ for n in nodes:
579
+ state = n.get_state()
580
+ if (state != SCons.Node.executed and
581
+ state != SCons.Node.up_to_date):
582
+ # the node could not be built. we return 0 in this case
583
+ ret = 0
584
+ finally:
585
+ SConfFS.set_max_drift(save_max_drift)
586
+ os.chdir(old_os_dir)
587
+ SConfFS.chdir(old_fs_dir, change_os_dir=False)
588
+ if self.logstream is not None:
589
+ # restore stdout / stderr
590
+ sys.stdout = oldStdout
591
+ sys.stderr = oldStderr
592
+ return ret
593
+
594
+ def pspawn_wrapper(self, sh, escape, cmd, args, env):
595
+ """Wrapper function for handling piped spawns.
596
+
597
+ This looks to the calling interface (in Action.py) like a "normal"
598
+ spawn, but associates the call with the PSPAWN variable from
599
+ the construction environment and with the streams to which we
600
+ want the output logged. This gets slid into the construction
601
+ environment as the SPAWN variable so Action.py doesn't have to
602
+ know or care whether it's spawning a piped command or not.
603
+ """
604
+ return self.pspawn(sh, escape, cmd, args, env, self.logstream, self.logstream)
605
+
606
+ def TryBuild(self, builder, text=None, extension=""):
607
+ """Low level TryBuild implementation. Normally you don't need to
608
+ call that - you can use TryCompile / TryLink / TryRun instead
609
+ """
610
+ global _ac_build_counter
611
+
612
+ # Make sure we have a PSPAWN value, and save the current
613
+ # SPAWN value.
614
+ try:
615
+ self.pspawn = self.env['PSPAWN']
616
+ except KeyError:
617
+ raise SCons.Errors.UserError('Missing PSPAWN construction variable.')
618
+ try:
619
+ save_spawn = self.env['SPAWN']
620
+ except KeyError:
621
+ raise SCons.Errors.UserError('Missing SPAWN construction variable.')
622
+
623
+ nodesToBeBuilt = []
624
+ sourcetext = self.env.Value(text)
625
+ _set_conftest_node(sourcetext)
626
+ f = "conftest"
627
+
628
+ if text is not None:
629
+ textSig = SCons.Util.hash_signature(sourcetext)
630
+ textSigCounter = str(_ac_build_counter[textSig])
631
+ _ac_build_counter[textSig] += 1
632
+
633
+ f = "_".join([f, textSig, textSigCounter])
634
+ textFile = self.confdir.File(f + extension)
635
+ _set_conftest_node(textFile)
636
+ textFileNode = self.env.SConfSourceBuilder(target=textFile,
637
+ source=sourcetext)
638
+ nodesToBeBuilt.extend(textFileNode)
639
+
640
+ source = textFile
641
+ target = textFile.File(f + "SConfActionsContentDummyTarget")
642
+ _set_conftest_node(target)
643
+ else:
644
+ source = None
645
+ target = None
646
+
647
+ action = builder.builder.action.get_contents(target=target, source=[source], env=self.env)
648
+ actionsig = SCons.Util.hash_signature(action)
649
+ f = "_".join([f, actionsig])
650
+
651
+ pref = self.env.subst( builder.builder.prefix )
652
+ suff = self.env.subst( builder.builder.suffix )
653
+ target = self.confdir.File(pref + f + suff)
654
+ _set_conftest_node(target)
655
+
656
+ try:
657
+ # Slide our wrapper into the construction environment as
658
+ # the SPAWN function.
659
+ self.env['SPAWN'] = self.pspawn_wrapper
660
+
661
+ nodes = builder(target = target, source = source, SCONF_NODE=True)
662
+ if not SCons.Util.is_List(nodes):
663
+ nodes = [nodes]
664
+ nodesToBeBuilt.extend(nodes)
665
+ result = self.BuildNodes(nodesToBeBuilt)
666
+
667
+ finally:
668
+ self.env['SPAWN'] = save_spawn
669
+
670
+ if result:
671
+ self.lastTarget = nodes[0]
672
+ else:
673
+ self.lastTarget = None
674
+
675
+ return result
676
+
677
+ def TryAction(self, action, text = None, extension = ""):
678
+ """Tries to execute the given action with optional source file
679
+ contents <text> and optional source file extension <extension>,
680
+ Returns the status (0 : failed, 1 : ok) and the contents of the
681
+ output file.
682
+ """
683
+ builder = SCons.Builder.Builder(action=action)
684
+ self.env.Append( BUILDERS = {'SConfActionBuilder' : builder} )
685
+ ok = self.TryBuild(self.env.SConfActionBuilder, text, extension)
686
+ del self.env['BUILDERS']['SConfActionBuilder']
687
+ if ok:
688
+ outputStr = self.lastTarget.get_text_contents()
689
+ return (1, outputStr)
690
+ return (0, "")
691
+
692
+ def TryCompile( self, text, extension):
693
+ """Compiles the program given in text to an env.Object, using extension
694
+ as file extension (e.g. '.c'). Returns 1, if compilation was
695
+ successful, 0 otherwise. The target is saved in self.lastTarget (for
696
+ further processing).
697
+ """
698
+ return self.TryBuild(self.env.Object, text, extension)
699
+
700
+ def TryLink( self, text, extension ):
701
+ """Compiles the program given in text to an executable env.Program,
702
+ using extension as file extension (e.g. '.c'). Returns 1, if
703
+ compilation was successful, 0 otherwise. The target is saved in
704
+ self.lastTarget (for further processing).
705
+ """
706
+ return self.TryBuild(self.env.Program, text, extension )
707
+
708
+ def TryRun(self, text, extension ):
709
+ """Compiles and runs the program given in text, using extension
710
+ as file extension (e.g. '.c'). Returns (1, outputStr) on success,
711
+ (0, '') otherwise. The target (a file containing the program's stdout)
712
+ is saved in self.lastTarget (for further processing).
713
+ """
714
+ ok = self.TryLink(text, extension)
715
+ if ok:
716
+ prog = self.lastTarget
717
+ pname = prog.get_internal_path()
718
+ if sys.platform == "win32" and os.sep == "/":
719
+ # msys might have a Python where os.sep='/' on Windows.
720
+ # That builds a path in the env.Command below which breaks
721
+ # if the SHELL used is cmd because 'pname' will always have
722
+ # an os.sep in it.
723
+ pname = pname.replace(os.sep, os.altsep)
724
+ output = self.confdir.File(os.path.basename(pname)+'.out')
725
+ node = self.env.Command(output, prog, [ [ pname, ">", "${TARGET}"] ])
726
+ ok = self.BuildNodes(node)
727
+ if ok:
728
+ outputStr = SCons.Util.to_str(output.get_contents())
729
+ return( 1, outputStr)
730
+ return (0, "")
731
+
732
+ class TestWrapper:
733
+ """A wrapper around Tests (to ensure sanity)"""
734
+ def __init__(self, test, sconf):
735
+ self.test = test
736
+ self.sconf = sconf
737
+ def __call__(self, *args, **kw):
738
+ if not self.sconf.active:
739
+ raise SCons.Errors.UserError
740
+ context = CheckContext(self.sconf)
741
+ ret = self.test(context, *args, **kw)
742
+ if self.sconf.config_h is not None:
743
+ self.sconf.config_h_text = self.sconf.config_h_text + context.config_h
744
+ context.Result("error: no result")
745
+ return ret
746
+
747
+ def AddTest(self, test_name, test_instance):
748
+ """Adds test_class to this SConf instance. It can be called with
749
+ self.test_name(...)"""
750
+ setattr(self, test_name, SConfBase.TestWrapper(test_instance, self))
751
+
752
+ def AddTests(self, tests):
753
+ """Adds all the tests given in the tests dictionary to this SConf
754
+ instance
755
+ """
756
+ for name in tests.keys():
757
+ self.AddTest(name, tests[name])
758
+
759
+ def _createDir( self, node ):
760
+ dirName = str(node)
761
+ if dryrun:
762
+ if not os.path.isdir( dirName ):
763
+ raise ConfigureDryRunError(dirName)
764
+ else:
765
+ if not os.path.isdir( dirName ):
766
+ os.makedirs( dirName )
767
+
768
+ def _startup(self):
769
+ """Private method. Set up logstream, and set the environment
770
+ variables necessary for a piped build
771
+ """
772
+ global _ac_config_logs
773
+ global sconf_global
774
+ global SConfFS
775
+
776
+ self.lastEnvFs = self.env.fs
777
+ self.env.fs = SConfFS
778
+ self._createDir(self.confdir)
779
+ self.confdir.up().add_ignore( [self.confdir] )
780
+
781
+ if self.logfile is not None and not dryrun:
782
+ # truncate logfile, if SConf.Configure is called for the first time
783
+ # in a build
784
+ if self.logfile in _ac_config_logs:
785
+ log_mode = "a"
786
+ else:
787
+ _ac_config_logs[self.logfile] = None
788
+ log_mode = "w"
789
+ fp = open(str(self.logfile), log_mode)
790
+
791
+ def conflog_cleanup(logf):
792
+ logf.close()
793
+
794
+ atexit.register(conflog_cleanup, fp)
795
+ self.logstream = SCons.Util.Unbuffered(fp)
796
+ # logfile may stay in a build directory, so we tell
797
+ # the build system not to override it with an eventually
798
+ # existing file with the same name in the source directory
799
+ self.logfile.dir.add_ignore([self.logfile])
800
+
801
+ tb = traceback.extract_stack()[-3-self.depth]
802
+ old_fs_dir = SConfFS.getcwd()
803
+ SConfFS.chdir(SConfFS.Top, change_os_dir=False)
804
+ self.logstream.write('file %s,line %d:\n\tConfigure(confdir = %s)\n' %
805
+ (tb[0], tb[1], str(self.confdir)) )
806
+ SConfFS.chdir(old_fs_dir)
807
+ else:
808
+ self.logstream = None
809
+ # we use a special builder to create source files from TEXT
810
+ action = SCons.Action.Action(_createSource,
811
+ _stringSource)
812
+ sconfSrcBld = SCons.Builder.Builder(action=action)
813
+ self.env.Append( BUILDERS={'SConfSourceBuilder':sconfSrcBld} )
814
+ self.config_h_text = _ac_config_hs.get(self.config_h, "")
815
+ self.active = 1
816
+ # only one SConf instance should be active at a time ...
817
+ sconf_global = self
818
+
819
+ def _shutdown(self):
820
+ """Private method. Reset to non-piped spawn"""
821
+ global sconf_global, _ac_config_hs
822
+
823
+ if not self.active:
824
+ raise SCons.Errors.UserError("Finish may be called only once!")
825
+ if self.logstream is not None and not dryrun:
826
+ self.logstream.write("\n")
827
+ self.logstream.close()
828
+ self.logstream = None
829
+
830
+ # Now reset the decider if we changed it due to --config=force
831
+ # We saved original Environment passed in and cloned it to isolate
832
+ # it from being changed.
833
+ if cache_mode == FORCE:
834
+ self.env.Decider(self.original_env.decide_source)
835
+
836
+ # remove the SConfSourceBuilder from the environment
837
+ blds = self.env['BUILDERS']
838
+ del blds['SConfSourceBuilder']
839
+ self.env.Replace( BUILDERS=blds )
840
+
841
+ self.active = 0
842
+ sconf_global = None
843
+ if self.config_h is not None:
844
+ _ac_config_hs[self.config_h] = self.config_h_text
845
+ self.env.fs = self.lastEnvFs
846
+
847
+ class CheckContext:
848
+ """Provides a context for configure tests. Defines how a test writes to the
849
+ screen and log file.
850
+
851
+ A typical test is just a callable with an instance of CheckContext as
852
+ first argument:
853
+
854
+ def CheckCustom(context, ...):
855
+ context.Message('Checking my weird test ... ')
856
+ ret = myWeirdTestFunction(...)
857
+ context.Result(ret)
858
+
859
+ Often, myWeirdTestFunction will be one of
860
+ context.TryCompile/context.TryLink/context.TryRun. The results of
861
+ those are cached, for they are only rebuild, if the dependencies have
862
+ changed.
863
+ """
864
+
865
+ def __init__(self, sconf):
866
+ """Constructor. Pass the corresponding SConf instance."""
867
+ self.sconf = sconf
868
+ self.did_show_result = 0
869
+
870
+ # for Conftest.py:
871
+ self.vardict = {}
872
+ self.havedict = {}
873
+ self.headerfilename = None
874
+ self.config_h = "" # config_h text will be stored here
875
+ # we don't regenerate the config.h file after each test. That means,
876
+ # that tests won't be able to include the config.h file, and so
877
+ # they can't do an #ifdef HAVE_XXX_H. This shouldn't be a major
878
+ # issue, though. If it turns out, that we need to include config.h
879
+ # in tests, we must ensure, that the dependencies are worked out
880
+ # correctly. Note that we can't use Conftest.py's support for config.h,
881
+ # cause we will need to specify a builder for the config.h file ...
882
+
883
+ def Message(self, text):
884
+ """Inform about what we are doing right now, e.g.
885
+ 'Checking for SOMETHING ... '
886
+ """
887
+ self.Display(text)
888
+ self.sconf.cached = 1
889
+ self.did_show_result = 0
890
+
891
+ def Result(self, res):
892
+ """Inform about the result of the test. If res is not a string, displays
893
+ 'yes' or 'no' depending on whether res is evaluated as true or false.
894
+ The result is only displayed when self.did_show_result is not set.
895
+ """
896
+ if isinstance(res, str):
897
+ text = res
898
+ elif res:
899
+ text = "yes"
900
+ else:
901
+ text = "no"
902
+
903
+ if self.did_show_result == 0:
904
+ # Didn't show result yet, do it now.
905
+ self.Display(text + "\n")
906
+ self.did_show_result = 1
907
+
908
+ def TryBuild(self, *args, **kw):
909
+ return self.sconf.TryBuild(*args, **kw)
910
+
911
+ def TryAction(self, *args, **kw):
912
+ return self.sconf.TryAction(*args, **kw)
913
+
914
+ def TryCompile(self, *args, **kw):
915
+ return self.sconf.TryCompile(*args, **kw)
916
+
917
+ def TryLink(self, *args, **kw):
918
+ return self.sconf.TryLink(*args, **kw)
919
+
920
+ def TryRun(self, *args, **kw):
921
+ return self.sconf.TryRun(*args, **kw)
922
+
923
+ def __getattr__( self, attr ):
924
+ if attr == 'env':
925
+ return self.sconf.env
926
+ elif attr == 'lastTarget':
927
+ return self.sconf.lastTarget
928
+ else:
929
+ raise AttributeError("CheckContext instance has no attribute '%s'" % attr)
930
+
931
+ #### Stuff used by Conftest.py (look there for explanations).
932
+
933
+ def BuildProg(self, text, ext):
934
+ self.sconf.cached = 1
935
+ # TODO: should use self.vardict for $CC, $CPPFLAGS, etc.
936
+ return not self.TryBuild(self.env.Program, text, ext)
937
+
938
+ def CompileProg(self, text, ext):
939
+ self.sconf.cached = 1
940
+ # TODO: should use self.vardict for $CC, $CPPFLAGS, etc.
941
+ return not self.TryBuild(self.env.Object, text, ext)
942
+
943
+ def CompileSharedObject(self, text, ext):
944
+ self.sconf.cached = 1
945
+ # TODO: should use self.vardict for $SHCC, $CPPFLAGS, etc.
946
+ return not self.TryBuild(self.env.SharedObject, text, ext)
947
+
948
+ def RunProg(self, text, ext):
949
+ self.sconf.cached = 1
950
+ # TODO: should use self.vardict for $CC, $CPPFLAGS, etc.
951
+ st, out = self.TryRun(text, ext)
952
+ return not st, out
953
+
954
+ def AppendLIBS(self, lib_name_list, unique=False):
955
+ oldLIBS = self.env.get( 'LIBS', [] )
956
+ if unique:
957
+ self.env.AppendUnique(LIBS = lib_name_list)
958
+ else:
959
+ self.env.Append(LIBS = lib_name_list)
960
+ return oldLIBS
961
+
962
+ def PrependLIBS(self, lib_name_list, unique=False):
963
+ oldLIBS = self.env.get( 'LIBS', [] )
964
+ if unique:
965
+ self.env.PrependUnique(LIBS = lib_name_list)
966
+ else:
967
+ self.env.Prepend(LIBS = lib_name_list)
968
+ return oldLIBS
969
+
970
+ def SetLIBS(self, val):
971
+ oldLIBS = self.env.get( 'LIBS', [] )
972
+ self.env.Replace(LIBS = val)
973
+ return oldLIBS
974
+
975
+ def Display(self, msg):
976
+ if self.sconf.cached:
977
+ # We assume that Display is called twice for each test here
978
+ # once for the Checking for ... message and once for the result.
979
+ # The self.sconf.cached flag can only be set between those calls
980
+ msg = "(cached) " + msg
981
+ self.sconf.cached = 0
982
+ progress_display(msg, append_newline=0)
983
+ self.Log("scons: Configure: " + msg + "\n")
984
+
985
+ def Log(self, msg):
986
+ if self.sconf.logstream is not None:
987
+ self.sconf.logstream.write(msg)
988
+
989
+ #### End of stuff used by Conftest.py.
990
+
991
+
992
+ def SConf(*args, **kw):
993
+ if kw.get(build_type, True):
994
+ kw['_depth'] = kw.get('_depth', 0) + 1
995
+ for bt in build_types:
996
+ try:
997
+ del kw[bt]
998
+ except KeyError:
999
+ pass
1000
+ return SConfBase(*args, **kw)
1001
+ else:
1002
+ return SCons.Util.Null()
1003
+
1004
+
1005
+ def CheckFunc(context, function_name, header = None, language = None, funcargs = None):
1006
+ res = SCons.Conftest.CheckFunc(context, function_name, header = header, language = language, funcargs = funcargs)
1007
+ context.did_show_result = 1
1008
+ return not res
1009
+
1010
+ def CheckType(context, type_name, includes = "", language = None):
1011
+ res = SCons.Conftest.CheckType(context, type_name,
1012
+ header = includes, language = language)
1013
+ context.did_show_result = 1
1014
+ return not res
1015
+
1016
+ def CheckTypeSize(context, type_name, includes = "", language = None, expect = None):
1017
+ res = SCons.Conftest.CheckTypeSize(context, type_name,
1018
+ header = includes, language = language,
1019
+ expect = expect)
1020
+ context.did_show_result = 1
1021
+ return res
1022
+
1023
+ def CheckDeclaration(context, declaration, includes = "", language = None):
1024
+ res = SCons.Conftest.CheckDeclaration(context, declaration,
1025
+ includes = includes,
1026
+ language = language)
1027
+ context.did_show_result = 1
1028
+ return not res
1029
+
1030
+ def CheckMember(context, aggregate_member, header = None, language = None):
1031
+ '''Returns the status (False : failed, True : ok).'''
1032
+ res = SCons.Conftest.CheckMember(context, aggregate_member, header=header, language=language)
1033
+ context.did_show_result = 1
1034
+ return not res
1035
+
1036
+
1037
+ def createIncludesFromHeaders(headers, leaveLast, include_quotes = '""'):
1038
+ # used by CheckHeader and CheckLibWithHeader to produce C - #include
1039
+ # statements from the specified header (list)
1040
+ if not SCons.Util.is_List(headers):
1041
+ headers = [headers]
1042
+ l = []
1043
+ if leaveLast:
1044
+ lastHeader = headers[-1]
1045
+ headers = headers[:-1]
1046
+ else:
1047
+ lastHeader = None
1048
+ for s in headers:
1049
+ l.append("#include %s%s%s\n"
1050
+ % (include_quotes[0], s, include_quotes[1]))
1051
+ return ''.join(l), lastHeader
1052
+
1053
+ def CheckHeader(context, header, include_quotes = '<>', language = None):
1054
+ """
1055
+ A test for a C or C++ header file.
1056
+ """
1057
+ prog_prefix, hdr_to_check = \
1058
+ createIncludesFromHeaders(header, 1, include_quotes)
1059
+ res = SCons.Conftest.CheckHeader(context, hdr_to_check, prog_prefix,
1060
+ language = language,
1061
+ include_quotes = include_quotes)
1062
+ context.did_show_result = 1
1063
+ return not res
1064
+
1065
+ def CheckCC(context):
1066
+ res = SCons.Conftest.CheckCC(context)
1067
+ context.did_show_result = 1
1068
+ return not res
1069
+
1070
+ def CheckCXX(context):
1071
+ res = SCons.Conftest.CheckCXX(context)
1072
+ context.did_show_result = 1
1073
+ return not res
1074
+
1075
+ def CheckSHCC(context):
1076
+ res = SCons.Conftest.CheckSHCC(context)
1077
+ context.did_show_result = 1
1078
+ return not res
1079
+
1080
+ def CheckSHCXX(context):
1081
+ res = SCons.Conftest.CheckSHCXX(context)
1082
+ context.did_show_result = 1
1083
+ return not res
1084
+
1085
+ # Bram: Make this function obsolete? CheckHeader() is more generic.
1086
+
1087
+ def CheckCHeader(context, header, include_quotes = '""'):
1088
+ """
1089
+ A test for a C header file.
1090
+ """
1091
+ return CheckHeader(context, header, include_quotes, language = "C")
1092
+
1093
+
1094
+ # Bram: Make this function obsolete? CheckHeader() is more generic.
1095
+
1096
+ def CheckCXXHeader(context, header, include_quotes = '""'):
1097
+ """
1098
+ A test for a C++ header file.
1099
+ """
1100
+ return CheckHeader(context, header, include_quotes, language = "C++")
1101
+
1102
+
1103
+ def CheckLib(context, library = None, symbol = "main",
1104
+ header = None, language = None, extra_libs = None,
1105
+ autoadd=True, append=True, unique=False):
1106
+ """
1107
+ A test for a library. See also :func:`CheckLibWithHeader`.
1108
+ Note that library may also be None to test whether the given symbol
1109
+ compiles without flags.
1110
+
1111
+ .. versionchanged:: 4.9.0
1112
+ Added the *extra_libs* keyword parameter. The actual implementation
1113
+ is in :func:`SCons.Conftest.CheckLib` which already accepted this
1114
+ parameter, so this is only exposing existing functionality.
1115
+ """
1116
+
1117
+ if not library:
1118
+ library = [None]
1119
+
1120
+ if not SCons.Util.is_List(library):
1121
+ library = [library]
1122
+
1123
+ # ToDo: accept path for the library
1124
+ res = SCons.Conftest.CheckLib(context, library, symbol, header=header,
1125
+ language=language, extra_libs=extra_libs,
1126
+ autoadd=autoadd, append=append, unique=unique)
1127
+ context.did_show_result = True
1128
+ return not res
1129
+
1130
+ # XXX
1131
+ # Bram: Can only include one header and can't use #ifdef HAVE_HEADER_H.
1132
+
1133
+ def CheckLibWithHeader(context, libs, header, language,
1134
+ extra_libs = None, call = None, autoadd=True,
1135
+ append=True, unique=False):
1136
+ """
1137
+ Another (more sophisticated) test for a library.
1138
+ Checks, if library and header is available for language (may be 'C'
1139
+ or 'CXX'). Call maybe be a valid expression _with_ a trailing ';'.
1140
+ As in :func:`CheckLib`, we support library=None, to test if the call compiles
1141
+ without extra link flags.
1142
+
1143
+ .. versionchanged:: 4.9.0
1144
+ Added the *extra_libs* keyword parameter. The actual implementation
1145
+ is in :func:`SCons.Conftest.CheckLib` which already accepted this
1146
+ parameter, so this is only exposing existing functionality.
1147
+ """
1148
+ # ToDo: accept path for library. Support system header files.
1149
+ prog_prefix, dummy = createIncludesFromHeaders(header, 0)
1150
+ if not libs:
1151
+ libs = [None]
1152
+
1153
+ if not SCons.Util.is_List(libs):
1154
+ libs = [libs]
1155
+
1156
+ res = SCons.Conftest.CheckLib(context, libs, None, prog_prefix,
1157
+ extra_libs = extra_libs, call = call, language = language,
1158
+ autoadd=autoadd, append=append, unique=unique)
1159
+ context.did_show_result = 1
1160
+ return not res
1161
+
1162
+ def CheckProg(context, prog_name):
1163
+ """Simple check if a program exists in the path. Returns the path
1164
+ for the application, or None if not found.
1165
+ """
1166
+ res = SCons.Conftest.CheckProg(context, prog_name)
1167
+ context.did_show_result = 1
1168
+ return res
1169
+
1170
+ # Local Variables:
1171
+ # tab-width:4
1172
+ # indent-tabs-mode:nil
1173
+ # End:
1174
+ # vim: set expandtab tabstop=4 shiftwidth=4: