py2docfx 0.1.13.dev2016723__py3-none-any.whl → 0.1.13.dev2021865__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 (346) hide show
  1. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/_modified.py +26 -4
  2. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/_msvccompiler.py +2 -603
  3. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/archive_util.py +48 -18
  4. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/ccompiler.py +17 -1257
  5. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/cmd.py +133 -41
  6. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/bdist.py +19 -8
  7. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/bdist_dumb.py +2 -1
  8. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/bdist_rpm.py +6 -5
  9. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build.py +8 -4
  10. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_clib.py +8 -7
  11. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_ext.py +32 -13
  12. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_py.py +10 -9
  13. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +3 -14
  14. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/check.py +1 -1
  15. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/clean.py +2 -1
  16. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/config.py +1 -8
  17. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install.py +22 -19
  18. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install_data.py +4 -3
  19. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install_headers.py +1 -1
  20. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install_lib.py +11 -7
  21. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/install_scripts.py +4 -3
  22. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/command/sdist.py +22 -16
  23. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compat/__init__.py +6 -1
  24. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/base.py +1391 -0
  25. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/cygwin.py +340 -0
  26. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/errors.py +24 -0
  27. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/msvc.py +614 -0
  28. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/{tests/test_ccompiler.py → compilers/C/tests/test_base.py} +9 -19
  29. py2docfx/venv/{venv1/Lib/site-packages/setuptools/_distutils/tests/test_cygwinccompiler.py → basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_cygwin.py} +7 -12
  30. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/{tests/test_mingwccompiler.py → compilers/C/tests/test_mingw.py} +12 -20
  31. py2docfx/venv/{venv1/Lib/site-packages/setuptools/_distutils/tests/test_msvccompiler.py → basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_msvc.py} +11 -12
  32. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/{tests/test_unixccompiler.py → compilers/C/tests/test_unix.py} +5 -5
  33. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +409 -0
  34. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/compilers/C/zos.py +230 -0
  35. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/cygwinccompiler.py +20 -328
  36. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/dist.py +148 -80
  37. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/errors.py +11 -27
  38. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/extension.py +19 -16
  39. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/filelist.py +80 -15
  40. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/spawn.py +22 -5
  41. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/sysconfig.py +32 -7
  42. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/tests/test_build_ext.py +13 -0
  43. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/tests/test_sdist.py +1 -1
  44. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/unixccompiler.py +2 -401
  45. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/util.py +38 -23
  46. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_distutils/zosccompiler.py +2 -228
  47. py2docfx/venv/basevenv/Lib/site-packages/setuptools/_static.py +1 -1
  48. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/editable_wheel.py +3 -3
  49. py2docfx/venv/basevenv/Lib/site-packages/setuptools/command/install.py +1 -1
  50. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/config/test_setupcfg.py +2 -0
  51. py2docfx/venv/basevenv/Lib/site-packages/setuptools/tests/test_build_py.py +1 -1
  52. py2docfx/venv/basevenv/Lib/site-packages/setuptools/unicode_utils.py +1 -1
  53. py2docfx/venv/venv1/Lib/site-packages/adodbapi/__init__.py +2 -1
  54. py2docfx/venv/venv1/Lib/site-packages/adodbapi/ado_consts.py +3 -1
  55. py2docfx/venv/venv1/Lib/site-packages/adodbapi/adodbapi.py +22 -26
  56. py2docfx/venv/venv1/Lib/site-packages/adodbapi/apibase.py +3 -4
  57. py2docfx/venv/venv1/Lib/site-packages/adodbapi/examples/db_print.py +1 -1
  58. py2docfx/venv/venv1/Lib/site-packages/adodbapi/examples/db_table_names.py +1 -1
  59. py2docfx/venv/venv1/Lib/site-packages/adodbapi/process_connect_string.py +7 -7
  60. py2docfx/venv/venv1/Lib/site-packages/adodbapi/setup.py +2 -2
  61. py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/adodbapitest.py +21 -73
  62. py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/adodbapitestconfig.py +1 -1
  63. py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/dbapi20.py +11 -17
  64. py2docfx/venv/venv1/Lib/site-packages/adodbapi/test/setuptestframework.py +2 -1
  65. py2docfx/venv/venv1/Lib/site-packages/isapi/install.py +8 -11
  66. py2docfx/venv/venv1/Lib/site-packages/isapi/samples/redirector.py +1 -1
  67. py2docfx/venv/venv1/Lib/site-packages/isapi/samples/redirector_asynch.py +1 -1
  68. py2docfx/venv/venv1/Lib/site-packages/isapi/samples/redirector_with_filter.py +2 -1
  69. py2docfx/venv/venv1/Lib/site-packages/isapi/simple.py +1 -0
  70. py2docfx/venv/venv1/Lib/site-packages/isapi/threaded_extension.py +1 -0
  71. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/basictimerapp.py +1 -1
  72. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/customprint.py +1 -3
  73. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/app/demoutils.py +1 -3
  74. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/cmdserver.py +2 -5
  75. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/guidemo.py +14 -41
  76. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/objdoc.py +1 -1
  77. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/demoutils.py +1 -3
  78. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/flash.py +1 -1
  79. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/ocxserialtest.py +1 -2
  80. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/ocxtest.py +1 -2
  81. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/webbrowser.py +3 -3
  82. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/openGLDemo.py +57 -12
  83. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/toolbar.py +0 -1
  84. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/configui.py +1 -1
  85. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/dbgcon.py +0 -1
  86. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/debugger.py +7 -8
  87. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/debugger/fail.py +1 -1
  88. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/ideoptions.py +7 -10
  89. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/list.py +11 -8
  90. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/dialogs/login.py +0 -1
  91. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/docking/DockingBar.py +0 -1
  92. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/app.py +19 -22
  93. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/dbgcommands.py +2 -3
  94. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/ModuleBrowser.py +1 -1
  95. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/__init__.py +3 -1
  96. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/document.py +0 -1
  97. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/editor.py +6 -6
  98. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/editor/vss.py +2 -2
  99. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/help.py +2 -1
  100. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/interact.py +1 -1
  101. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/intpyapp.py +5 -7
  102. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/intpydde.py +7 -2
  103. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/scriptutils.py +4 -6
  104. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/sgrepmdi.py +13 -22
  105. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/startup.py +1 -1
  106. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/stdin.py +1 -0
  107. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/toolmenu.py +0 -2
  108. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/AutoIndent.py +3 -3
  109. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/idle/CallTips.py +1 -3
  110. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/activex.py +1 -2
  111. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/mfc/dialog.py +7 -10
  112. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/IDLEenvironment.py +1 -5
  113. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/bindings.py +4 -2
  114. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/config.py +3 -5
  115. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/configui.py +2 -3
  116. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/document.py +1 -1
  117. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/formatter.py +3 -3
  118. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/keycodes.py +2 -2
  119. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/scintillacon.py +1178 -78
  120. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/scintilla/view.py +17 -21
  121. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/browser.py +6 -18
  122. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/tools/hierlist.py +2 -2
  123. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/_modified.py +26 -4
  124. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/_msvccompiler.py +2 -603
  125. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/archive_util.py +48 -18
  126. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/ccompiler.py +17 -1257
  127. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/cmd.py +133 -41
  128. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/bdist.py +19 -8
  129. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/bdist_dumb.py +2 -1
  130. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/bdist_rpm.py +6 -5
  131. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build.py +8 -4
  132. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_clib.py +8 -7
  133. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_ext.py +32 -13
  134. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_py.py +10 -9
  135. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/build_scripts.py +3 -14
  136. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/check.py +1 -1
  137. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/clean.py +2 -1
  138. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/config.py +1 -8
  139. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install.py +22 -19
  140. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install_data.py +4 -3
  141. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install_headers.py +1 -1
  142. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install_lib.py +11 -7
  143. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/install_scripts.py +4 -3
  144. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/command/sdist.py +22 -16
  145. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compat/__init__.py +6 -1
  146. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/base.py +1391 -0
  147. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/cygwin.py +340 -0
  148. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/errors.py +24 -0
  149. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/msvc.py +614 -0
  150. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/{tests/test_ccompiler.py → compilers/C/tests/test_base.py} +9 -19
  151. py2docfx/venv/{basevenv/Lib/site-packages/setuptools/_distutils/tests/test_cygwinccompiler.py → venv1/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_cygwin.py} +7 -12
  152. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/{tests/test_mingwccompiler.py → compilers/C/tests/test_mingw.py} +12 -20
  153. py2docfx/venv/{basevenv/Lib/site-packages/setuptools/_distutils/tests/test_msvccompiler.py → venv1/Lib/site-packages/setuptools/_distutils/compilers/C/tests/test_msvc.py} +11 -12
  154. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/{tests/test_unixccompiler.py → compilers/C/tests/test_unix.py} +5 -5
  155. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/unix.py +409 -0
  156. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/compilers/C/zos.py +230 -0
  157. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/cygwinccompiler.py +20 -328
  158. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/dist.py +148 -80
  159. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/errors.py +11 -27
  160. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/extension.py +19 -16
  161. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/filelist.py +80 -15
  162. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/spawn.py +22 -5
  163. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/sysconfig.py +32 -7
  164. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/tests/test_build_ext.py +13 -0
  165. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/tests/test_sdist.py +1 -1
  166. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/unixccompiler.py +2 -401
  167. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/util.py +38 -23
  168. py2docfx/venv/venv1/Lib/site-packages/setuptools/_distutils/zosccompiler.py +2 -228
  169. py2docfx/venv/venv1/Lib/site-packages/setuptools/_static.py +1 -1
  170. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/editable_wheel.py +3 -3
  171. py2docfx/venv/venv1/Lib/site-packages/setuptools/command/install.py +1 -1
  172. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/config/test_setupcfg.py +2 -0
  173. py2docfx/venv/venv1/Lib/site-packages/setuptools/tests/test_build_py.py +1 -1
  174. py2docfx/venv/venv1/Lib/site-packages/setuptools/unicode_utils.py +1 -1
  175. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/EvtFormatMessage.py +1 -1
  176. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/EvtSubscribe_push.py +8 -1
  177. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/GetSaveFileName.py +8 -8
  178. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/c_extension/setup.py +1 -1
  179. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/dde/ddeclient.py +1 -1
  180. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/dde/ddeserver.py +1 -1
  181. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/getfilever.py +1 -1
  182. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/pipes/runproc.py +2 -2
  183. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/rastest.py +4 -6
  184. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/GetTokenInformation.py +4 -4
  185. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/account_rights.py +0 -2
  186. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/explicit_entries.py +0 -1
  187. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/get_policy_info.py +0 -3
  188. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/list_rights.py +0 -2
  189. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/localized_names.py +7 -2
  190. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/query_information.py +1 -1
  191. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/set_file_audit.py +1 -2
  192. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/set_file_owner.py +0 -1
  193. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/set_policy_info.py +0 -3
  194. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/setkernelobjectsecurity.py +0 -1
  195. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/setsecurityinfo.py +0 -1
  196. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/setuserobjectsecurity.py +0 -1
  197. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sspi/fetch_url.py +3 -3
  198. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sspi/simple_auth.py +3 -3
  199. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/security/sspi/socket_server.py +1 -2
  200. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/service/pipeTestService.py +10 -9
  201. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/service/pipeTestServiceClient.py +6 -3
  202. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32clipboardDemo.py +17 -5
  203. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32comport_demo.py +32 -2
  204. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32console_demo.py +1 -4
  205. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_devicenotify.py +0 -1
  206. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_menu.py +60 -5
  207. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32gui_taskbar.py +1 -1
  208. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32netdemo.py +2 -5
  209. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32ts_logoff_disconnected.py +1 -1
  210. py2docfx/venv/venv1/Lib/site-packages/win32/Demos/win32wnet/testwnet.py +1 -1
  211. py2docfx/venv/venv1/Lib/site-packages/win32/lib/commctrl.py +1 -1
  212. py2docfx/venv/venv1/Lib/site-packages/win32/lib/netbios.py +8 -10
  213. py2docfx/venv/venv1/Lib/site-packages/win32/lib/pywin32_bootstrap.py +2 -10
  214. py2docfx/venv/venv1/Lib/site-packages/win32/lib/pywin32_testutil.py +2 -2
  215. py2docfx/venv/venv1/Lib/site-packages/win32/lib/pywintypes.py +1 -1
  216. py2docfx/venv/venv1/Lib/site-packages/win32/lib/regutil.py +1 -1
  217. py2docfx/venv/venv1/Lib/site-packages/win32/lib/sspi.py +3 -3
  218. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win2kras.py +14 -7
  219. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32con.py +16 -35
  220. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32cryptcon.py +1 -4
  221. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32evtlogutil.py +1 -2
  222. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32gui_struct.py +6 -6
  223. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32pdhquery.py +10 -11
  224. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32pdhutil.py +5 -5
  225. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32rcparser.py +1 -0
  226. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32serviceutil.py +4 -6
  227. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32timezone.py +304 -121
  228. py2docfx/venv/venv1/Lib/site-packages/win32/lib/win32verstamp.py +1 -1
  229. py2docfx/venv/venv1/Lib/site-packages/win32/lib/winerror.py +4926 -604
  230. py2docfx/venv/venv1/Lib/site-packages/win32/lib/winxptheme.py +1 -1
  231. py2docfx/venv/venv1/Lib/site-packages/win32/scripts/h2py.py +194 -0
  232. py2docfx/venv/venv1/Lib/site-packages/win32/scripts/pywin32_postinstall.py +733 -0
  233. py2docfx/venv/venv1/Lib/site-packages/win32/scripts/pywin32_testall.py +120 -0
  234. py2docfx/venv/venv1/Lib/site-packages/win32/scripts/regsetup.py +4 -7
  235. py2docfx/venv/venv1/Lib/site-packages/win32/scripts/setup_d.py +1 -1
  236. py2docfx/venv/venv1/Lib/site-packages/win32/test/handles.py +13 -5
  237. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_clipboard.py +12 -1
  238. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_sspi.py +1 -1
  239. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32api.py +8 -4
  240. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32clipboard.py +2 -3
  241. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32cred.py +0 -1
  242. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32crypt.py +16 -3
  243. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32file.py +24 -8
  244. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32gui.py +0 -1
  245. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32guistruct.py +2 -5
  246. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32inet.py +23 -6
  247. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32net.py +0 -1
  248. py2docfx/venv/venv1/Lib/site-packages/win32/test/test_win32ts.py +19 -0
  249. py2docfx/venv/venv1/Lib/site-packages/win32/winxpgui.py +3 -11
  250. py2docfx/venv/venv1/Lib/site-packages/win32com/client/CLSIDToClass.py +3 -1
  251. py2docfx/venv/venv1/Lib/site-packages/win32com/client/__init__.py +97 -65
  252. py2docfx/venv/venv1/Lib/site-packages/win32com/client/build.py +24 -24
  253. py2docfx/venv/venv1/Lib/site-packages/win32com/client/combrowse.py +17 -33
  254. py2docfx/venv/venv1/Lib/site-packages/win32com/client/dynamic.py +14 -14
  255. py2docfx/venv/venv1/Lib/site-packages/win32com/client/gencache.py +30 -12
  256. py2docfx/venv/venv1/Lib/site-packages/win32com/client/genpy.py +50 -98
  257. py2docfx/venv/venv1/Lib/site-packages/win32com/client/makepy.py +12 -8
  258. py2docfx/venv/venv1/Lib/site-packages/win32com/client/selecttlb.py +3 -4
  259. py2docfx/venv/venv1/Lib/site-packages/win32com/client/util.py +1 -1
  260. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/dump_clipboard.py +1 -1
  261. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/excelAddin.py +1 -1
  262. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/excelRTDServer.py +1 -1
  263. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/iebutton.py +0 -3
  264. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/ietoolbar.py +1 -1
  265. py2docfx/venv/venv1/Lib/site-packages/win32com/demos/outlookAddin.py +1 -3
  266. py2docfx/venv/venv1/Lib/site-packages/win32com/makegw/makegw.py +48 -56
  267. py2docfx/venv/venv1/Lib/site-packages/win32com/makegw/makegwenum.py +2 -6
  268. py2docfx/venv/venv1/Lib/site-packages/win32com/makegw/makegwparse.py +9 -11
  269. py2docfx/venv/venv1/Lib/site-packages/win32com/olectl.py +1 -1
  270. py2docfx/venv/venv1/Lib/site-packages/win32com/server/connect.py +2 -2
  271. py2docfx/venv/venv1/Lib/site-packages/win32com/server/dispatcher.py +20 -24
  272. py2docfx/venv/venv1/Lib/site-packages/win32com/server/exception.py +8 -8
  273. py2docfx/venv/venv1/Lib/site-packages/win32com/server/policy.py +4 -18
  274. py2docfx/venv/venv1/Lib/site-packages/win32com/server/register.py +5 -6
  275. py2docfx/venv/venv1/Lib/site-packages/win32com/servers/dictionary.py +2 -5
  276. py2docfx/venv/venv1/Lib/site-packages/win32com/servers/interp.py +7 -7
  277. py2docfx/venv/venv1/Lib/site-packages/win32com/servers/test_pycomtest.py +0 -1
  278. py2docfx/venv/venv1/Lib/site-packages/win32com/test/GenTestScripts.py +2 -4
  279. py2docfx/venv/venv1/Lib/site-packages/win32com/test/errorSemantics.py +3 -3
  280. py2docfx/venv/venv1/Lib/site-packages/win32com/test/pippo_server.py +1 -4
  281. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testADOEvents.py +1 -1
  282. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testAXScript.py +1 -2
  283. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testDictionary.py +4 -3
  284. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testDynamic.py +3 -5
  285. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testExchange.py +2 -7
  286. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testGatewayAddresses.py +1 -1
  287. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testIterators.py +1 -1
  288. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testMSOffice.py +40 -57
  289. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testMSOfficeEvents.py +3 -3
  290. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testPersist.py +7 -7
  291. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testPippo.py +2 -3
  292. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testPyComTest.py +143 -7
  293. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testServers.py +1 -2
  294. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testall.py +1 -2
  295. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testmakepy.py +1 -2
  296. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testvb.py +12 -8
  297. py2docfx/venv/venv1/Lib/site-packages/win32com/test/util.py +1 -3
  298. py2docfx/venv/venv1/Lib/site-packages/win32com/universal.py +1 -3
  299. py2docfx/venv/venv1/Lib/site-packages/win32com/util.py +1 -1
  300. py2docfx/venv/venv1/Lib/site-packages/win32comext/adsi/demos/scp.py +1 -1
  301. py2docfx/venv/venv1/Lib/site-packages/win32comext/adsi/demos/search.py +0 -1
  302. py2docfx/venv/venv1/Lib/site-packages/win32comext/authorization/demos/EditSecurity.py +1 -24
  303. py2docfx/venv/venv1/Lib/site-packages/win32comext/authorization/demos/EditServiceSecurity.py +0 -20
  304. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/adb.py +2 -8
  305. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/codecontainer.py +16 -12
  306. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/contexts.py +1 -3
  307. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/debugger.py +2 -2
  308. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/documents.py +2 -3
  309. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/dump.py +2 -4
  310. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/expressions.py +2 -2
  311. py2docfx/venv/venv1/Lib/site-packages/win32comext/axdebug/util.py +7 -14
  312. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/debug.py +2 -14
  313. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/error.py +4 -5
  314. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/framework.py +5 -5
  315. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/pydumper.py +0 -1
  316. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/pyscript.py +5 -10
  317. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/client/scriptdispatch.py +3 -4
  318. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/server/axsite.py +1 -2
  319. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/test/leakTest.py +2 -3
  320. py2docfx/venv/venv1/Lib/site-packages/win32comext/axscript/test/testHost4Dbg.py +0 -3
  321. py2docfx/venv/venv1/Lib/site-packages/win32comext/bits/test/test_bits.py +3 -3
  322. py2docfx/venv/venv1/Lib/site-packages/win32comext/ifilter/demo/filterDemo.py +1 -1
  323. py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/demos/mapisend.py +1 -1
  324. py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/emsabtags.py +1 -0
  325. py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/mapitags.py +1 -3
  326. py2docfx/venv/venv1/Lib/site-packages/win32comext/mapi/mapiutil.py +2 -2
  327. py2docfx/venv/venv1/Lib/site-packages/win32comext/propsys/test/testpropsys.py +1 -1
  328. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/IFileOperationProgressSink.py +1 -1
  329. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/ITransferAdviseSink.py +5 -3
  330. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/column_provider.py +0 -1
  331. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/copy_hook.py +1 -1
  332. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/empty_volume_cache.py +1 -1
  333. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/folder_view.py +2 -2
  334. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/icon_handler.py +1 -2
  335. py2docfx/venv/venv1/Lib/site-packages/win32comext/shell/demos/servers/shell_view.py +4 -5
  336. py2docfx/venv/venv1/Lib/site-packages/win32comext/taskscheduler/test/test_addtask_2.py +0 -1
  337. py2docfx/venv/venv1/Scripts/pywin32_postinstall.py +77 -122
  338. py2docfx/venv/venv1/Scripts/pywin32_testall.py +4 -9
  339. {py2docfx-0.1.13.dev2016723.dist-info → py2docfx-0.1.13.dev2021865.dist-info}/METADATA +1 -1
  340. {py2docfx-0.1.13.dev2016723.dist-info → py2docfx-0.1.13.dev2021865.dist-info}/RECORD +342 -330
  341. py2docfx/venv/venv1/Lib/site-packages/docs/conf.py +0 -384
  342. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/Demos/ocx/__init__.py +0 -0
  343. py2docfx/venv/venv1/Lib/site-packages/pythonwin/pywin/framework/mdi_pychecker.py +0 -850
  344. py2docfx/venv/venv1/Lib/site-packages/win32com/test/testNetscape.py +0 -24
  345. {py2docfx-0.1.13.dev2016723.dist-info → py2docfx-0.1.13.dev2021865.dist-info}/WHEEL +0 -0
  346. {py2docfx-0.1.13.dev2016723.dist-info → py2docfx-0.1.13.dev2021865.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,614 @@
1
+ """distutils._msvccompiler
2
+
3
+ Contains MSVCCompiler, an implementation of the abstract CCompiler class
4
+ for Microsoft Visual Studio 2015.
5
+
6
+ This module requires VS 2015 or later.
7
+ """
8
+
9
+ # Written by Perry Stoll
10
+ # hacked by Robin Becker and Thomas Heller to do a better job of
11
+ # finding DevStudio (through the registry)
12
+ # ported to VS 2005 and VS 2008 by Christian Heimes
13
+ # ported to VS 2015 by Steve Dower
14
+ from __future__ import annotations
15
+
16
+ import contextlib
17
+ import os
18
+ import subprocess
19
+ import unittest.mock as mock
20
+ import warnings
21
+ from collections.abc import Iterable
22
+
23
+ with contextlib.suppress(ImportError):
24
+ import winreg
25
+
26
+ from itertools import count
27
+
28
+ from ..._log import log
29
+ from ...errors import (
30
+ DistutilsExecError,
31
+ DistutilsPlatformError,
32
+ )
33
+ from ...util import get_host_platform, get_platform
34
+ from . import base
35
+ from .base import gen_lib_options
36
+ from .errors import (
37
+ CompileError,
38
+ LibError,
39
+ LinkError,
40
+ )
41
+
42
+
43
+ def _find_vc2015():
44
+ try:
45
+ key = winreg.OpenKeyEx(
46
+ winreg.HKEY_LOCAL_MACHINE,
47
+ r"Software\Microsoft\VisualStudio\SxS\VC7",
48
+ access=winreg.KEY_READ | winreg.KEY_WOW64_32KEY,
49
+ )
50
+ except OSError:
51
+ log.debug("Visual C++ is not registered")
52
+ return None, None
53
+
54
+ best_version = 0
55
+ best_dir = None
56
+ with key:
57
+ for i in count():
58
+ try:
59
+ v, vc_dir, vt = winreg.EnumValue(key, i)
60
+ except OSError:
61
+ break
62
+ if v and vt == winreg.REG_SZ and os.path.isdir(vc_dir):
63
+ try:
64
+ version = int(float(v))
65
+ except (ValueError, TypeError):
66
+ continue
67
+ if version >= 14 and version > best_version:
68
+ best_version, best_dir = version, vc_dir
69
+ return best_version, best_dir
70
+
71
+
72
+ def _find_vc2017():
73
+ """Returns "15, path" based on the result of invoking vswhere.exe
74
+ If no install is found, returns "None, None"
75
+
76
+ The version is returned to avoid unnecessarily changing the function
77
+ result. It may be ignored when the path is not None.
78
+
79
+ If vswhere.exe is not available, by definition, VS 2017 is not
80
+ installed.
81
+ """
82
+ root = os.environ.get("ProgramFiles(x86)") or os.environ.get("ProgramFiles")
83
+ if not root:
84
+ return None, None
85
+
86
+ variant = 'arm64' if get_platform() == 'win-arm64' else 'x86.x64'
87
+ suitable_components = (
88
+ f"Microsoft.VisualStudio.Component.VC.Tools.{variant}",
89
+ "Microsoft.VisualStudio.Workload.WDExpress",
90
+ )
91
+
92
+ for component in suitable_components:
93
+ # Workaround for `-requiresAny` (only available on VS 2017 > 15.6)
94
+ with contextlib.suppress(
95
+ subprocess.CalledProcessError, OSError, UnicodeDecodeError
96
+ ):
97
+ path = (
98
+ subprocess.check_output([
99
+ os.path.join(
100
+ root, "Microsoft Visual Studio", "Installer", "vswhere.exe"
101
+ ),
102
+ "-latest",
103
+ "-prerelease",
104
+ "-requires",
105
+ component,
106
+ "-property",
107
+ "installationPath",
108
+ "-products",
109
+ "*",
110
+ ])
111
+ .decode(encoding="mbcs", errors="strict")
112
+ .strip()
113
+ )
114
+
115
+ path = os.path.join(path, "VC", "Auxiliary", "Build")
116
+ if os.path.isdir(path):
117
+ return 15, path
118
+
119
+ return None, None # no suitable component found
120
+
121
+
122
+ PLAT_SPEC_TO_RUNTIME = {
123
+ 'x86': 'x86',
124
+ 'x86_amd64': 'x64',
125
+ 'x86_arm': 'arm',
126
+ 'x86_arm64': 'arm64',
127
+ }
128
+
129
+
130
+ def _find_vcvarsall(plat_spec):
131
+ # bpo-38597: Removed vcruntime return value
132
+ _, best_dir = _find_vc2017()
133
+
134
+ if not best_dir:
135
+ best_version, best_dir = _find_vc2015()
136
+
137
+ if not best_dir:
138
+ log.debug("No suitable Visual C++ version found")
139
+ return None, None
140
+
141
+ vcvarsall = os.path.join(best_dir, "vcvarsall.bat")
142
+ if not os.path.isfile(vcvarsall):
143
+ log.debug("%s cannot be found", vcvarsall)
144
+ return None, None
145
+
146
+ return vcvarsall, None
147
+
148
+
149
+ def _get_vc_env(plat_spec):
150
+ if os.getenv("DISTUTILS_USE_SDK"):
151
+ return {key.lower(): value for key, value in os.environ.items()}
152
+
153
+ vcvarsall, _ = _find_vcvarsall(plat_spec)
154
+ if not vcvarsall:
155
+ raise DistutilsPlatformError(
156
+ 'Microsoft Visual C++ 14.0 or greater is required. '
157
+ 'Get it with "Microsoft C++ Build Tools": '
158
+ 'https://visualstudio.microsoft.com/visual-cpp-build-tools/'
159
+ )
160
+
161
+ try:
162
+ out = subprocess.check_output(
163
+ f'cmd /u /c "{vcvarsall}" {plat_spec} && set',
164
+ stderr=subprocess.STDOUT,
165
+ ).decode('utf-16le', errors='replace')
166
+ except subprocess.CalledProcessError as exc:
167
+ log.error(exc.output)
168
+ raise DistutilsPlatformError(f"Error executing {exc.cmd}")
169
+
170
+ env = {
171
+ key.lower(): value
172
+ for key, _, value in (line.partition('=') for line in out.splitlines())
173
+ if key and value
174
+ }
175
+
176
+ return env
177
+
178
+
179
+ def _find_exe(exe, paths=None):
180
+ """Return path to an MSVC executable program.
181
+
182
+ Tries to find the program in several places: first, one of the
183
+ MSVC program search paths from the registry; next, the directories
184
+ in the PATH environment variable. If any of those work, return an
185
+ absolute path that is known to exist. If none of them work, just
186
+ return the original program name, 'exe'.
187
+ """
188
+ if not paths:
189
+ paths = os.getenv('path').split(os.pathsep)
190
+ for p in paths:
191
+ fn = os.path.join(os.path.abspath(p), exe)
192
+ if os.path.isfile(fn):
193
+ return fn
194
+ return exe
195
+
196
+
197
+ _vcvars_names = {
198
+ 'win32': 'x86',
199
+ 'win-amd64': 'amd64',
200
+ 'win-arm32': 'arm',
201
+ 'win-arm64': 'arm64',
202
+ }
203
+
204
+
205
+ def _get_vcvars_spec(host_platform, platform):
206
+ """
207
+ Given a host platform and platform, determine the spec for vcvarsall.
208
+
209
+ Uses the native MSVC host if the host platform would need expensive
210
+ emulation for x86.
211
+
212
+ >>> _get_vcvars_spec('win-arm64', 'win32')
213
+ 'arm64_x86'
214
+ >>> _get_vcvars_spec('win-arm64', 'win-amd64')
215
+ 'arm64_amd64'
216
+
217
+ Otherwise, always cross-compile from x86 to work with the
218
+ lighter-weight MSVC installs that do not include native 64-bit tools.
219
+
220
+ >>> _get_vcvars_spec('win32', 'win32')
221
+ 'x86'
222
+ >>> _get_vcvars_spec('win-arm32', 'win-arm32')
223
+ 'x86_arm'
224
+ >>> _get_vcvars_spec('win-amd64', 'win-arm64')
225
+ 'x86_arm64'
226
+ """
227
+ if host_platform != 'win-arm64':
228
+ host_platform = 'win32'
229
+ vc_hp = _vcvars_names[host_platform]
230
+ vc_plat = _vcvars_names[platform]
231
+ return vc_hp if vc_hp == vc_plat else f'{vc_hp}_{vc_plat}'
232
+
233
+
234
+ class Compiler(base.Compiler):
235
+ """Concrete class that implements an interface to Microsoft Visual C++,
236
+ as defined by the CCompiler abstract class."""
237
+
238
+ compiler_type = 'msvc'
239
+
240
+ # Just set this so CCompiler's constructor doesn't barf. We currently
241
+ # don't use the 'set_executables()' bureaucracy provided by CCompiler,
242
+ # as it really isn't necessary for this sort of single-compiler class.
243
+ # Would be nice to have a consistent interface with UnixCCompiler,
244
+ # though, so it's worth thinking about.
245
+ executables = {}
246
+
247
+ # Private class data (need to distinguish C from C++ source for compiler)
248
+ _c_extensions = ['.c']
249
+ _cpp_extensions = ['.cc', '.cpp', '.cxx']
250
+ _rc_extensions = ['.rc']
251
+ _mc_extensions = ['.mc']
252
+
253
+ # Needed for the filename generation methods provided by the
254
+ # base class, CCompiler.
255
+ src_extensions = _c_extensions + _cpp_extensions + _rc_extensions + _mc_extensions
256
+ res_extension = '.res'
257
+ obj_extension = '.obj'
258
+ static_lib_extension = '.lib'
259
+ shared_lib_extension = '.dll'
260
+ static_lib_format = static_lib_format = '%s%s'
261
+ exe_extension = '.exe'
262
+
263
+ def __init__(self, verbose=False, dry_run=False, force=False) -> None:
264
+ super().__init__(verbose, dry_run, force)
265
+ # target platform (.plat_name is consistent with 'bdist')
266
+ self.plat_name = None
267
+ self.initialized = False
268
+
269
+ @classmethod
270
+ def _configure(cls, vc_env):
271
+ """
272
+ Set class-level include/lib dirs.
273
+ """
274
+ cls.include_dirs = cls._parse_path(vc_env.get('include', ''))
275
+ cls.library_dirs = cls._parse_path(vc_env.get('lib', ''))
276
+
277
+ @staticmethod
278
+ def _parse_path(val):
279
+ return [dir.rstrip(os.sep) for dir in val.split(os.pathsep) if dir]
280
+
281
+ def initialize(self, plat_name: str | None = None) -> None:
282
+ # multi-init means we would need to check platform same each time...
283
+ assert not self.initialized, "don't init multiple times"
284
+ if plat_name is None:
285
+ plat_name = get_platform()
286
+ # sanity check for platforms to prevent obscure errors later.
287
+ if plat_name not in _vcvars_names:
288
+ raise DistutilsPlatformError(
289
+ f"--plat-name must be one of {tuple(_vcvars_names)}"
290
+ )
291
+
292
+ plat_spec = _get_vcvars_spec(get_host_platform(), plat_name)
293
+
294
+ vc_env = _get_vc_env(plat_spec)
295
+ if not vc_env:
296
+ raise DistutilsPlatformError(
297
+ "Unable to find a compatible Visual Studio installation."
298
+ )
299
+ self._configure(vc_env)
300
+
301
+ self._paths = vc_env.get('path', '')
302
+ paths = self._paths.split(os.pathsep)
303
+ self.cc = _find_exe("cl.exe", paths)
304
+ self.linker = _find_exe("link.exe", paths)
305
+ self.lib = _find_exe("lib.exe", paths)
306
+ self.rc = _find_exe("rc.exe", paths) # resource compiler
307
+ self.mc = _find_exe("mc.exe", paths) # message compiler
308
+ self.mt = _find_exe("mt.exe", paths) # message compiler
309
+
310
+ self.preprocess_options = None
311
+ # bpo-38597: Always compile with dynamic linking
312
+ # Future releases of Python 3.x will include all past
313
+ # versions of vcruntime*.dll for compatibility.
314
+ self.compile_options = ['/nologo', '/O2', '/W3', '/GL', '/DNDEBUG', '/MD']
315
+
316
+ self.compile_options_debug = [
317
+ '/nologo',
318
+ '/Od',
319
+ '/MDd',
320
+ '/Zi',
321
+ '/W3',
322
+ '/D_DEBUG',
323
+ ]
324
+
325
+ ldflags = ['/nologo', '/INCREMENTAL:NO', '/LTCG']
326
+
327
+ ldflags_debug = ['/nologo', '/INCREMENTAL:NO', '/LTCG', '/DEBUG:FULL']
328
+
329
+ self.ldflags_exe = [*ldflags, '/MANIFEST:EMBED,ID=1']
330
+ self.ldflags_exe_debug = [*ldflags_debug, '/MANIFEST:EMBED,ID=1']
331
+ self.ldflags_shared = [
332
+ *ldflags,
333
+ '/DLL',
334
+ '/MANIFEST:EMBED,ID=2',
335
+ '/MANIFESTUAC:NO',
336
+ ]
337
+ self.ldflags_shared_debug = [
338
+ *ldflags_debug,
339
+ '/DLL',
340
+ '/MANIFEST:EMBED,ID=2',
341
+ '/MANIFESTUAC:NO',
342
+ ]
343
+ self.ldflags_static = [*ldflags]
344
+ self.ldflags_static_debug = [*ldflags_debug]
345
+
346
+ self._ldflags = {
347
+ (base.Compiler.EXECUTABLE, None): self.ldflags_exe,
348
+ (base.Compiler.EXECUTABLE, False): self.ldflags_exe,
349
+ (base.Compiler.EXECUTABLE, True): self.ldflags_exe_debug,
350
+ (base.Compiler.SHARED_OBJECT, None): self.ldflags_shared,
351
+ (base.Compiler.SHARED_OBJECT, False): self.ldflags_shared,
352
+ (base.Compiler.SHARED_OBJECT, True): self.ldflags_shared_debug,
353
+ (base.Compiler.SHARED_LIBRARY, None): self.ldflags_static,
354
+ (base.Compiler.SHARED_LIBRARY, False): self.ldflags_static,
355
+ (base.Compiler.SHARED_LIBRARY, True): self.ldflags_static_debug,
356
+ }
357
+
358
+ self.initialized = True
359
+
360
+ # -- Worker methods ------------------------------------------------
361
+
362
+ @property
363
+ def out_extensions(self) -> dict[str, str]:
364
+ return {
365
+ **super().out_extensions,
366
+ **{
367
+ ext: self.res_extension
368
+ for ext in self._rc_extensions + self._mc_extensions
369
+ },
370
+ }
371
+
372
+ def compile( # noqa: C901
373
+ self,
374
+ sources,
375
+ output_dir=None,
376
+ macros=None,
377
+ include_dirs=None,
378
+ debug=False,
379
+ extra_preargs=None,
380
+ extra_postargs=None,
381
+ depends=None,
382
+ ):
383
+ if not self.initialized:
384
+ self.initialize()
385
+ compile_info = self._setup_compile(
386
+ output_dir, macros, include_dirs, sources, depends, extra_postargs
387
+ )
388
+ macros, objects, extra_postargs, pp_opts, build = compile_info
389
+
390
+ compile_opts = extra_preargs or []
391
+ compile_opts.append('/c')
392
+ if debug:
393
+ compile_opts.extend(self.compile_options_debug)
394
+ else:
395
+ compile_opts.extend(self.compile_options)
396
+
397
+ add_cpp_opts = False
398
+
399
+ for obj in objects:
400
+ try:
401
+ src, ext = build[obj]
402
+ except KeyError:
403
+ continue
404
+ if debug:
405
+ # pass the full pathname to MSVC in debug mode,
406
+ # this allows the debugger to find the source file
407
+ # without asking the user to browse for it
408
+ src = os.path.abspath(src)
409
+
410
+ if ext in self._c_extensions:
411
+ input_opt = f"/Tc{src}"
412
+ elif ext in self._cpp_extensions:
413
+ input_opt = f"/Tp{src}"
414
+ add_cpp_opts = True
415
+ elif ext in self._rc_extensions:
416
+ # compile .RC to .RES file
417
+ input_opt = src
418
+ output_opt = "/fo" + obj
419
+ try:
420
+ self.spawn([self.rc] + pp_opts + [output_opt, input_opt])
421
+ except DistutilsExecError as msg:
422
+ raise CompileError(msg)
423
+ continue
424
+ elif ext in self._mc_extensions:
425
+ # Compile .MC to .RC file to .RES file.
426
+ # * '-h dir' specifies the directory for the
427
+ # generated include file
428
+ # * '-r dir' specifies the target directory of the
429
+ # generated RC file and the binary message resource
430
+ # it includes
431
+ #
432
+ # For now (since there are no options to change this),
433
+ # we use the source-directory for the include file and
434
+ # the build directory for the RC file and message
435
+ # resources. This works at least for win32all.
436
+ h_dir = os.path.dirname(src)
437
+ rc_dir = os.path.dirname(obj)
438
+ try:
439
+ # first compile .MC to .RC and .H file
440
+ self.spawn([self.mc, '-h', h_dir, '-r', rc_dir, src])
441
+ base, _ = os.path.splitext(os.path.basename(src))
442
+ rc_file = os.path.join(rc_dir, base + '.rc')
443
+ # then compile .RC to .RES file
444
+ self.spawn([self.rc, "/fo" + obj, rc_file])
445
+
446
+ except DistutilsExecError as msg:
447
+ raise CompileError(msg)
448
+ continue
449
+ else:
450
+ # how to handle this file?
451
+ raise CompileError(f"Don't know how to compile {src} to {obj}")
452
+
453
+ args = [self.cc] + compile_opts + pp_opts
454
+ if add_cpp_opts:
455
+ args.append('/EHsc')
456
+ args.extend((input_opt, "/Fo" + obj))
457
+ args.extend(extra_postargs)
458
+
459
+ try:
460
+ self.spawn(args)
461
+ except DistutilsExecError as msg:
462
+ raise CompileError(msg)
463
+
464
+ return objects
465
+
466
+ def create_static_lib(
467
+ self,
468
+ objects: list[str] | tuple[str, ...],
469
+ output_libname: str,
470
+ output_dir: str | None = None,
471
+ debug: bool = False,
472
+ target_lang: str | None = None,
473
+ ) -> None:
474
+ if not self.initialized:
475
+ self.initialize()
476
+ objects, output_dir = self._fix_object_args(objects, output_dir)
477
+ output_filename = self.library_filename(output_libname, output_dir=output_dir)
478
+
479
+ if self._need_link(objects, output_filename):
480
+ lib_args = objects + ['/OUT:' + output_filename]
481
+ if debug:
482
+ pass # XXX what goes here?
483
+ try:
484
+ log.debug('Executing "%s" %s', self.lib, ' '.join(lib_args))
485
+ self.spawn([self.lib] + lib_args)
486
+ except DistutilsExecError as msg:
487
+ raise LibError(msg)
488
+ else:
489
+ log.debug("skipping %s (up-to-date)", output_filename)
490
+
491
+ def link(
492
+ self,
493
+ target_desc: str,
494
+ objects: list[str] | tuple[str, ...],
495
+ output_filename: str,
496
+ output_dir: str | None = None,
497
+ libraries: list[str] | tuple[str, ...] | None = None,
498
+ library_dirs: list[str] | tuple[str, ...] | None = None,
499
+ runtime_library_dirs: list[str] | tuple[str, ...] | None = None,
500
+ export_symbols: Iterable[str] | None = None,
501
+ debug: bool = False,
502
+ extra_preargs: list[str] | None = None,
503
+ extra_postargs: Iterable[str] | None = None,
504
+ build_temp: str | os.PathLike[str] | None = None,
505
+ target_lang: str | None = None,
506
+ ) -> None:
507
+ if not self.initialized:
508
+ self.initialize()
509
+ objects, output_dir = self._fix_object_args(objects, output_dir)
510
+ fixed_args = self._fix_lib_args(libraries, library_dirs, runtime_library_dirs)
511
+ libraries, library_dirs, runtime_library_dirs = fixed_args
512
+
513
+ if runtime_library_dirs:
514
+ self.warn(
515
+ "I don't know what to do with 'runtime_library_dirs': "
516
+ + str(runtime_library_dirs)
517
+ )
518
+
519
+ lib_opts = gen_lib_options(self, library_dirs, runtime_library_dirs, libraries)
520
+ if output_dir is not None:
521
+ output_filename = os.path.join(output_dir, output_filename)
522
+
523
+ if self._need_link(objects, output_filename):
524
+ ldflags = self._ldflags[target_desc, debug]
525
+
526
+ export_opts = ["/EXPORT:" + sym for sym in (export_symbols or [])]
527
+
528
+ ld_args = (
529
+ ldflags + lib_opts + export_opts + objects + ['/OUT:' + output_filename]
530
+ )
531
+
532
+ # The MSVC linker generates .lib and .exp files, which cannot be
533
+ # suppressed by any linker switches. The .lib files may even be
534
+ # needed! Make sure they are generated in the temporary build
535
+ # directory. Since they have different names for debug and release
536
+ # builds, they can go into the same directory.
537
+ build_temp = os.path.dirname(objects[0])
538
+ if export_symbols is not None:
539
+ (dll_name, dll_ext) = os.path.splitext(
540
+ os.path.basename(output_filename)
541
+ )
542
+ implib_file = os.path.join(build_temp, self.library_filename(dll_name))
543
+ ld_args.append('/IMPLIB:' + implib_file)
544
+
545
+ if extra_preargs:
546
+ ld_args[:0] = extra_preargs
547
+ if extra_postargs:
548
+ ld_args.extend(extra_postargs)
549
+
550
+ output_dir = os.path.dirname(os.path.abspath(output_filename))
551
+ self.mkpath(output_dir)
552
+ try:
553
+ log.debug('Executing "%s" %s', self.linker, ' '.join(ld_args))
554
+ self.spawn([self.linker] + ld_args)
555
+ except DistutilsExecError as msg:
556
+ raise LinkError(msg)
557
+ else:
558
+ log.debug("skipping %s (up-to-date)", output_filename)
559
+
560
+ def spawn(self, cmd):
561
+ env = dict(os.environ, PATH=self._paths)
562
+ with self._fallback_spawn(cmd, env) as fallback:
563
+ return super().spawn(cmd, env=env)
564
+ return fallback.value
565
+
566
+ @contextlib.contextmanager
567
+ def _fallback_spawn(self, cmd, env):
568
+ """
569
+ Discovered in pypa/distutils#15, some tools monkeypatch the compiler,
570
+ so the 'env' kwarg causes a TypeError. Detect this condition and
571
+ restore the legacy, unsafe behavior.
572
+ """
573
+ bag = type('Bag', (), {})()
574
+ try:
575
+ yield bag
576
+ except TypeError as exc:
577
+ if "unexpected keyword argument 'env'" not in str(exc):
578
+ raise
579
+ else:
580
+ return
581
+ warnings.warn("Fallback spawn triggered. Please update distutils monkeypatch.")
582
+ with mock.patch.dict('os.environ', env):
583
+ bag.value = super().spawn(cmd)
584
+
585
+ # -- Miscellaneous methods -----------------------------------------
586
+ # These are all used by the 'gen_lib_options() function, in
587
+ # ccompiler.py.
588
+
589
+ def library_dir_option(self, dir):
590
+ return "/LIBPATH:" + dir
591
+
592
+ def runtime_library_dir_option(self, dir):
593
+ raise DistutilsPlatformError(
594
+ "don't know how to set runtime library search path for MSVC"
595
+ )
596
+
597
+ def library_option(self, lib):
598
+ return self.library_filename(lib)
599
+
600
+ def find_library_file(self, dirs, lib, debug=False):
601
+ # Prefer a debugging library if found (and requested), but deal
602
+ # with it if we don't have one.
603
+ if debug:
604
+ try_names = [lib + "_d", lib]
605
+ else:
606
+ try_names = [lib]
607
+ for dir in dirs:
608
+ for name in try_names:
609
+ libfile = os.path.join(dir, self.library_filename(name))
610
+ if os.path.isfile(libfile):
611
+ return libfile
612
+ else:
613
+ # Oops, didn't find it in *any* of 'dirs'
614
+ return None
@@ -1,22 +1,12 @@
1
- import os
2
1
  import platform
3
- import sys
4
2
  import sysconfig
5
3
  import textwrap
6
- from distutils import ccompiler
7
4
 
8
5
  import pytest
9
6
 
10
- pytestmark = pytest.mark.usefixtures('suppress_path_mangle')
11
-
7
+ from .. import base
12
8
 
13
- def _make_strs(paths):
14
- """
15
- Convert paths to strings for legacy compatibility.
16
- """
17
- if sys.version_info > (3, 8) and platform.system() != "Windows":
18
- return paths
19
- return list(map(os.fspath, paths))
9
+ pytestmark = pytest.mark.usefixtures('suppress_path_mangle')
20
10
 
21
11
 
22
12
  @pytest.fixture
@@ -46,21 +36,21 @@ def test_set_include_dirs(c_file):
46
36
  Extensions should build even if set_include_dirs is invoked.
47
37
  In particular, compiler-specific paths should not be overridden.
48
38
  """
49
- compiler = ccompiler.new_compiler()
39
+ compiler = base.new_compiler()
50
40
  python = sysconfig.get_paths()['include']
51
41
  compiler.set_include_dirs([python])
52
- compiler.compile(_make_strs([c_file]))
42
+ compiler.compile([c_file])
53
43
 
54
44
  # do it again, setting include dirs after any initialization
55
45
  compiler.set_include_dirs([python])
56
- compiler.compile(_make_strs([c_file]))
46
+ compiler.compile([c_file])
57
47
 
58
48
 
59
49
  def test_has_function_prototype():
60
50
  # Issue https://github.com/pypa/setuptools/issues/3648
61
51
  # Test prototype-generating behavior.
62
52
 
63
- compiler = ccompiler.new_compiler()
53
+ compiler = base.new_compiler()
64
54
 
65
55
  # Every C implementation should have these.
66
56
  assert compiler.has_function('abort')
@@ -84,10 +74,10 @@ def test_include_dirs_after_multiple_compile_calls(c_file):
84
74
  Calling compile multiple times should not change the include dirs
85
75
  (regression test for setuptools issue #3591).
86
76
  """
87
- compiler = ccompiler.new_compiler()
77
+ compiler = base.new_compiler()
88
78
  python = sysconfig.get_paths()['include']
89
79
  compiler.set_include_dirs([python])
90
- compiler.compile(_make_strs([c_file]))
80
+ compiler.compile([c_file])
91
81
  assert compiler.include_dirs == [python]
92
- compiler.compile(_make_strs([c_file]))
82
+ compiler.compile([c_file])
93
83
  assert compiler.include_dirs == [python]