@tedbrain/vlink 0.0.0-dpv2.ted-runner.python-linux-x64.3.9.0-dpv2.1.r6 → 0.0.0-dpv2.ted-runner.vlink-linux-x64.0.2.24.r6

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 (660) hide show
  1. package/bin/vlink +0 -0
  2. package/package.json +1 -1
  3. package/bin/python3 +0 -0
  4. package/lib/libX11.so.6 +0 -0
  5. package/lib/libXau.so.6 +0 -0
  6. package/lib/libXdmcp.so.6 +0 -0
  7. package/lib/libcrypt.so.1 +0 -0
  8. package/lib/libcrypto.so.1.1 +0 -0
  9. package/lib/libffi.so.7 +0 -0
  10. package/lib/libfreebl3.so +0 -0
  11. package/lib/liblzma.so.5 +0 -0
  12. package/lib/libncursesw.so.6 +0 -0
  13. package/lib/libnsl.so.1 +0 -0
  14. package/lib/libpanelw.so.6 +0 -0
  15. package/lib/libpython3.9.so.1.0 +0 -0
  16. package/lib/libreadline.so.8 +0 -0
  17. package/lib/libsqlite3.so.0 +0 -0
  18. package/lib/libssl.so.1.1 +0 -0
  19. package/lib/libtcl8.6.so +0 -0
  20. package/lib/libtinfow.so.6 +0 -0
  21. package/lib/libtk8.6.so +0 -0
  22. package/lib/libxcb.so.1 +0 -0
  23. package/lib/libz.so.1 +0 -0
  24. package/lib/python3.9/LICENSE.txt +0 -279
  25. package/lib/python3.9/__future__.py +0 -147
  26. package/lib/python3.9/__phello__.foo.py +0 -1
  27. package/lib/python3.9/_aix_support.py +0 -89
  28. package/lib/python3.9/_bootlocale.py +0 -46
  29. package/lib/python3.9/_bootsubprocess.py +0 -97
  30. package/lib/python3.9/_collections_abc.py +0 -1031
  31. package/lib/python3.9/_compat_pickle.py +0 -251
  32. package/lib/python3.9/_compression.py +0 -152
  33. package/lib/python3.9/_markupbase.py +0 -395
  34. package/lib/python3.9/_osx_support.py +0 -515
  35. package/lib/python3.9/_py_abc.py +0 -147
  36. package/lib/python3.9/_pydecimal.py +0 -6410
  37. package/lib/python3.9/_pyio.py +0 -2692
  38. package/lib/python3.9/_sitebuiltins.py +0 -103
  39. package/lib/python3.9/_strptime.py +0 -579
  40. package/lib/python3.9/_sysconfigdata__linux_x86_64-linux-gnu.py +0 -969
  41. package/lib/python3.9/_sysconfigdata__linux_x86_64-linux-gnu.py.orig +0 -969
  42. package/lib/python3.9/_sysconfigdata_x86_64_conda_cos6_linux_gnu.py +0 -969
  43. package/lib/python3.9/_threading_local.py +0 -242
  44. package/lib/python3.9/_weakrefset.py +0 -202
  45. package/lib/python3.9/abc.py +0 -129
  46. package/lib/python3.9/aifc.py +0 -947
  47. package/lib/python3.9/antigravity.py +0 -17
  48. package/lib/python3.9/argparse.py +0 -2575
  49. package/lib/python3.9/ast.py +0 -1530
  50. package/lib/python3.9/asynchat.py +0 -307
  51. package/lib/python3.9/asyncio/__init__.py +0 -47
  52. package/lib/python3.9/asyncio/__main__.py +0 -125
  53. package/lib/python3.9/asyncio/base_events.py +0 -1915
  54. package/lib/python3.9/asyncio/base_futures.py +0 -61
  55. package/lib/python3.9/asyncio/base_subprocess.py +0 -285
  56. package/lib/python3.9/asyncio/base_tasks.py +0 -85
  57. package/lib/python3.9/asyncio/constants.py +0 -27
  58. package/lib/python3.9/asyncio/coroutines.py +0 -269
  59. package/lib/python3.9/asyncio/events.py +0 -795
  60. package/lib/python3.9/asyncio/exceptions.py +0 -57
  61. package/lib/python3.9/asyncio/format_helpers.py +0 -76
  62. package/lib/python3.9/asyncio/futures.py +0 -423
  63. package/lib/python3.9/asyncio/locks.py +0 -451
  64. package/lib/python3.9/asyncio/log.py +0 -7
  65. package/lib/python3.9/asyncio/proactor_events.py +0 -868
  66. package/lib/python3.9/asyncio/protocols.py +0 -220
  67. package/lib/python3.9/asyncio/queues.py +0 -252
  68. package/lib/python3.9/asyncio/runners.py +0 -74
  69. package/lib/python3.9/asyncio/selector_events.py +0 -1099
  70. package/lib/python3.9/asyncio/sslproto.py +0 -733
  71. package/lib/python3.9/asyncio/staggered.py +0 -149
  72. package/lib/python3.9/asyncio/streams.py +0 -741
  73. package/lib/python3.9/asyncio/subprocess.py +0 -241
  74. package/lib/python3.9/asyncio/tasks.py +0 -980
  75. package/lib/python3.9/asyncio/threads.py +0 -25
  76. package/lib/python3.9/asyncio/transports.py +0 -329
  77. package/lib/python3.9/asyncio/trsock.py +0 -206
  78. package/lib/python3.9/asyncio/unix_events.py +0 -1466
  79. package/lib/python3.9/asyncio/windows_events.py +0 -908
  80. package/lib/python3.9/asyncio/windows_utils.py +0 -173
  81. package/lib/python3.9/asyncore.py +0 -642
  82. package/lib/python3.9/base64.py +0 -579
  83. package/lib/python3.9/bdb.py +0 -864
  84. package/lib/python3.9/binhex.py +0 -502
  85. package/lib/python3.9/bisect.py +0 -80
  86. package/lib/python3.9/bz2.py +0 -350
  87. package/lib/python3.9/cProfile.py +0 -180
  88. package/lib/python3.9/calendar.py +0 -770
  89. package/lib/python3.9/cgi.py +0 -996
  90. package/lib/python3.9/cgitb.py +0 -321
  91. package/lib/python3.9/chunk.py +0 -169
  92. package/lib/python3.9/cmd.py +0 -401
  93. package/lib/python3.9/code.py +0 -315
  94. package/lib/python3.9/codecs.py +0 -1126
  95. package/lib/python3.9/codeop.py +0 -178
  96. package/lib/python3.9/collections/__init__.py +0 -1508
  97. package/lib/python3.9/collections/abc.py +0 -2
  98. package/lib/python3.9/colorsys.py +0 -164
  99. package/lib/python3.9/compileall.py +0 -461
  100. package/lib/python3.9/concurrent/__init__.py +0 -1
  101. package/lib/python3.9/concurrent/futures/__init__.py +0 -53
  102. package/lib/python3.9/concurrent/futures/_base.py +0 -635
  103. package/lib/python3.9/concurrent/futures/process.py +0 -751
  104. package/lib/python3.9/concurrent/futures/thread.py +0 -230
  105. package/lib/python3.9/config-3.9-x86_64-linux-gnu/Makefile +0 -2015
  106. package/lib/python3.9/config-3.9-x86_64-linux-gnu/Setup +0 -372
  107. package/lib/python3.9/config-3.9-x86_64-linux-gnu/Setup.local +0 -1
  108. package/lib/python3.9/config-3.9-x86_64-linux-gnu/config.c +0 -116
  109. package/lib/python3.9/config-3.9-x86_64-linux-gnu/config.c.in +0 -67
  110. package/lib/python3.9/config-3.9-x86_64-linux-gnu/install-sh +0 -518
  111. package/lib/python3.9/config-3.9-x86_64-linux-gnu/makesetup +0 -309
  112. package/lib/python3.9/config-3.9-x86_64-linux-gnu/python-config.py +0 -74
  113. package/lib/python3.9/config-3.9-x86_64-linux-gnu/python.o +0 -0
  114. package/lib/python3.9/configparser.py +0 -1363
  115. package/lib/python3.9/contextlib.py +0 -676
  116. package/lib/python3.9/contextvars.py +0 -4
  117. package/lib/python3.9/copy.py +0 -303
  118. package/lib/python3.9/copyreg.py +0 -209
  119. package/lib/python3.9/crypt.py +0 -120
  120. package/lib/python3.9/csv.py +0 -448
  121. package/lib/python3.9/ctypes/__init__.py +0 -571
  122. package/lib/python3.9/ctypes/_aix.py +0 -331
  123. package/lib/python3.9/ctypes/_endian.py +0 -61
  124. package/lib/python3.9/ctypes/macholib/README.ctypes +0 -7
  125. package/lib/python3.9/ctypes/macholib/__init__.py +0 -9
  126. package/lib/python3.9/ctypes/macholib/dyld.py +0 -182
  127. package/lib/python3.9/ctypes/macholib/dylib.py +0 -63
  128. package/lib/python3.9/ctypes/macholib/fetch_macholib +0 -2
  129. package/lib/python3.9/ctypes/macholib/fetch_macholib.bat +0 -1
  130. package/lib/python3.9/ctypes/macholib/framework.py +0 -65
  131. package/lib/python3.9/ctypes/util.py +0 -379
  132. package/lib/python3.9/ctypes/wintypes.py +0 -202
  133. package/lib/python3.9/curses/__init__.py +0 -101
  134. package/lib/python3.9/curses/ascii.py +0 -99
  135. package/lib/python3.9/curses/has_key.py +0 -192
  136. package/lib/python3.9/curses/panel.py +0 -6
  137. package/lib/python3.9/curses/textpad.py +0 -201
  138. package/lib/python3.9/dataclasses.py +0 -1284
  139. package/lib/python3.9/datetime.py +0 -2555
  140. package/lib/python3.9/dbm/__init__.py +0 -189
  141. package/lib/python3.9/dbm/dumb.py +0 -316
  142. package/lib/python3.9/dbm/gnu.py +0 -3
  143. package/lib/python3.9/dbm/ndbm.py +0 -3
  144. package/lib/python3.9/decimal.py +0 -11
  145. package/lib/python3.9/difflib.py +0 -2096
  146. package/lib/python3.9/dis.py +0 -553
  147. package/lib/python3.9/distutils/README +0 -11
  148. package/lib/python3.9/distutils/__init__.py +0 -13
  149. package/lib/python3.9/distutils/_msvccompiler.py +0 -546
  150. package/lib/python3.9/distutils/archive_util.py +0 -256
  151. package/lib/python3.9/distutils/bcppcompiler.py +0 -393
  152. package/lib/python3.9/distutils/ccompiler.py +0 -1116
  153. package/lib/python3.9/distutils/cmd.py +0 -403
  154. package/lib/python3.9/distutils/command/__init__.py +0 -31
  155. package/lib/python3.9/distutils/command/bdist.py +0 -143
  156. package/lib/python3.9/distutils/command/bdist_dumb.py +0 -123
  157. package/lib/python3.9/distutils/command/bdist_msi.py +0 -749
  158. package/lib/python3.9/distutils/command/bdist_rpm.py +0 -579
  159. package/lib/python3.9/distutils/command/bdist_wininst.py +0 -377
  160. package/lib/python3.9/distutils/command/build.py +0 -157
  161. package/lib/python3.9/distutils/command/build_clib.py +0 -209
  162. package/lib/python3.9/distutils/command/build_ext.py +0 -754
  163. package/lib/python3.9/distutils/command/build_py.py +0 -416
  164. package/lib/python3.9/distutils/command/build_scripts.py +0 -160
  165. package/lib/python3.9/distutils/command/check.py +0 -148
  166. package/lib/python3.9/distutils/command/clean.py +0 -76
  167. package/lib/python3.9/distutils/command/command_template +0 -33
  168. package/lib/python3.9/distutils/command/config.py +0 -344
  169. package/lib/python3.9/distutils/command/install.py +0 -657
  170. package/lib/python3.9/distutils/command/install_data.py +0 -79
  171. package/lib/python3.9/distutils/command/install_egg_info.py +0 -77
  172. package/lib/python3.9/distutils/command/install_headers.py +0 -47
  173. package/lib/python3.9/distutils/command/install_lib.py +0 -217
  174. package/lib/python3.9/distutils/command/install_scripts.py +0 -60
  175. package/lib/python3.9/distutils/command/register.py +0 -304
  176. package/lib/python3.9/distutils/command/sdist.py +0 -494
  177. package/lib/python3.9/distutils/command/upload.py +0 -214
  178. package/lib/python3.9/distutils/config.py +0 -130
  179. package/lib/python3.9/distutils/core.py +0 -234
  180. package/lib/python3.9/distutils/cygwinccompiler.py +0 -410
  181. package/lib/python3.9/distutils/debug.py +0 -5
  182. package/lib/python3.9/distutils/dep_util.py +0 -92
  183. package/lib/python3.9/distutils/dir_util.py +0 -210
  184. package/lib/python3.9/distutils/dist.py +0 -1256
  185. package/lib/python3.9/distutils/errors.py +0 -97
  186. package/lib/python3.9/distutils/extension.py +0 -240
  187. package/lib/python3.9/distutils/fancy_getopt.py +0 -457
  188. package/lib/python3.9/distutils/file_util.py +0 -238
  189. package/lib/python3.9/distutils/filelist.py +0 -327
  190. package/lib/python3.9/distutils/log.py +0 -77
  191. package/lib/python3.9/distutils/msvc9compiler.py +0 -788
  192. package/lib/python3.9/distutils/msvccompiler.py +0 -643
  193. package/lib/python3.9/distutils/spawn.py +0 -125
  194. package/lib/python3.9/distutils/sysconfig.py +0 -560
  195. package/lib/python3.9/distutils/text_file.py +0 -286
  196. package/lib/python3.9/distutils/unixccompiler.py +0 -330
  197. package/lib/python3.9/distutils/util.py +0 -559
  198. package/lib/python3.9/distutils/version.py +0 -347
  199. package/lib/python3.9/distutils/versionpredicate.py +0 -166
  200. package/lib/python3.9/doctest.py +0 -2793
  201. package/lib/python3.9/email/__init__.py +0 -62
  202. package/lib/python3.9/email/_encoded_words.py +0 -233
  203. package/lib/python3.9/email/_header_value_parser.py +0 -3003
  204. package/lib/python3.9/email/_parseaddr.py +0 -549
  205. package/lib/python3.9/email/_policybase.py +0 -374
  206. package/lib/python3.9/email/architecture.rst +0 -216
  207. package/lib/python3.9/email/base64mime.py +0 -119
  208. package/lib/python3.9/email/charset.py +0 -404
  209. package/lib/python3.9/email/contentmanager.py +0 -250
  210. package/lib/python3.9/email/encoders.py +0 -69
  211. package/lib/python3.9/email/errors.py +0 -110
  212. package/lib/python3.9/email/feedparser.py +0 -536
  213. package/lib/python3.9/email/generator.py +0 -508
  214. package/lib/python3.9/email/header.py +0 -578
  215. package/lib/python3.9/email/headerregistry.py +0 -601
  216. package/lib/python3.9/email/iterators.py +0 -71
  217. package/lib/python3.9/email/message.py +0 -1173
  218. package/lib/python3.9/email/mime/__init__.py +0 -0
  219. package/lib/python3.9/email/mime/application.py +0 -37
  220. package/lib/python3.9/email/mime/audio.py +0 -74
  221. package/lib/python3.9/email/mime/base.py +0 -30
  222. package/lib/python3.9/email/mime/image.py +0 -47
  223. package/lib/python3.9/email/mime/message.py +0 -34
  224. package/lib/python3.9/email/mime/multipart.py +0 -48
  225. package/lib/python3.9/email/mime/nonmultipart.py +0 -22
  226. package/lib/python3.9/email/mime/text.py +0 -42
  227. package/lib/python3.9/email/parser.py +0 -131
  228. package/lib/python3.9/email/policy.py +0 -224
  229. package/lib/python3.9/email/quoprimime.py +0 -299
  230. package/lib/python3.9/email/utils.py +0 -368
  231. package/lib/python3.9/encodings/__init__.py +0 -169
  232. package/lib/python3.9/encodings/aliases.py +0 -551
  233. package/lib/python3.9/encodings/ascii.py +0 -50
  234. package/lib/python3.9/encodings/base64_codec.py +0 -55
  235. package/lib/python3.9/encodings/big5.py +0 -39
  236. package/lib/python3.9/encodings/big5hkscs.py +0 -39
  237. package/lib/python3.9/encodings/bz2_codec.py +0 -78
  238. package/lib/python3.9/encodings/charmap.py +0 -69
  239. package/lib/python3.9/encodings/cp037.py +0 -307
  240. package/lib/python3.9/encodings/cp1006.py +0 -307
  241. package/lib/python3.9/encodings/cp1026.py +0 -307
  242. package/lib/python3.9/encodings/cp1125.py +0 -698
  243. package/lib/python3.9/encodings/cp1140.py +0 -307
  244. package/lib/python3.9/encodings/cp1250.py +0 -307
  245. package/lib/python3.9/encodings/cp1251.py +0 -307
  246. package/lib/python3.9/encodings/cp1252.py +0 -307
  247. package/lib/python3.9/encodings/cp1253.py +0 -307
  248. package/lib/python3.9/encodings/cp1254.py +0 -307
  249. package/lib/python3.9/encodings/cp1255.py +0 -307
  250. package/lib/python3.9/encodings/cp1256.py +0 -307
  251. package/lib/python3.9/encodings/cp1257.py +0 -307
  252. package/lib/python3.9/encodings/cp1258.py +0 -307
  253. package/lib/python3.9/encodings/cp273.py +0 -307
  254. package/lib/python3.9/encodings/cp424.py +0 -307
  255. package/lib/python3.9/encodings/cp437.py +0 -698
  256. package/lib/python3.9/encodings/cp500.py +0 -307
  257. package/lib/python3.9/encodings/cp720.py +0 -309
  258. package/lib/python3.9/encodings/cp737.py +0 -698
  259. package/lib/python3.9/encodings/cp775.py +0 -697
  260. package/lib/python3.9/encodings/cp850.py +0 -698
  261. package/lib/python3.9/encodings/cp852.py +0 -698
  262. package/lib/python3.9/encodings/cp855.py +0 -698
  263. package/lib/python3.9/encodings/cp856.py +0 -307
  264. package/lib/python3.9/encodings/cp857.py +0 -694
  265. package/lib/python3.9/encodings/cp858.py +0 -698
  266. package/lib/python3.9/encodings/cp860.py +0 -698
  267. package/lib/python3.9/encodings/cp861.py +0 -698
  268. package/lib/python3.9/encodings/cp862.py +0 -698
  269. package/lib/python3.9/encodings/cp863.py +0 -698
  270. package/lib/python3.9/encodings/cp864.py +0 -690
  271. package/lib/python3.9/encodings/cp865.py +0 -698
  272. package/lib/python3.9/encodings/cp866.py +0 -698
  273. package/lib/python3.9/encodings/cp869.py +0 -689
  274. package/lib/python3.9/encodings/cp874.py +0 -307
  275. package/lib/python3.9/encodings/cp875.py +0 -307
  276. package/lib/python3.9/encodings/cp932.py +0 -39
  277. package/lib/python3.9/encodings/cp949.py +0 -39
  278. package/lib/python3.9/encodings/cp950.py +0 -39
  279. package/lib/python3.9/encodings/euc_jis_2004.py +0 -39
  280. package/lib/python3.9/encodings/euc_jisx0213.py +0 -39
  281. package/lib/python3.9/encodings/euc_jp.py +0 -39
  282. package/lib/python3.9/encodings/euc_kr.py +0 -39
  283. package/lib/python3.9/encodings/gb18030.py +0 -39
  284. package/lib/python3.9/encodings/gb2312.py +0 -39
  285. package/lib/python3.9/encodings/gbk.py +0 -39
  286. package/lib/python3.9/encodings/hex_codec.py +0 -55
  287. package/lib/python3.9/encodings/hp_roman8.py +0 -314
  288. package/lib/python3.9/encodings/hz.py +0 -39
  289. package/lib/python3.9/encodings/idna.py +0 -309
  290. package/lib/python3.9/encodings/iso2022_jp.py +0 -39
  291. package/lib/python3.9/encodings/iso2022_jp_1.py +0 -39
  292. package/lib/python3.9/encodings/iso2022_jp_2.py +0 -39
  293. package/lib/python3.9/encodings/iso2022_jp_2004.py +0 -39
  294. package/lib/python3.9/encodings/iso2022_jp_3.py +0 -39
  295. package/lib/python3.9/encodings/iso2022_jp_ext.py +0 -39
  296. package/lib/python3.9/encodings/iso2022_kr.py +0 -39
  297. package/lib/python3.9/encodings/iso8859_1.py +0 -307
  298. package/lib/python3.9/encodings/iso8859_10.py +0 -307
  299. package/lib/python3.9/encodings/iso8859_11.py +0 -307
  300. package/lib/python3.9/encodings/iso8859_13.py +0 -307
  301. package/lib/python3.9/encodings/iso8859_14.py +0 -307
  302. package/lib/python3.9/encodings/iso8859_15.py +0 -307
  303. package/lib/python3.9/encodings/iso8859_16.py +0 -307
  304. package/lib/python3.9/encodings/iso8859_2.py +0 -307
  305. package/lib/python3.9/encodings/iso8859_3.py +0 -307
  306. package/lib/python3.9/encodings/iso8859_4.py +0 -307
  307. package/lib/python3.9/encodings/iso8859_5.py +0 -307
  308. package/lib/python3.9/encodings/iso8859_6.py +0 -307
  309. package/lib/python3.9/encodings/iso8859_7.py +0 -307
  310. package/lib/python3.9/encodings/iso8859_8.py +0 -307
  311. package/lib/python3.9/encodings/iso8859_9.py +0 -307
  312. package/lib/python3.9/encodings/johab.py +0 -39
  313. package/lib/python3.9/encodings/koi8_r.py +0 -307
  314. package/lib/python3.9/encodings/koi8_t.py +0 -308
  315. package/lib/python3.9/encodings/koi8_u.py +0 -307
  316. package/lib/python3.9/encodings/kz1048.py +0 -307
  317. package/lib/python3.9/encodings/latin_1.py +0 -50
  318. package/lib/python3.9/encodings/mac_arabic.py +0 -698
  319. package/lib/python3.9/encodings/mac_croatian.py +0 -307
  320. package/lib/python3.9/encodings/mac_cyrillic.py +0 -307
  321. package/lib/python3.9/encodings/mac_farsi.py +0 -307
  322. package/lib/python3.9/encodings/mac_greek.py +0 -307
  323. package/lib/python3.9/encodings/mac_iceland.py +0 -307
  324. package/lib/python3.9/encodings/mac_latin2.py +0 -312
  325. package/lib/python3.9/encodings/mac_roman.py +0 -307
  326. package/lib/python3.9/encodings/mac_romanian.py +0 -307
  327. package/lib/python3.9/encodings/mac_turkish.py +0 -307
  328. package/lib/python3.9/encodings/mbcs.py +0 -47
  329. package/lib/python3.9/encodings/oem.py +0 -41
  330. package/lib/python3.9/encodings/palmos.py +0 -308
  331. package/lib/python3.9/encodings/ptcp154.py +0 -312
  332. package/lib/python3.9/encodings/punycode.py +0 -237
  333. package/lib/python3.9/encodings/quopri_codec.py +0 -56
  334. package/lib/python3.9/encodings/raw_unicode_escape.py +0 -45
  335. package/lib/python3.9/encodings/rot_13.py +0 -113
  336. package/lib/python3.9/encodings/shift_jis.py +0 -39
  337. package/lib/python3.9/encodings/shift_jis_2004.py +0 -39
  338. package/lib/python3.9/encodings/shift_jisx0213.py +0 -39
  339. package/lib/python3.9/encodings/tis_620.py +0 -307
  340. package/lib/python3.9/encodings/undefined.py +0 -49
  341. package/lib/python3.9/encodings/unicode_escape.py +0 -45
  342. package/lib/python3.9/encodings/utf_16.py +0 -155
  343. package/lib/python3.9/encodings/utf_16_be.py +0 -42
  344. package/lib/python3.9/encodings/utf_16_le.py +0 -42
  345. package/lib/python3.9/encodings/utf_32.py +0 -150
  346. package/lib/python3.9/encodings/utf_32_be.py +0 -37
  347. package/lib/python3.9/encodings/utf_32_le.py +0 -37
  348. package/lib/python3.9/encodings/utf_7.py +0 -38
  349. package/lib/python3.9/encodings/utf_8.py +0 -42
  350. package/lib/python3.9/encodings/utf_8_sig.py +0 -130
  351. package/lib/python3.9/encodings/uu_codec.py +0 -103
  352. package/lib/python3.9/encodings/zlib_codec.py +0 -77
  353. package/lib/python3.9/enum.py +0 -913
  354. package/lib/python3.9/filecmp.py +0 -309
  355. package/lib/python3.9/fileinput.py +0 -432
  356. package/lib/python3.9/fnmatch.py +0 -183
  357. package/lib/python3.9/formatter.py +0 -452
  358. package/lib/python3.9/fractions.py +0 -641
  359. package/lib/python3.9/ftplib.py +0 -974
  360. package/lib/python3.9/functools.py +0 -980
  361. package/lib/python3.9/genericpath.py +0 -155
  362. package/lib/python3.9/getopt.py +0 -215
  363. package/lib/python3.9/getpass.py +0 -185
  364. package/lib/python3.9/gettext.py +0 -788
  365. package/lib/python3.9/glob.py +0 -173
  366. package/lib/python3.9/graphlib.py +0 -245
  367. package/lib/python3.9/gzip.py +0 -609
  368. package/lib/python3.9/hashlib.py +0 -262
  369. package/lib/python3.9/heapq.py +0 -601
  370. package/lib/python3.9/hmac.py +0 -203
  371. package/lib/python3.9/html/__init__.py +0 -132
  372. package/lib/python3.9/html/entities.py +0 -2509
  373. package/lib/python3.9/html/parser.py +0 -462
  374. package/lib/python3.9/http/__init__.py +0 -149
  375. package/lib/python3.9/http/client.py +0 -1495
  376. package/lib/python3.9/http/cookiejar.py +0 -2113
  377. package/lib/python3.9/http/cookies.py +0 -612
  378. package/lib/python3.9/http/server.py +0 -1299
  379. package/lib/python3.9/imaplib.py +0 -1650
  380. package/lib/python3.9/imghdr.py +0 -168
  381. package/lib/python3.9/imp.py +0 -345
  382. package/lib/python3.9/importlib/__init__.py +0 -176
  383. package/lib/python3.9/importlib/_bootstrap.py +0 -1189
  384. package/lib/python3.9/importlib/_bootstrap_external.py +0 -1637
  385. package/lib/python3.9/importlib/_common.py +0 -62
  386. package/lib/python3.9/importlib/abc.py +0 -474
  387. package/lib/python3.9/importlib/machinery.py +0 -21
  388. package/lib/python3.9/importlib/metadata.py +0 -586
  389. package/lib/python3.9/importlib/resources.py +0 -215
  390. package/lib/python3.9/importlib/util.py +0 -300
  391. package/lib/python3.9/inspect.py +0 -3180
  392. package/lib/python3.9/io.py +0 -99
  393. package/lib/python3.9/ipaddress.py +0 -2280
  394. package/lib/python3.9/json/__init__.py +0 -359
  395. package/lib/python3.9/json/decoder.py +0 -356
  396. package/lib/python3.9/json/encoder.py +0 -442
  397. package/lib/python3.9/json/scanner.py +0 -73
  398. package/lib/python3.9/json/tool.py +0 -78
  399. package/lib/python3.9/keyword.py +0 -62
  400. package/lib/python3.9/lib-dynload/_asyncio.cpython-39-x86_64-linux-gnu.so +0 -0
  401. package/lib/python3.9/lib-dynload/_bisect.cpython-39-x86_64-linux-gnu.so +0 -0
  402. package/lib/python3.9/lib-dynload/_blake2.cpython-39-x86_64-linux-gnu.so +0 -0
  403. package/lib/python3.9/lib-dynload/_bz2.cpython-39-x86_64-linux-gnu.so +0 -0
  404. package/lib/python3.9/lib-dynload/_codecs_cn.cpython-39-x86_64-linux-gnu.so +0 -0
  405. package/lib/python3.9/lib-dynload/_codecs_hk.cpython-39-x86_64-linux-gnu.so +0 -0
  406. package/lib/python3.9/lib-dynload/_codecs_iso2022.cpython-39-x86_64-linux-gnu.so +0 -0
  407. package/lib/python3.9/lib-dynload/_codecs_jp.cpython-39-x86_64-linux-gnu.so +0 -0
  408. package/lib/python3.9/lib-dynload/_codecs_kr.cpython-39-x86_64-linux-gnu.so +0 -0
  409. package/lib/python3.9/lib-dynload/_codecs_tw.cpython-39-x86_64-linux-gnu.so +0 -0
  410. package/lib/python3.9/lib-dynload/_contextvars.cpython-39-x86_64-linux-gnu.so +0 -0
  411. package/lib/python3.9/lib-dynload/_crypt.cpython-39-x86_64-linux-gnu.so +0 -0
  412. package/lib/python3.9/lib-dynload/_csv.cpython-39-x86_64-linux-gnu.so +0 -0
  413. package/lib/python3.9/lib-dynload/_ctypes.cpython-39-x86_64-linux-gnu.so +0 -0
  414. package/lib/python3.9/lib-dynload/_ctypes_test.cpython-39-x86_64-linux-gnu.so +0 -0
  415. package/lib/python3.9/lib-dynload/_curses.cpython-39-x86_64-linux-gnu.so +0 -0
  416. package/lib/python3.9/lib-dynload/_curses_panel.cpython-39-x86_64-linux-gnu.so +0 -0
  417. package/lib/python3.9/lib-dynload/_datetime.cpython-39-x86_64-linux-gnu.so +0 -0
  418. package/lib/python3.9/lib-dynload/_decimal.cpython-39-x86_64-linux-gnu.so +0 -0
  419. package/lib/python3.9/lib-dynload/_elementtree.cpython-39-x86_64-linux-gnu.so +0 -0
  420. package/lib/python3.9/lib-dynload/_hashlib.cpython-39-x86_64-linux-gnu.so +0 -0
  421. package/lib/python3.9/lib-dynload/_heapq.cpython-39-x86_64-linux-gnu.so +0 -0
  422. package/lib/python3.9/lib-dynload/_json.cpython-39-x86_64-linux-gnu.so +0 -0
  423. package/lib/python3.9/lib-dynload/_lsprof.cpython-39-x86_64-linux-gnu.so +0 -0
  424. package/lib/python3.9/lib-dynload/_lzma.cpython-39-x86_64-linux-gnu.so +0 -0
  425. package/lib/python3.9/lib-dynload/_md5.cpython-39-x86_64-linux-gnu.so +0 -0
  426. package/lib/python3.9/lib-dynload/_multibytecodec.cpython-39-x86_64-linux-gnu.so +0 -0
  427. package/lib/python3.9/lib-dynload/_multiprocessing.cpython-39-x86_64-linux-gnu.so +0 -0
  428. package/lib/python3.9/lib-dynload/_opcode.cpython-39-x86_64-linux-gnu.so +0 -0
  429. package/lib/python3.9/lib-dynload/_pickle.cpython-39-x86_64-linux-gnu.so +0 -0
  430. package/lib/python3.9/lib-dynload/_posixshmem.cpython-39-x86_64-linux-gnu.so +0 -0
  431. package/lib/python3.9/lib-dynload/_posixsubprocess.cpython-39-x86_64-linux-gnu.so +0 -0
  432. package/lib/python3.9/lib-dynload/_queue.cpython-39-x86_64-linux-gnu.so +0 -0
  433. package/lib/python3.9/lib-dynload/_random.cpython-39-x86_64-linux-gnu.so +0 -0
  434. package/lib/python3.9/lib-dynload/_sha1.cpython-39-x86_64-linux-gnu.so +0 -0
  435. package/lib/python3.9/lib-dynload/_sha256.cpython-39-x86_64-linux-gnu.so +0 -0
  436. package/lib/python3.9/lib-dynload/_sha3.cpython-39-x86_64-linux-gnu.so +0 -0
  437. package/lib/python3.9/lib-dynload/_sha512.cpython-39-x86_64-linux-gnu.so +0 -0
  438. package/lib/python3.9/lib-dynload/_socket.cpython-39-x86_64-linux-gnu.so +0 -0
  439. package/lib/python3.9/lib-dynload/_sqlite3.cpython-39-x86_64-linux-gnu.so +0 -0
  440. package/lib/python3.9/lib-dynload/_ssl.cpython-39-x86_64-linux-gnu.so +0 -0
  441. package/lib/python3.9/lib-dynload/_statistics.cpython-39-x86_64-linux-gnu.so +0 -0
  442. package/lib/python3.9/lib-dynload/_struct.cpython-39-x86_64-linux-gnu.so +0 -0
  443. package/lib/python3.9/lib-dynload/_testbuffer.cpython-39-x86_64-linux-gnu.so +0 -0
  444. package/lib/python3.9/lib-dynload/_testcapi.cpython-39-x86_64-linux-gnu.so +0 -0
  445. package/lib/python3.9/lib-dynload/_testimportmultiple.cpython-39-x86_64-linux-gnu.so +0 -0
  446. package/lib/python3.9/lib-dynload/_testinternalcapi.cpython-39-x86_64-linux-gnu.so +0 -0
  447. package/lib/python3.9/lib-dynload/_testmultiphase.cpython-39-x86_64-linux-gnu.so +0 -0
  448. package/lib/python3.9/lib-dynload/_tkinter.cpython-39-x86_64-linux-gnu.so +0 -0
  449. package/lib/python3.9/lib-dynload/_xxsubinterpreters.cpython-39-x86_64-linux-gnu.so +0 -0
  450. package/lib/python3.9/lib-dynload/_xxtestfuzz.cpython-39-x86_64-linux-gnu.so +0 -0
  451. package/lib/python3.9/lib-dynload/_zoneinfo.cpython-39-x86_64-linux-gnu.so +0 -0
  452. package/lib/python3.9/lib-dynload/array.cpython-39-x86_64-linux-gnu.so +0 -0
  453. package/lib/python3.9/lib-dynload/audioop.cpython-39-x86_64-linux-gnu.so +0 -0
  454. package/lib/python3.9/lib-dynload/binascii.cpython-39-x86_64-linux-gnu.so +0 -0
  455. package/lib/python3.9/lib-dynload/cmath.cpython-39-x86_64-linux-gnu.so +0 -0
  456. package/lib/python3.9/lib-dynload/fcntl.cpython-39-x86_64-linux-gnu.so +0 -0
  457. package/lib/python3.9/lib-dynload/grp.cpython-39-x86_64-linux-gnu.so +0 -0
  458. package/lib/python3.9/lib-dynload/math.cpython-39-x86_64-linux-gnu.so +0 -0
  459. package/lib/python3.9/lib-dynload/mmap.cpython-39-x86_64-linux-gnu.so +0 -0
  460. package/lib/python3.9/lib-dynload/nis.cpython-39-x86_64-linux-gnu.so +0 -0
  461. package/lib/python3.9/lib-dynload/ossaudiodev.cpython-39-x86_64-linux-gnu.so +0 -0
  462. package/lib/python3.9/lib-dynload/parser.cpython-39-x86_64-linux-gnu.so +0 -0
  463. package/lib/python3.9/lib-dynload/pyexpat.cpython-39-x86_64-linux-gnu.so +0 -0
  464. package/lib/python3.9/lib-dynload/readline.cpython-39-x86_64-linux-gnu.so +0 -0
  465. package/lib/python3.9/lib-dynload/resource.cpython-39-x86_64-linux-gnu.so +0 -0
  466. package/lib/python3.9/lib-dynload/select.cpython-39-x86_64-linux-gnu.so +0 -0
  467. package/lib/python3.9/lib-dynload/spwd.cpython-39-x86_64-linux-gnu.so +0 -0
  468. package/lib/python3.9/lib-dynload/syslog.cpython-39-x86_64-linux-gnu.so +0 -0
  469. package/lib/python3.9/lib-dynload/termios.cpython-39-x86_64-linux-gnu.so +0 -0
  470. package/lib/python3.9/lib-dynload/unicodedata.cpython-39-x86_64-linux-gnu.so +0 -0
  471. package/lib/python3.9/lib-dynload/xxlimited.cpython-39-x86_64-linux-gnu.so +0 -0
  472. package/lib/python3.9/lib-dynload/zlib.cpython-39-x86_64-linux-gnu.so +0 -0
  473. package/lib/python3.9/linecache.py +0 -177
  474. package/lib/python3.9/locale.py +0 -1755
  475. package/lib/python3.9/logging/__init__.py +0 -2208
  476. package/lib/python3.9/logging/config.py +0 -945
  477. package/lib/python3.9/logging/handlers.py +0 -1543
  478. package/lib/python3.9/lzma.py +0 -347
  479. package/lib/python3.9/mailbox.py +0 -2151
  480. package/lib/python3.9/mailcap.py +0 -276
  481. package/lib/python3.9/mimetypes.py +0 -614
  482. package/lib/python3.9/modulefinder.py +0 -685
  483. package/lib/python3.9/multiprocessing/__init__.py +0 -37
  484. package/lib/python3.9/multiprocessing/connection.py +0 -978
  485. package/lib/python3.9/multiprocessing/context.py +0 -362
  486. package/lib/python3.9/multiprocessing/dummy/__init__.py +0 -126
  487. package/lib/python3.9/multiprocessing/dummy/connection.py +0 -75
  488. package/lib/python3.9/multiprocessing/forkserver.py +0 -348
  489. package/lib/python3.9/multiprocessing/heap.py +0 -337
  490. package/lib/python3.9/multiprocessing/managers.py +0 -1369
  491. package/lib/python3.9/multiprocessing/pool.py +0 -954
  492. package/lib/python3.9/multiprocessing/popen_fork.py +0 -83
  493. package/lib/python3.9/multiprocessing/popen_forkserver.py +0 -74
  494. package/lib/python3.9/multiprocessing/popen_spawn_posix.py +0 -72
  495. package/lib/python3.9/multiprocessing/popen_spawn_win32.py +0 -131
  496. package/lib/python3.9/multiprocessing/process.py +0 -432
  497. package/lib/python3.9/multiprocessing/queues.py +0 -380
  498. package/lib/python3.9/multiprocessing/reduction.py +0 -281
  499. package/lib/python3.9/multiprocessing/resource_sharer.py +0 -154
  500. package/lib/python3.9/multiprocessing/resource_tracker.py +0 -231
  501. package/lib/python3.9/multiprocessing/shared_memory.py +0 -532
  502. package/lib/python3.9/multiprocessing/sharedctypes.py +0 -240
  503. package/lib/python3.9/multiprocessing/spawn.py +0 -297
  504. package/lib/python3.9/multiprocessing/synchronize.py +0 -394
  505. package/lib/python3.9/multiprocessing/util.py +0 -489
  506. package/lib/python3.9/netrc.py +0 -139
  507. package/lib/python3.9/nntplib.py +0 -1090
  508. package/lib/python3.9/ntpath.py +0 -794
  509. package/lib/python3.9/nturl2path.py +0 -73
  510. package/lib/python3.9/numbers.py +0 -389
  511. package/lib/python3.9/opcode.py +0 -217
  512. package/lib/python3.9/operator.py +0 -460
  513. package/lib/python3.9/optparse.py +0 -1681
  514. package/lib/python3.9/os.py +0 -1116
  515. package/lib/python3.9/pathlib.py +0 -1576
  516. package/lib/python3.9/pdb.py +0 -1731
  517. package/lib/python3.9/pickle.py +0 -1817
  518. package/lib/python3.9/pickletools.py +0 -2890
  519. package/lib/python3.9/pipes.py +0 -247
  520. package/lib/python3.9/pkgutil.py +0 -707
  521. package/lib/python3.9/platform.py +0 -1259
  522. package/lib/python3.9/plistlib.py +0 -881
  523. package/lib/python3.9/poplib.py +0 -483
  524. package/lib/python3.9/posixpath.py +0 -525
  525. package/lib/python3.9/pprint.py +0 -638
  526. package/lib/python3.9/profile.py +0 -600
  527. package/lib/python3.9/pstats.py +0 -779
  528. package/lib/python3.9/pty.py +0 -172
  529. package/lib/python3.9/py_compile.py +0 -215
  530. package/lib/python3.9/pyclbr.py +0 -404
  531. package/lib/python3.9/pydoc.py +0 -2855
  532. package/lib/python3.9/pydoc_data/__init__.py +0 -0
  533. package/lib/python3.9/pydoc_data/_pydoc.css +0 -6
  534. package/lib/python3.9/pydoc_data/topics.py +0 -13968
  535. package/lib/python3.9/queue.py +0 -326
  536. package/lib/python3.9/quopri.py +0 -242
  537. package/lib/python3.9/random.py +0 -887
  538. package/lib/python3.9/re.py +0 -384
  539. package/lib/python3.9/reprlib.py +0 -161
  540. package/lib/python3.9/rlcompleter.py +0 -205
  541. package/lib/python3.9/runpy.py +0 -300
  542. package/lib/python3.9/sched.py +0 -167
  543. package/lib/python3.9/secrets.py +0 -72
  544. package/lib/python3.9/selectors.py +0 -619
  545. package/lib/python3.9/shelve.py +0 -243
  546. package/lib/python3.9/shlex.py +0 -350
  547. package/lib/python3.9/shutil.py +0 -1443
  548. package/lib/python3.9/signal.py +0 -85
  549. package/lib/python3.9/site.py +0 -643
  550. package/lib/python3.9/smtpd.py +0 -967
  551. package/lib/python3.9/smtplib.py +0 -1123
  552. package/lib/python3.9/sndhdr.py +0 -257
  553. package/lib/python3.9/socket.py +0 -958
  554. package/lib/python3.9/socketserver.py +0 -817
  555. package/lib/python3.9/sqlite3/__init__.py +0 -23
  556. package/lib/python3.9/sqlite3/dbapi2.py +0 -89
  557. package/lib/python3.9/sqlite3/dump.py +0 -70
  558. package/lib/python3.9/sre_compile.py +0 -784
  559. package/lib/python3.9/sre_constants.py +0 -259
  560. package/lib/python3.9/sre_parse.py +0 -1064
  561. package/lib/python3.9/ssl.py +0 -1489
  562. package/lib/python3.9/stat.py +0 -195
  563. package/lib/python3.9/statistics.py +0 -1120
  564. package/lib/python3.9/string.py +0 -280
  565. package/lib/python3.9/stringprep.py +0 -272
  566. package/lib/python3.9/struct.py +0 -15
  567. package/lib/python3.9/subprocess.py +0 -2074
  568. package/lib/python3.9/sunau.py +0 -526
  569. package/lib/python3.9/symbol.py +0 -122
  570. package/lib/python3.9/symtable.py +0 -243
  571. package/lib/python3.9/sysconfig.py +0 -720
  572. package/lib/python3.9/tabnanny.py +0 -333
  573. package/lib/python3.9/tarfile.py +0 -2576
  574. package/lib/python3.9/telnetlib.py +0 -677
  575. package/lib/python3.9/tempfile.py +0 -832
  576. package/lib/python3.9/textwrap.py +0 -486
  577. package/lib/python3.9/this.py +0 -28
  578. package/lib/python3.9/threading.py +0 -1502
  579. package/lib/python3.9/timeit.py +0 -375
  580. package/lib/python3.9/token.py +0 -136
  581. package/lib/python3.9/tokenize.py +0 -682
  582. package/lib/python3.9/trace.py +0 -740
  583. package/lib/python3.9/traceback.py +0 -623
  584. package/lib/python3.9/tracemalloc.py +0 -560
  585. package/lib/python3.9/tty.py +0 -36
  586. package/lib/python3.9/turtle.py +0 -4140
  587. package/lib/python3.9/types.py +0 -299
  588. package/lib/python3.9/typing.py +0 -2147
  589. package/lib/python3.9/unittest/__init__.py +0 -95
  590. package/lib/python3.9/unittest/__main__.py +0 -18
  591. package/lib/python3.9/unittest/_log.py +0 -69
  592. package/lib/python3.9/unittest/async_case.py +0 -160
  593. package/lib/python3.9/unittest/case.py +0 -1437
  594. package/lib/python3.9/unittest/loader.py +0 -517
  595. package/lib/python3.9/unittest/main.py +0 -275
  596. package/lib/python3.9/unittest/mock.py +0 -2891
  597. package/lib/python3.9/unittest/result.py +0 -216
  598. package/lib/python3.9/unittest/runner.py +0 -221
  599. package/lib/python3.9/unittest/signals.py +0 -71
  600. package/lib/python3.9/unittest/suite.py +0 -361
  601. package/lib/python3.9/unittest/util.py +0 -170
  602. package/lib/python3.9/urllib/__init__.py +0 -0
  603. package/lib/python3.9/urllib/error.py +0 -77
  604. package/lib/python3.9/urllib/parse.py +0 -1179
  605. package/lib/python3.9/urllib/request.py +0 -2765
  606. package/lib/python3.9/urllib/response.py +0 -84
  607. package/lib/python3.9/urllib/robotparser.py +0 -273
  608. package/lib/python3.9/uu.py +0 -206
  609. package/lib/python3.9/uuid.py +0 -728
  610. package/lib/python3.9/venv/__init__.py +0 -504
  611. package/lib/python3.9/venv/__main__.py +0 -10
  612. package/lib/python3.9/venv/scripts/common/Activate.ps1 +0 -241
  613. package/lib/python3.9/venv/scripts/common/activate +0 -66
  614. package/lib/python3.9/venv/scripts/posix/activate.csh +0 -25
  615. package/lib/python3.9/venv/scripts/posix/activate.fish +0 -64
  616. package/lib/python3.9/warnings.py +0 -549
  617. package/lib/python3.9/wave.py +0 -513
  618. package/lib/python3.9/weakref.py +0 -664
  619. package/lib/python3.9/webbrowser.py +0 -713
  620. package/lib/python3.9/wsgiref/__init__.py +0 -23
  621. package/lib/python3.9/wsgiref/handlers.py +0 -571
  622. package/lib/python3.9/wsgiref/headers.py +0 -184
  623. package/lib/python3.9/wsgiref/simple_server.py +0 -165
  624. package/lib/python3.9/wsgiref/util.py +0 -172
  625. package/lib/python3.9/wsgiref/validate.py +0 -441
  626. package/lib/python3.9/xdrlib.py +0 -241
  627. package/lib/python3.9/xml/__init__.py +0 -20
  628. package/lib/python3.9/xml/dom/NodeFilter.py +0 -27
  629. package/lib/python3.9/xml/dom/__init__.py +0 -140
  630. package/lib/python3.9/xml/dom/domreg.py +0 -99
  631. package/lib/python3.9/xml/dom/expatbuilder.py +0 -965
  632. package/lib/python3.9/xml/dom/minicompat.py +0 -109
  633. package/lib/python3.9/xml/dom/minidom.py +0 -2011
  634. package/lib/python3.9/xml/dom/pulldom.py +0 -349
  635. package/lib/python3.9/xml/dom/xmlbuilder.py +0 -387
  636. package/lib/python3.9/xml/etree/ElementInclude.py +0 -185
  637. package/lib/python3.9/xml/etree/ElementPath.py +0 -405
  638. package/lib/python3.9/xml/etree/ElementTree.py +0 -2085
  639. package/lib/python3.9/xml/etree/__init__.py +0 -33
  640. package/lib/python3.9/xml/etree/cElementTree.py +0 -3
  641. package/lib/python3.9/xml/parsers/__init__.py +0 -8
  642. package/lib/python3.9/xml/parsers/expat.py +0 -8
  643. package/lib/python3.9/xml/sax/__init__.py +0 -107
  644. package/lib/python3.9/xml/sax/_exceptions.py +0 -131
  645. package/lib/python3.9/xml/sax/expatreader.py +0 -446
  646. package/lib/python3.9/xml/sax/handler.py +0 -342
  647. package/lib/python3.9/xml/sax/saxutils.py +0 -369
  648. package/lib/python3.9/xml/sax/xmlreader.py +0 -380
  649. package/lib/python3.9/xmlrpc/__init__.py +0 -1
  650. package/lib/python3.9/xmlrpc/client.py +0 -1524
  651. package/lib/python3.9/xmlrpc/server.py +0 -993
  652. package/lib/python3.9/zipapp.py +0 -206
  653. package/lib/python3.9/zipfile.py +0 -2426
  654. package/lib/python3.9/zipimport.py +0 -792
  655. package/lib/python3.9/zoneinfo/__init__.py +0 -31
  656. package/lib/python3.9/zoneinfo/_common.py +0 -165
  657. package/lib/python3.9/zoneinfo/_tzpath.py +0 -175
  658. package/lib/python3.9/zoneinfo/_zoneinfo.py +0 -752
  659. package/runtime.json +0 -1
  660. package/ssl/cacert.pem +0 -3959
@@ -1,1256 +0,0 @@
1
- """distutils.dist
2
-
3
- Provides the Distribution class, which represents the module distribution
4
- being built/installed/distributed.
5
- """
6
-
7
- import sys
8
- import os
9
- import re
10
- from email import message_from_file
11
-
12
- try:
13
- import warnings
14
- except ImportError:
15
- warnings = None
16
-
17
- from distutils.errors import *
18
- from distutils.fancy_getopt import FancyGetopt, translate_longopt
19
- from distutils.util import check_environ, strtobool, rfc822_escape
20
- from distutils import log
21
- from distutils.debug import DEBUG
22
-
23
- # Regex to define acceptable Distutils command names. This is not *quite*
24
- # the same as a Python NAME -- I don't allow leading underscores. The fact
25
- # that they're very similar is no coincidence; the default naming scheme is
26
- # to look for a Python module named after the command.
27
- command_re = re.compile(r'^[a-zA-Z]([a-zA-Z0-9_]*)$')
28
-
29
-
30
- def _ensure_list(value, fieldname):
31
- if isinstance(value, str):
32
- # a string containing comma separated values is okay. It will
33
- # be converted to a list by Distribution.finalize_options().
34
- pass
35
- elif not isinstance(value, list):
36
- # passing a tuple or an iterator perhaps, warn and convert
37
- typename = type(value).__name__
38
- msg = f"Warning: '{fieldname}' should be a list, got type '{typename}'"
39
- log.log(log.WARN, msg)
40
- value = list(value)
41
- return value
42
-
43
-
44
- class Distribution:
45
- """The core of the Distutils. Most of the work hiding behind 'setup'
46
- is really done within a Distribution instance, which farms the work out
47
- to the Distutils commands specified on the command line.
48
-
49
- Setup scripts will almost never instantiate Distribution directly,
50
- unless the 'setup()' function is totally inadequate to their needs.
51
- However, it is conceivable that a setup script might wish to subclass
52
- Distribution for some specialized purpose, and then pass the subclass
53
- to 'setup()' as the 'distclass' keyword argument. If so, it is
54
- necessary to respect the expectations that 'setup' has of Distribution.
55
- See the code for 'setup()', in core.py, for details.
56
- """
57
-
58
- # 'global_options' describes the command-line options that may be
59
- # supplied to the setup script prior to any actual commands.
60
- # Eg. "./setup.py -n" or "./setup.py --quiet" both take advantage of
61
- # these global options. This list should be kept to a bare minimum,
62
- # since every global option is also valid as a command option -- and we
63
- # don't want to pollute the commands with too many options that they
64
- # have minimal control over.
65
- # The fourth entry for verbose means that it can be repeated.
66
- global_options = [
67
- ('verbose', 'v', "run verbosely (default)", 1),
68
- ('quiet', 'q', "run quietly (turns verbosity off)"),
69
- ('dry-run', 'n', "don't actually do anything"),
70
- ('help', 'h', "show detailed help message"),
71
- ('no-user-cfg', None,
72
- 'ignore pydistutils.cfg in your home directory'),
73
- ]
74
-
75
- # 'common_usage' is a short (2-3 line) string describing the common
76
- # usage of the setup script.
77
- common_usage = """\
78
- Common commands: (see '--help-commands' for more)
79
-
80
- setup.py build will build the package underneath 'build/'
81
- setup.py install will install the package
82
- """
83
-
84
- # options that are not propagated to the commands
85
- display_options = [
86
- ('help-commands', None,
87
- "list all available commands"),
88
- ('name', None,
89
- "print package name"),
90
- ('version', 'V',
91
- "print package version"),
92
- ('fullname', None,
93
- "print <package name>-<version>"),
94
- ('author', None,
95
- "print the author's name"),
96
- ('author-email', None,
97
- "print the author's email address"),
98
- ('maintainer', None,
99
- "print the maintainer's name"),
100
- ('maintainer-email', None,
101
- "print the maintainer's email address"),
102
- ('contact', None,
103
- "print the maintainer's name if known, else the author's"),
104
- ('contact-email', None,
105
- "print the maintainer's email address if known, else the author's"),
106
- ('url', None,
107
- "print the URL for this package"),
108
- ('license', None,
109
- "print the license of the package"),
110
- ('licence', None,
111
- "alias for --license"),
112
- ('description', None,
113
- "print the package description"),
114
- ('long-description', None,
115
- "print the long package description"),
116
- ('platforms', None,
117
- "print the list of platforms"),
118
- ('classifiers', None,
119
- "print the list of classifiers"),
120
- ('keywords', None,
121
- "print the list of keywords"),
122
- ('provides', None,
123
- "print the list of packages/modules provided"),
124
- ('requires', None,
125
- "print the list of packages/modules required"),
126
- ('obsoletes', None,
127
- "print the list of packages/modules made obsolete")
128
- ]
129
- display_option_names = [translate_longopt(x[0]) for x in display_options]
130
-
131
- # negative options are options that exclude other options
132
- negative_opt = {'quiet': 'verbose'}
133
-
134
- # -- Creation/initialization methods -------------------------------
135
-
136
- def __init__(self, attrs=None):
137
- """Construct a new Distribution instance: initialize all the
138
- attributes of a Distribution, and then use 'attrs' (a dictionary
139
- mapping attribute names to values) to assign some of those
140
- attributes their "real" values. (Any attributes not mentioned in
141
- 'attrs' will be assigned to some null value: 0, None, an empty list
142
- or dictionary, etc.) Most importantly, initialize the
143
- 'command_obj' attribute to the empty dictionary; this will be
144
- filled in with real command objects by 'parse_command_line()'.
145
- """
146
-
147
- # Default values for our command-line options
148
- self.verbose = 1
149
- self.dry_run = 0
150
- self.help = 0
151
- for attr in self.display_option_names:
152
- setattr(self, attr, 0)
153
-
154
- # Store the distribution meta-data (name, version, author, and so
155
- # forth) in a separate object -- we're getting to have enough
156
- # information here (and enough command-line options) that it's
157
- # worth it. Also delegate 'get_XXX()' methods to the 'metadata'
158
- # object in a sneaky and underhanded (but efficient!) way.
159
- self.metadata = DistributionMetadata()
160
- for basename in self.metadata._METHOD_BASENAMES:
161
- method_name = "get_" + basename
162
- setattr(self, method_name, getattr(self.metadata, method_name))
163
-
164
- # 'cmdclass' maps command names to class objects, so we
165
- # can 1) quickly figure out which class to instantiate when
166
- # we need to create a new command object, and 2) have a way
167
- # for the setup script to override command classes
168
- self.cmdclass = {}
169
-
170
- # 'command_packages' is a list of packages in which commands
171
- # are searched for. The factory for command 'foo' is expected
172
- # to be named 'foo' in the module 'foo' in one of the packages
173
- # named here. This list is searched from the left; an error
174
- # is raised if no named package provides the command being
175
- # searched for. (Always access using get_command_packages().)
176
- self.command_packages = None
177
-
178
- # 'script_name' and 'script_args' are usually set to sys.argv[0]
179
- # and sys.argv[1:], but they can be overridden when the caller is
180
- # not necessarily a setup script run from the command-line.
181
- self.script_name = None
182
- self.script_args = None
183
-
184
- # 'command_options' is where we store command options between
185
- # parsing them (from config files, the command-line, etc.) and when
186
- # they are actually needed -- ie. when the command in question is
187
- # instantiated. It is a dictionary of dictionaries of 2-tuples:
188
- # command_options = { command_name : { option : (source, value) } }
189
- self.command_options = {}
190
-
191
- # 'dist_files' is the list of (command, pyversion, file) that
192
- # have been created by any dist commands run so far. This is
193
- # filled regardless of whether the run is dry or not. pyversion
194
- # gives sysconfig.get_python_version() if the dist file is
195
- # specific to a Python version, 'any' if it is good for all
196
- # Python versions on the target platform, and '' for a source
197
- # file. pyversion should not be used to specify minimum or
198
- # maximum required Python versions; use the metainfo for that
199
- # instead.
200
- self.dist_files = []
201
-
202
- # These options are really the business of various commands, rather
203
- # than of the Distribution itself. We provide aliases for them in
204
- # Distribution as a convenience to the developer.
205
- self.packages = None
206
- self.package_data = {}
207
- self.package_dir = None
208
- self.py_modules = None
209
- self.libraries = None
210
- self.headers = None
211
- self.ext_modules = None
212
- self.ext_package = None
213
- self.include_dirs = None
214
- self.extra_path = None
215
- self.scripts = None
216
- self.data_files = None
217
- self.password = ''
218
-
219
- # And now initialize bookkeeping stuff that can't be supplied by
220
- # the caller at all. 'command_obj' maps command names to
221
- # Command instances -- that's how we enforce that every command
222
- # class is a singleton.
223
- self.command_obj = {}
224
-
225
- # 'have_run' maps command names to boolean values; it keeps track
226
- # of whether we have actually run a particular command, to make it
227
- # cheap to "run" a command whenever we think we might need to -- if
228
- # it's already been done, no need for expensive filesystem
229
- # operations, we just check the 'have_run' dictionary and carry on.
230
- # It's only safe to query 'have_run' for a command class that has
231
- # been instantiated -- a false value will be inserted when the
232
- # command object is created, and replaced with a true value when
233
- # the command is successfully run. Thus it's probably best to use
234
- # '.get()' rather than a straight lookup.
235
- self.have_run = {}
236
-
237
- # Now we'll use the attrs dictionary (ultimately, keyword args from
238
- # the setup script) to possibly override any or all of these
239
- # distribution options.
240
-
241
- if attrs:
242
- # Pull out the set of command options and work on them
243
- # specifically. Note that this order guarantees that aliased
244
- # command options will override any supplied redundantly
245
- # through the general options dictionary.
246
- options = attrs.get('options')
247
- if options is not None:
248
- del attrs['options']
249
- for (command, cmd_options) in options.items():
250
- opt_dict = self.get_option_dict(command)
251
- for (opt, val) in cmd_options.items():
252
- opt_dict[opt] = ("setup script", val)
253
-
254
- if 'licence' in attrs:
255
- attrs['license'] = attrs['licence']
256
- del attrs['licence']
257
- msg = "'licence' distribution option is deprecated; use 'license'"
258
- if warnings is not None:
259
- warnings.warn(msg)
260
- else:
261
- sys.stderr.write(msg + "\n")
262
-
263
- # Now work on the rest of the attributes. Any attribute that's
264
- # not already defined is invalid!
265
- for (key, val) in attrs.items():
266
- if hasattr(self.metadata, "set_" + key):
267
- getattr(self.metadata, "set_" + key)(val)
268
- elif hasattr(self.metadata, key):
269
- setattr(self.metadata, key, val)
270
- elif hasattr(self, key):
271
- setattr(self, key, val)
272
- else:
273
- msg = "Unknown distribution option: %s" % repr(key)
274
- warnings.warn(msg)
275
-
276
- # no-user-cfg is handled before other command line args
277
- # because other args override the config files, and this
278
- # one is needed before we can load the config files.
279
- # If attrs['script_args'] wasn't passed, assume false.
280
- #
281
- # This also make sure we just look at the global options
282
- self.want_user_cfg = True
283
-
284
- if self.script_args is not None:
285
- for arg in self.script_args:
286
- if not arg.startswith('-'):
287
- break
288
- if arg == '--no-user-cfg':
289
- self.want_user_cfg = False
290
- break
291
-
292
- self.finalize_options()
293
-
294
- def get_option_dict(self, command):
295
- """Get the option dictionary for a given command. If that
296
- command's option dictionary hasn't been created yet, then create it
297
- and return the new dictionary; otherwise, return the existing
298
- option dictionary.
299
- """
300
- dict = self.command_options.get(command)
301
- if dict is None:
302
- dict = self.command_options[command] = {}
303
- return dict
304
-
305
- def dump_option_dicts(self, header=None, commands=None, indent=""):
306
- from pprint import pformat
307
-
308
- if commands is None: # dump all command option dicts
309
- commands = sorted(self.command_options.keys())
310
-
311
- if header is not None:
312
- self.announce(indent + header)
313
- indent = indent + " "
314
-
315
- if not commands:
316
- self.announce(indent + "no commands known yet")
317
- return
318
-
319
- for cmd_name in commands:
320
- opt_dict = self.command_options.get(cmd_name)
321
- if opt_dict is None:
322
- self.announce(indent +
323
- "no option dict for '%s' command" % cmd_name)
324
- else:
325
- self.announce(indent +
326
- "option dict for '%s' command:" % cmd_name)
327
- out = pformat(opt_dict)
328
- for line in out.split('\n'):
329
- self.announce(indent + " " + line)
330
-
331
- # -- Config file finding/parsing methods ---------------------------
332
-
333
- def find_config_files(self):
334
- """Find as many configuration files as should be processed for this
335
- platform, and return a list of filenames in the order in which they
336
- should be parsed. The filenames returned are guaranteed to exist
337
- (modulo nasty race conditions).
338
-
339
- There are three possible config files: distutils.cfg in the
340
- Distutils installation directory (ie. where the top-level
341
- Distutils __inst__.py file lives), a file in the user's home
342
- directory named .pydistutils.cfg on Unix and pydistutils.cfg
343
- on Windows/Mac; and setup.cfg in the current directory.
344
-
345
- The file in the user's home directory can be disabled with the
346
- --no-user-cfg option.
347
- """
348
- files = []
349
- check_environ()
350
-
351
- # Where to look for the system-wide Distutils config file
352
- sys_dir = os.path.dirname(sys.modules['distutils'].__file__)
353
-
354
- # Look for the system config file
355
- sys_file = os.path.join(sys_dir, "distutils.cfg")
356
- if os.path.isfile(sys_file):
357
- files.append(sys_file)
358
-
359
- # What to call the per-user config file
360
- if os.name == 'posix':
361
- user_filename = ".pydistutils.cfg"
362
- else:
363
- user_filename = "pydistutils.cfg"
364
-
365
- # And look for the user config file
366
- if self.want_user_cfg:
367
- user_file = os.path.join(os.path.expanduser('~'), user_filename)
368
- if os.path.isfile(user_file):
369
- files.append(user_file)
370
-
371
- # All platforms support local setup.cfg
372
- local_file = "setup.cfg"
373
- if os.path.isfile(local_file):
374
- files.append(local_file)
375
-
376
- if DEBUG:
377
- self.announce("using config files: %s" % ', '.join(files))
378
-
379
- return files
380
-
381
- def parse_config_files(self, filenames=None):
382
- from configparser import ConfigParser
383
-
384
- # Ignore install directory options if we have a venv
385
- if sys.prefix != sys.base_prefix:
386
- ignore_options = [
387
- 'install-base', 'install-platbase', 'install-lib',
388
- 'install-platlib', 'install-purelib', 'install-headers',
389
- 'install-scripts', 'install-data', 'prefix', 'exec-prefix',
390
- 'home', 'user', 'root']
391
- else:
392
- ignore_options = []
393
-
394
- ignore_options = frozenset(ignore_options)
395
-
396
- if filenames is None:
397
- filenames = self.find_config_files()
398
-
399
- if DEBUG:
400
- self.announce("Distribution.parse_config_files():")
401
-
402
- parser = ConfigParser()
403
- for filename in filenames:
404
- if DEBUG:
405
- self.announce(" reading %s" % filename)
406
- parser.read(filename)
407
- for section in parser.sections():
408
- options = parser.options(section)
409
- opt_dict = self.get_option_dict(section)
410
-
411
- for opt in options:
412
- if opt != '__name__' and opt not in ignore_options:
413
- val = parser.get(section,opt)
414
- opt = opt.replace('-', '_')
415
- opt_dict[opt] = (filename, val)
416
-
417
- # Make the ConfigParser forget everything (so we retain
418
- # the original filenames that options come from)
419
- parser.__init__()
420
-
421
- # If there was a "global" section in the config file, use it
422
- # to set Distribution options.
423
-
424
- if 'global' in self.command_options:
425
- for (opt, (src, val)) in self.command_options['global'].items():
426
- alias = self.negative_opt.get(opt)
427
- try:
428
- if alias:
429
- setattr(self, alias, not strtobool(val))
430
- elif opt in ('verbose', 'dry_run'): # ugh!
431
- setattr(self, opt, strtobool(val))
432
- else:
433
- setattr(self, opt, val)
434
- except ValueError as msg:
435
- raise DistutilsOptionError(msg)
436
-
437
- # -- Command-line parsing methods ----------------------------------
438
-
439
- def parse_command_line(self):
440
- """Parse the setup script's command line, taken from the
441
- 'script_args' instance attribute (which defaults to 'sys.argv[1:]'
442
- -- see 'setup()' in core.py). This list is first processed for
443
- "global options" -- options that set attributes of the Distribution
444
- instance. Then, it is alternately scanned for Distutils commands
445
- and options for that command. Each new command terminates the
446
- options for the previous command. The allowed options for a
447
- command are determined by the 'user_options' attribute of the
448
- command class -- thus, we have to be able to load command classes
449
- in order to parse the command line. Any error in that 'options'
450
- attribute raises DistutilsGetoptError; any error on the
451
- command-line raises DistutilsArgError. If no Distutils commands
452
- were found on the command line, raises DistutilsArgError. Return
453
- true if command-line was successfully parsed and we should carry
454
- on with executing commands; false if no errors but we shouldn't
455
- execute commands (currently, this only happens if user asks for
456
- help).
457
- """
458
- #
459
- # We now have enough information to show the Macintosh dialog
460
- # that allows the user to interactively specify the "command line".
461
- #
462
- toplevel_options = self._get_toplevel_options()
463
-
464
- # We have to parse the command line a bit at a time -- global
465
- # options, then the first command, then its options, and so on --
466
- # because each command will be handled by a different class, and
467
- # the options that are valid for a particular class aren't known
468
- # until we have loaded the command class, which doesn't happen
469
- # until we know what the command is.
470
-
471
- self.commands = []
472
- parser = FancyGetopt(toplevel_options + self.display_options)
473
- parser.set_negative_aliases(self.negative_opt)
474
- parser.set_aliases({'licence': 'license'})
475
- args = parser.getopt(args=self.script_args, object=self)
476
- option_order = parser.get_option_order()
477
- log.set_verbosity(self.verbose)
478
-
479
- # for display options we return immediately
480
- if self.handle_display_options(option_order):
481
- return
482
- while args:
483
- args = self._parse_command_opts(parser, args)
484
- if args is None: # user asked for help (and got it)
485
- return
486
-
487
- # Handle the cases of --help as a "global" option, ie.
488
- # "setup.py --help" and "setup.py --help command ...". For the
489
- # former, we show global options (--verbose, --dry-run, etc.)
490
- # and display-only options (--name, --version, etc.); for the
491
- # latter, we omit the display-only options and show help for
492
- # each command listed on the command line.
493
- if self.help:
494
- self._show_help(parser,
495
- display_options=len(self.commands) == 0,
496
- commands=self.commands)
497
- return
498
-
499
- # Oops, no commands found -- an end-user error
500
- if not self.commands:
501
- raise DistutilsArgError("no commands supplied")
502
-
503
- # All is well: return true
504
- return True
505
-
506
- def _get_toplevel_options(self):
507
- """Return the non-display options recognized at the top level.
508
-
509
- This includes options that are recognized *only* at the top
510
- level as well as options recognized for commands.
511
- """
512
- return self.global_options + [
513
- ("command-packages=", None,
514
- "list of packages that provide distutils commands"),
515
- ]
516
-
517
- def _parse_command_opts(self, parser, args):
518
- """Parse the command-line options for a single command.
519
- 'parser' must be a FancyGetopt instance; 'args' must be the list
520
- of arguments, starting with the current command (whose options
521
- we are about to parse). Returns a new version of 'args' with
522
- the next command at the front of the list; will be the empty
523
- list if there are no more commands on the command line. Returns
524
- None if the user asked for help on this command.
525
- """
526
- # late import because of mutual dependence between these modules
527
- from distutils.cmd import Command
528
-
529
- # Pull the current command from the head of the command line
530
- command = args[0]
531
- if not command_re.match(command):
532
- raise SystemExit("invalid command name '%s'" % command)
533
- self.commands.append(command)
534
-
535
- # Dig up the command class that implements this command, so we
536
- # 1) know that it's a valid command, and 2) know which options
537
- # it takes.
538
- try:
539
- cmd_class = self.get_command_class(command)
540
- except DistutilsModuleError as msg:
541
- raise DistutilsArgError(msg)
542
-
543
- # Require that the command class be derived from Command -- want
544
- # to be sure that the basic "command" interface is implemented.
545
- if not issubclass(cmd_class, Command):
546
- raise DistutilsClassError(
547
- "command class %s must subclass Command" % cmd_class)
548
-
549
- # Also make sure that the command object provides a list of its
550
- # known options.
551
- if not (hasattr(cmd_class, 'user_options') and
552
- isinstance(cmd_class.user_options, list)):
553
- msg = ("command class %s must provide "
554
- "'user_options' attribute (a list of tuples)")
555
- raise DistutilsClassError(msg % cmd_class)
556
-
557
- # If the command class has a list of negative alias options,
558
- # merge it in with the global negative aliases.
559
- negative_opt = self.negative_opt
560
- if hasattr(cmd_class, 'negative_opt'):
561
- negative_opt = negative_opt.copy()
562
- negative_opt.update(cmd_class.negative_opt)
563
-
564
- # Check for help_options in command class. They have a different
565
- # format (tuple of four) so we need to preprocess them here.
566
- if (hasattr(cmd_class, 'help_options') and
567
- isinstance(cmd_class.help_options, list)):
568
- help_options = fix_help_options(cmd_class.help_options)
569
- else:
570
- help_options = []
571
-
572
- # All commands support the global options too, just by adding
573
- # in 'global_options'.
574
- parser.set_option_table(self.global_options +
575
- cmd_class.user_options +
576
- help_options)
577
- parser.set_negative_aliases(negative_opt)
578
- (args, opts) = parser.getopt(args[1:])
579
- if hasattr(opts, 'help') and opts.help:
580
- self._show_help(parser, display_options=0, commands=[cmd_class])
581
- return
582
-
583
- if (hasattr(cmd_class, 'help_options') and
584
- isinstance(cmd_class.help_options, list)):
585
- help_option_found=0
586
- for (help_option, short, desc, func) in cmd_class.help_options:
587
- if hasattr(opts, parser.get_attr_name(help_option)):
588
- help_option_found=1
589
- if callable(func):
590
- func()
591
- else:
592
- raise DistutilsClassError(
593
- "invalid help function %r for help option '%s': "
594
- "must be a callable object (function, etc.)"
595
- % (func, help_option))
596
-
597
- if help_option_found:
598
- return
599
-
600
- # Put the options from the command-line into their official
601
- # holding pen, the 'command_options' dictionary.
602
- opt_dict = self.get_option_dict(command)
603
- for (name, value) in vars(opts).items():
604
- opt_dict[name] = ("command line", value)
605
-
606
- return args
607
-
608
- def finalize_options(self):
609
- """Set final values for all the options on the Distribution
610
- instance, analogous to the .finalize_options() method of Command
611
- objects.
612
- """
613
- for attr in ('keywords', 'platforms'):
614
- value = getattr(self.metadata, attr)
615
- if value is None:
616
- continue
617
- if isinstance(value, str):
618
- value = [elm.strip() for elm in value.split(',')]
619
- setattr(self.metadata, attr, value)
620
-
621
- def _show_help(self, parser, global_options=1, display_options=1,
622
- commands=[]):
623
- """Show help for the setup script command-line in the form of
624
- several lists of command-line options. 'parser' should be a
625
- FancyGetopt instance; do not expect it to be returned in the
626
- same state, as its option table will be reset to make it
627
- generate the correct help text.
628
-
629
- If 'global_options' is true, lists the global options:
630
- --verbose, --dry-run, etc. If 'display_options' is true, lists
631
- the "display-only" options: --name, --version, etc. Finally,
632
- lists per-command help for every command name or command class
633
- in 'commands'.
634
- """
635
- # late import because of mutual dependence between these modules
636
- from distutils.core import gen_usage
637
- from distutils.cmd import Command
638
-
639
- if global_options:
640
- if display_options:
641
- options = self._get_toplevel_options()
642
- else:
643
- options = self.global_options
644
- parser.set_option_table(options)
645
- parser.print_help(self.common_usage + "\nGlobal options:")
646
- print('')
647
-
648
- if display_options:
649
- parser.set_option_table(self.display_options)
650
- parser.print_help(
651
- "Information display options (just display " +
652
- "information, ignore any commands)")
653
- print('')
654
-
655
- for command in self.commands:
656
- if isinstance(command, type) and issubclass(command, Command):
657
- klass = command
658
- else:
659
- klass = self.get_command_class(command)
660
- if (hasattr(klass, 'help_options') and
661
- isinstance(klass.help_options, list)):
662
- parser.set_option_table(klass.user_options +
663
- fix_help_options(klass.help_options))
664
- else:
665
- parser.set_option_table(klass.user_options)
666
- parser.print_help("Options for '%s' command:" % klass.__name__)
667
- print('')
668
-
669
- print(gen_usage(self.script_name))
670
-
671
- def handle_display_options(self, option_order):
672
- """If there were any non-global "display-only" options
673
- (--help-commands or the metadata display options) on the command
674
- line, display the requested info and return true; else return
675
- false.
676
- """
677
- from distutils.core import gen_usage
678
-
679
- # User just wants a list of commands -- we'll print it out and stop
680
- # processing now (ie. if they ran "setup --help-commands foo bar",
681
- # we ignore "foo bar").
682
- if self.help_commands:
683
- self.print_commands()
684
- print('')
685
- print(gen_usage(self.script_name))
686
- return 1
687
-
688
- # If user supplied any of the "display metadata" options, then
689
- # display that metadata in the order in which the user supplied the
690
- # metadata options.
691
- any_display_options = 0
692
- is_display_option = {}
693
- for option in self.display_options:
694
- is_display_option[option[0]] = 1
695
-
696
- for (opt, val) in option_order:
697
- if val and is_display_option.get(opt):
698
- opt = translate_longopt(opt)
699
- value = getattr(self.metadata, "get_"+opt)()
700
- if opt in ['keywords', 'platforms']:
701
- print(','.join(value))
702
- elif opt in ('classifiers', 'provides', 'requires',
703
- 'obsoletes'):
704
- print('\n'.join(value))
705
- else:
706
- print(value)
707
- any_display_options = 1
708
-
709
- return any_display_options
710
-
711
- def print_command_list(self, commands, header, max_length):
712
- """Print a subset of the list of all commands -- used by
713
- 'print_commands()'.
714
- """
715
- print(header + ":")
716
-
717
- for cmd in commands:
718
- klass = self.cmdclass.get(cmd)
719
- if not klass:
720
- klass = self.get_command_class(cmd)
721
- try:
722
- description = klass.description
723
- except AttributeError:
724
- description = "(no description available)"
725
-
726
- print(" %-*s %s" % (max_length, cmd, description))
727
-
728
- def print_commands(self):
729
- """Print out a help message listing all available commands with a
730
- description of each. The list is divided into "standard commands"
731
- (listed in distutils.command.__all__) and "extra commands"
732
- (mentioned in self.cmdclass, but not a standard command). The
733
- descriptions come from the command class attribute
734
- 'description'.
735
- """
736
- import distutils.command
737
- std_commands = distutils.command.__all__
738
- is_std = {}
739
- for cmd in std_commands:
740
- is_std[cmd] = 1
741
-
742
- extra_commands = []
743
- for cmd in self.cmdclass.keys():
744
- if not is_std.get(cmd):
745
- extra_commands.append(cmd)
746
-
747
- max_length = 0
748
- for cmd in (std_commands + extra_commands):
749
- if len(cmd) > max_length:
750
- max_length = len(cmd)
751
-
752
- self.print_command_list(std_commands,
753
- "Standard commands",
754
- max_length)
755
- if extra_commands:
756
- print()
757
- self.print_command_list(extra_commands,
758
- "Extra commands",
759
- max_length)
760
-
761
- def get_command_list(self):
762
- """Get a list of (command, description) tuples.
763
- The list is divided into "standard commands" (listed in
764
- distutils.command.__all__) and "extra commands" (mentioned in
765
- self.cmdclass, but not a standard command). The descriptions come
766
- from the command class attribute 'description'.
767
- """
768
- # Currently this is only used on Mac OS, for the Mac-only GUI
769
- # Distutils interface (by Jack Jansen)
770
- import distutils.command
771
- std_commands = distutils.command.__all__
772
- is_std = {}
773
- for cmd in std_commands:
774
- is_std[cmd] = 1
775
-
776
- extra_commands = []
777
- for cmd in self.cmdclass.keys():
778
- if not is_std.get(cmd):
779
- extra_commands.append(cmd)
780
-
781
- rv = []
782
- for cmd in (std_commands + extra_commands):
783
- klass = self.cmdclass.get(cmd)
784
- if not klass:
785
- klass = self.get_command_class(cmd)
786
- try:
787
- description = klass.description
788
- except AttributeError:
789
- description = "(no description available)"
790
- rv.append((cmd, description))
791
- return rv
792
-
793
- # -- Command class/object methods ----------------------------------
794
-
795
- def get_command_packages(self):
796
- """Return a list of packages from which commands are loaded."""
797
- pkgs = self.command_packages
798
- if not isinstance(pkgs, list):
799
- if pkgs is None:
800
- pkgs = ''
801
- pkgs = [pkg.strip() for pkg in pkgs.split(',') if pkg != '']
802
- if "distutils.command" not in pkgs:
803
- pkgs.insert(0, "distutils.command")
804
- self.command_packages = pkgs
805
- return pkgs
806
-
807
- def get_command_class(self, command):
808
- """Return the class that implements the Distutils command named by
809
- 'command'. First we check the 'cmdclass' dictionary; if the
810
- command is mentioned there, we fetch the class object from the
811
- dictionary and return it. Otherwise we load the command module
812
- ("distutils.command." + command) and fetch the command class from
813
- the module. The loaded class is also stored in 'cmdclass'
814
- to speed future calls to 'get_command_class()'.
815
-
816
- Raises DistutilsModuleError if the expected module could not be
817
- found, or if that module does not define the expected class.
818
- """
819
- klass = self.cmdclass.get(command)
820
- if klass:
821
- return klass
822
-
823
- for pkgname in self.get_command_packages():
824
- module_name = "%s.%s" % (pkgname, command)
825
- klass_name = command
826
-
827
- try:
828
- __import__(module_name)
829
- module = sys.modules[module_name]
830
- except ImportError:
831
- continue
832
-
833
- try:
834
- klass = getattr(module, klass_name)
835
- except AttributeError:
836
- raise DistutilsModuleError(
837
- "invalid command '%s' (no class '%s' in module '%s')"
838
- % (command, klass_name, module_name))
839
-
840
- self.cmdclass[command] = klass
841
- return klass
842
-
843
- raise DistutilsModuleError("invalid command '%s'" % command)
844
-
845
- def get_command_obj(self, command, create=1):
846
- """Return the command object for 'command'. Normally this object
847
- is cached on a previous call to 'get_command_obj()'; if no command
848
- object for 'command' is in the cache, then we either create and
849
- return it (if 'create' is true) or return None.
850
- """
851
- cmd_obj = self.command_obj.get(command)
852
- if not cmd_obj and create:
853
- if DEBUG:
854
- self.announce("Distribution.get_command_obj(): "
855
- "creating '%s' command object" % command)
856
-
857
- klass = self.get_command_class(command)
858
- cmd_obj = self.command_obj[command] = klass(self)
859
- self.have_run[command] = 0
860
-
861
- # Set any options that were supplied in config files
862
- # or on the command line. (NB. support for error
863
- # reporting is lame here: any errors aren't reported
864
- # until 'finalize_options()' is called, which means
865
- # we won't report the source of the error.)
866
- options = self.command_options.get(command)
867
- if options:
868
- self._set_command_options(cmd_obj, options)
869
-
870
- return cmd_obj
871
-
872
- def _set_command_options(self, command_obj, option_dict=None):
873
- """Set the options for 'command_obj' from 'option_dict'. Basically
874
- this means copying elements of a dictionary ('option_dict') to
875
- attributes of an instance ('command').
876
-
877
- 'command_obj' must be a Command instance. If 'option_dict' is not
878
- supplied, uses the standard option dictionary for this command
879
- (from 'self.command_options').
880
- """
881
- command_name = command_obj.get_command_name()
882
- if option_dict is None:
883
- option_dict = self.get_option_dict(command_name)
884
-
885
- if DEBUG:
886
- self.announce(" setting options for '%s' command:" % command_name)
887
- for (option, (source, value)) in option_dict.items():
888
- if DEBUG:
889
- self.announce(" %s = %s (from %s)" % (option, value,
890
- source))
891
- try:
892
- bool_opts = [translate_longopt(o)
893
- for o in command_obj.boolean_options]
894
- except AttributeError:
895
- bool_opts = []
896
- try:
897
- neg_opt = command_obj.negative_opt
898
- except AttributeError:
899
- neg_opt = {}
900
-
901
- try:
902
- is_string = isinstance(value, str)
903
- if option in neg_opt and is_string:
904
- setattr(command_obj, neg_opt[option], not strtobool(value))
905
- elif option in bool_opts and is_string:
906
- setattr(command_obj, option, strtobool(value))
907
- elif hasattr(command_obj, option):
908
- setattr(command_obj, option, value)
909
- else:
910
- raise DistutilsOptionError(
911
- "error in %s: command '%s' has no such option '%s'"
912
- % (source, command_name, option))
913
- except ValueError as msg:
914
- raise DistutilsOptionError(msg)
915
-
916
- def reinitialize_command(self, command, reinit_subcommands=0):
917
- """Reinitializes a command to the state it was in when first
918
- returned by 'get_command_obj()': ie., initialized but not yet
919
- finalized. This provides the opportunity to sneak option
920
- values in programmatically, overriding or supplementing
921
- user-supplied values from the config files and command line.
922
- You'll have to re-finalize the command object (by calling
923
- 'finalize_options()' or 'ensure_finalized()') before using it for
924
- real.
925
-
926
- 'command' should be a command name (string) or command object. If
927
- 'reinit_subcommands' is true, also reinitializes the command's
928
- sub-commands, as declared by the 'sub_commands' class attribute (if
929
- it has one). See the "install" command for an example. Only
930
- reinitializes the sub-commands that actually matter, ie. those
931
- whose test predicates return true.
932
-
933
- Returns the reinitialized command object.
934
- """
935
- from distutils.cmd import Command
936
- if not isinstance(command, Command):
937
- command_name = command
938
- command = self.get_command_obj(command_name)
939
- else:
940
- command_name = command.get_command_name()
941
-
942
- if not command.finalized:
943
- return command
944
- command.initialize_options()
945
- command.finalized = 0
946
- self.have_run[command_name] = 0
947
- self._set_command_options(command)
948
-
949
- if reinit_subcommands:
950
- for sub in command.get_sub_commands():
951
- self.reinitialize_command(sub, reinit_subcommands)
952
-
953
- return command
954
-
955
- # -- Methods that operate on the Distribution ----------------------
956
-
957
- def announce(self, msg, level=log.INFO):
958
- log.log(level, msg)
959
-
960
- def run_commands(self):
961
- """Run each command that was seen on the setup script command line.
962
- Uses the list of commands found and cache of command objects
963
- created by 'get_command_obj()'.
964
- """
965
- for cmd in self.commands:
966
- self.run_command(cmd)
967
-
968
- # -- Methods that operate on its Commands --------------------------
969
-
970
- def run_command(self, command):
971
- """Do whatever it takes to run a command (including nothing at all,
972
- if the command has already been run). Specifically: if we have
973
- already created and run the command named by 'command', return
974
- silently without doing anything. If the command named by 'command'
975
- doesn't even have a command object yet, create one. Then invoke
976
- 'run()' on that command object (or an existing one).
977
- """
978
- # Already been here, done that? then return silently.
979
- if self.have_run.get(command):
980
- return
981
-
982
- log.info("running %s", command)
983
- cmd_obj = self.get_command_obj(command)
984
- cmd_obj.ensure_finalized()
985
- cmd_obj.run()
986
- self.have_run[command] = 1
987
-
988
- # -- Distribution query methods ------------------------------------
989
-
990
- def has_pure_modules(self):
991
- return len(self.packages or self.py_modules or []) > 0
992
-
993
- def has_ext_modules(self):
994
- return self.ext_modules and len(self.ext_modules) > 0
995
-
996
- def has_c_libraries(self):
997
- return self.libraries and len(self.libraries) > 0
998
-
999
- def has_modules(self):
1000
- return self.has_pure_modules() or self.has_ext_modules()
1001
-
1002
- def has_headers(self):
1003
- return self.headers and len(self.headers) > 0
1004
-
1005
- def has_scripts(self):
1006
- return self.scripts and len(self.scripts) > 0
1007
-
1008
- def has_data_files(self):
1009
- return self.data_files and len(self.data_files) > 0
1010
-
1011
- def is_pure(self):
1012
- return (self.has_pure_modules() and
1013
- not self.has_ext_modules() and
1014
- not self.has_c_libraries())
1015
-
1016
- # -- Metadata query methods ----------------------------------------
1017
-
1018
- # If you're looking for 'get_name()', 'get_version()', and so forth,
1019
- # they are defined in a sneaky way: the constructor binds self.get_XXX
1020
- # to self.metadata.get_XXX. The actual code is in the
1021
- # DistributionMetadata class, below.
1022
-
1023
- class DistributionMetadata:
1024
- """Dummy class to hold the distribution meta-data: name, version,
1025
- author, and so forth.
1026
- """
1027
-
1028
- _METHOD_BASENAMES = ("name", "version", "author", "author_email",
1029
- "maintainer", "maintainer_email", "url",
1030
- "license", "description", "long_description",
1031
- "keywords", "platforms", "fullname", "contact",
1032
- "contact_email", "classifiers", "download_url",
1033
- # PEP 314
1034
- "provides", "requires", "obsoletes",
1035
- )
1036
-
1037
- def __init__(self, path=None):
1038
- if path is not None:
1039
- self.read_pkg_file(open(path))
1040
- else:
1041
- self.name = None
1042
- self.version = None
1043
- self.author = None
1044
- self.author_email = None
1045
- self.maintainer = None
1046
- self.maintainer_email = None
1047
- self.url = None
1048
- self.license = None
1049
- self.description = None
1050
- self.long_description = None
1051
- self.keywords = None
1052
- self.platforms = None
1053
- self.classifiers = None
1054
- self.download_url = None
1055
- # PEP 314
1056
- self.provides = None
1057
- self.requires = None
1058
- self.obsoletes = None
1059
-
1060
- def read_pkg_file(self, file):
1061
- """Reads the metadata values from a file object."""
1062
- msg = message_from_file(file)
1063
-
1064
- def _read_field(name):
1065
- value = msg[name]
1066
- if value == 'UNKNOWN':
1067
- return None
1068
- return value
1069
-
1070
- def _read_list(name):
1071
- values = msg.get_all(name, None)
1072
- if values == []:
1073
- return None
1074
- return values
1075
-
1076
- metadata_version = msg['metadata-version']
1077
- self.name = _read_field('name')
1078
- self.version = _read_field('version')
1079
- self.description = _read_field('summary')
1080
- # we are filling author only.
1081
- self.author = _read_field('author')
1082
- self.maintainer = None
1083
- self.author_email = _read_field('author-email')
1084
- self.maintainer_email = None
1085
- self.url = _read_field('home-page')
1086
- self.license = _read_field('license')
1087
-
1088
- if 'download-url' in msg:
1089
- self.download_url = _read_field('download-url')
1090
- else:
1091
- self.download_url = None
1092
-
1093
- self.long_description = _read_field('description')
1094
- self.description = _read_field('summary')
1095
-
1096
- if 'keywords' in msg:
1097
- self.keywords = _read_field('keywords').split(',')
1098
-
1099
- self.platforms = _read_list('platform')
1100
- self.classifiers = _read_list('classifier')
1101
-
1102
- # PEP 314 - these fields only exist in 1.1
1103
- if metadata_version == '1.1':
1104
- self.requires = _read_list('requires')
1105
- self.provides = _read_list('provides')
1106
- self.obsoletes = _read_list('obsoletes')
1107
- else:
1108
- self.requires = None
1109
- self.provides = None
1110
- self.obsoletes = None
1111
-
1112
- def write_pkg_info(self, base_dir):
1113
- """Write the PKG-INFO file into the release tree.
1114
- """
1115
- with open(os.path.join(base_dir, 'PKG-INFO'), 'w',
1116
- encoding='UTF-8') as pkg_info:
1117
- self.write_pkg_file(pkg_info)
1118
-
1119
- def write_pkg_file(self, file):
1120
- """Write the PKG-INFO format data to a file object.
1121
- """
1122
- version = '1.0'
1123
- if (self.provides or self.requires or self.obsoletes or
1124
- self.classifiers or self.download_url):
1125
- version = '1.1'
1126
-
1127
- file.write('Metadata-Version: %s\n' % version)
1128
- file.write('Name: %s\n' % self.get_name())
1129
- file.write('Version: %s\n' % self.get_version())
1130
- file.write('Summary: %s\n' % self.get_description())
1131
- file.write('Home-page: %s\n' % self.get_url())
1132
- file.write('Author: %s\n' % self.get_contact())
1133
- file.write('Author-email: %s\n' % self.get_contact_email())
1134
- file.write('License: %s\n' % self.get_license())
1135
- if self.download_url:
1136
- file.write('Download-URL: %s\n' % self.download_url)
1137
-
1138
- long_desc = rfc822_escape(self.get_long_description())
1139
- file.write('Description: %s\n' % long_desc)
1140
-
1141
- keywords = ','.join(self.get_keywords())
1142
- if keywords:
1143
- file.write('Keywords: %s\n' % keywords)
1144
-
1145
- self._write_list(file, 'Platform', self.get_platforms())
1146
- self._write_list(file, 'Classifier', self.get_classifiers())
1147
-
1148
- # PEP 314
1149
- self._write_list(file, 'Requires', self.get_requires())
1150
- self._write_list(file, 'Provides', self.get_provides())
1151
- self._write_list(file, 'Obsoletes', self.get_obsoletes())
1152
-
1153
- def _write_list(self, file, name, values):
1154
- for value in values:
1155
- file.write('%s: %s\n' % (name, value))
1156
-
1157
- # -- Metadata query methods ----------------------------------------
1158
-
1159
- def get_name(self):
1160
- return self.name or "UNKNOWN"
1161
-
1162
- def get_version(self):
1163
- return self.version or "0.0.0"
1164
-
1165
- def get_fullname(self):
1166
- return "%s-%s" % (self.get_name(), self.get_version())
1167
-
1168
- def get_author(self):
1169
- return self.author or "UNKNOWN"
1170
-
1171
- def get_author_email(self):
1172
- return self.author_email or "UNKNOWN"
1173
-
1174
- def get_maintainer(self):
1175
- return self.maintainer or "UNKNOWN"
1176
-
1177
- def get_maintainer_email(self):
1178
- return self.maintainer_email or "UNKNOWN"
1179
-
1180
- def get_contact(self):
1181
- return self.maintainer or self.author or "UNKNOWN"
1182
-
1183
- def get_contact_email(self):
1184
- return self.maintainer_email or self.author_email or "UNKNOWN"
1185
-
1186
- def get_url(self):
1187
- return self.url or "UNKNOWN"
1188
-
1189
- def get_license(self):
1190
- return self.license or "UNKNOWN"
1191
- get_licence = get_license
1192
-
1193
- def get_description(self):
1194
- return self.description or "UNKNOWN"
1195
-
1196
- def get_long_description(self):
1197
- return self.long_description or "UNKNOWN"
1198
-
1199
- def get_keywords(self):
1200
- return self.keywords or []
1201
-
1202
- def set_keywords(self, value):
1203
- self.keywords = _ensure_list(value, 'keywords')
1204
-
1205
- def get_platforms(self):
1206
- return self.platforms or ["UNKNOWN"]
1207
-
1208
- def set_platforms(self, value):
1209
- self.platforms = _ensure_list(value, 'platforms')
1210
-
1211
- def get_classifiers(self):
1212
- return self.classifiers or []
1213
-
1214
- def set_classifiers(self, value):
1215
- self.classifiers = _ensure_list(value, 'classifiers')
1216
-
1217
- def get_download_url(self):
1218
- return self.download_url or "UNKNOWN"
1219
-
1220
- # PEP 314
1221
- def get_requires(self):
1222
- return self.requires or []
1223
-
1224
- def set_requires(self, value):
1225
- import distutils.versionpredicate
1226
- for v in value:
1227
- distutils.versionpredicate.VersionPredicate(v)
1228
- self.requires = list(value)
1229
-
1230
- def get_provides(self):
1231
- return self.provides or []
1232
-
1233
- def set_provides(self, value):
1234
- value = [v.strip() for v in value]
1235
- for v in value:
1236
- import distutils.versionpredicate
1237
- distutils.versionpredicate.split_provision(v)
1238
- self.provides = value
1239
-
1240
- def get_obsoletes(self):
1241
- return self.obsoletes or []
1242
-
1243
- def set_obsoletes(self, value):
1244
- import distutils.versionpredicate
1245
- for v in value:
1246
- distutils.versionpredicate.VersionPredicate(v)
1247
- self.obsoletes = list(value)
1248
-
1249
- def fix_help_options(options):
1250
- """Convert a 4-tuple 'help_options' list as found in various command
1251
- classes to the 3-tuple form required by FancyGetopt.
1252
- """
1253
- new_options = []
1254
- for help_tuple in options:
1255
- new_options.append(help_tuple[0:3])
1256
- return new_options