quarchpy 2.1.14.dev4__py2.py3-none-any.whl → 2.1.14.dev5__py2.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 (730) hide show
  1. quarchpy/.idea/.name +1 -0
  2. quarchpy/.idea/workspace.xml +70 -11
  3. quarchpy/__pycache__/_version.cpython-311.pyc +0 -0
  4. quarchpy/__pycache__/run.cpython-311.pyc +0 -0
  5. quarchpy/_version.py +1 -1
  6. quarchpy/_version.py.bak +1 -0
  7. quarchpy/connection_specific/QPS/qis/qis.jar +0 -0
  8. quarchpy/connection_specific/QPS/qis/qis_lib/CInterface-1.7.04.jar +0 -0
  9. quarchpy/connection_specific/QPS/qps.jar +0 -0
  10. quarchpy/connection_specific/QPS/scriptCommands.txt +2 -2
  11. quarchpy/connection_specific/__pycache__/connection_QIS.cpython-311.pyc +0 -0
  12. quarchpy/connection_specific/connection_QIS.py +6 -4
  13. quarchpy/connection_specific/connection_ReST.py +26 -16
  14. quarchpy/debug/__pycache__/module_debug.cpython-311.pyc +0 -0
  15. quarchpy/debug/__pycache__/simple_terminal.cpython-311.pyc +0 -0
  16. quarchpy/debug/__pycache__/upgrade_quarchpy.cpython-311.pyc +0 -0
  17. quarchpy/device/__pycache__/scanDevices.cpython-311.pyc +0 -0
  18. quarchpy/device/scanDevices.py +2 -4
  19. quarchpy/device/scanDevices.py.bak +657 -0
  20. quarchpy/qis/qisFuncs.py +25 -42
  21. quarchpy/qis/qisFuncs.py.bak +213 -0
  22. quarchpy/qps/__pycache__/qpsFuncs.cpython-311.pyc +0 -0
  23. quarchpy/qps/qpsFuncs.py +18 -22
  24. quarchpy/qps/qpsFuncs.py.bak +224 -0
  25. quarchpy/venv/.gitignore +2 -0
  26. quarchpy/venv/Include/Python-ast.h +535 -0
  27. quarchpy/venv/Include/Python.h +181 -0
  28. quarchpy/venv/Include/abstract.h +1396 -0
  29. quarchpy/venv/Include/asdl.h +45 -0
  30. quarchpy/venv/Include/ast.h +13 -0
  31. quarchpy/venv/Include/bitset.h +32 -0
  32. quarchpy/venv/Include/boolobject.h +36 -0
  33. quarchpy/venv/Include/bufferobject.h +33 -0
  34. quarchpy/venv/Include/bytearrayobject.h +57 -0
  35. quarchpy/venv/Include/bytes_methods.h +75 -0
  36. quarchpy/venv/Include/bytesobject.h +27 -0
  37. quarchpy/venv/Include/cStringIO.h +73 -0
  38. quarchpy/venv/Include/cellobject.h +28 -0
  39. quarchpy/venv/Include/ceval.h +154 -0
  40. quarchpy/venv/Include/classobject.h +83 -0
  41. quarchpy/venv/Include/cobject.h +89 -0
  42. quarchpy/venv/Include/code.h +116 -0
  43. quarchpy/venv/Include/codecs.h +212 -0
  44. quarchpy/venv/Include/compile.h +40 -0
  45. quarchpy/venv/Include/complexobject.h +66 -0
  46. quarchpy/venv/Include/datetime.h +239 -0
  47. quarchpy/venv/Include/descrobject.h +94 -0
  48. quarchpy/venv/Include/dictobject.h +160 -0
  49. quarchpy/venv/Include/dtoa.h +15 -0
  50. quarchpy/venv/Include/enumobject.h +17 -0
  51. quarchpy/venv/Include/errcode.h +37 -0
  52. quarchpy/venv/Include/eval.h +25 -0
  53. quarchpy/venv/Include/fileobject.h +97 -0
  54. quarchpy/venv/Include/floatobject.h +140 -0
  55. quarchpy/venv/Include/frameobject.h +89 -0
  56. quarchpy/venv/Include/funcobject.h +76 -0
  57. quarchpy/venv/Include/genobject.h +40 -0
  58. quarchpy/venv/Include/graminit.h +87 -0
  59. quarchpy/venv/Include/grammar.h +94 -0
  60. quarchpy/venv/Include/import.h +71 -0
  61. quarchpy/venv/Include/intobject.h +84 -0
  62. quarchpy/venv/Include/intrcheck.h +15 -0
  63. quarchpy/venv/Include/iterobject.h +23 -0
  64. quarchpy/venv/Include/listobject.h +68 -0
  65. quarchpy/venv/Include/longintrepr.h +103 -0
  66. quarchpy/venv/Include/longobject.h +135 -0
  67. quarchpy/venv/Include/marshal.h +25 -0
  68. quarchpy/venv/Include/memoryobject.h +74 -0
  69. quarchpy/venv/Include/metagrammar.h +18 -0
  70. quarchpy/venv/Include/methodobject.h +93 -0
  71. quarchpy/venv/Include/modsupport.h +134 -0
  72. quarchpy/venv/Include/moduleobject.h +24 -0
  73. quarchpy/venv/Include/node.h +41 -0
  74. quarchpy/venv/Include/object.h +1046 -0
  75. quarchpy/venv/Include/objimpl.h +369 -0
  76. quarchpy/venv/Include/opcode.h +171 -0
  77. quarchpy/venv/Include/osdefs.h +63 -0
  78. quarchpy/venv/Include/parsetok.h +64 -0
  79. quarchpy/venv/Include/patchlevel.h +43 -0
  80. quarchpy/venv/Include/pgen.h +18 -0
  81. quarchpy/venv/Include/pgenheaders.h +43 -0
  82. quarchpy/venv/Include/py_curses.h +177 -0
  83. quarchpy/venv/Include/pyarena.h +62 -0
  84. quarchpy/venv/Include/pycapsule.h +56 -0
  85. quarchpy/venv/Include/pyconfig.h +770 -0
  86. quarchpy/venv/Include/pyctype.h +31 -0
  87. quarchpy/venv/Include/pydebug.h +41 -0
  88. quarchpy/venv/Include/pyerrors.h +329 -0
  89. quarchpy/venv/Include/pyexpat.h +50 -0
  90. quarchpy/venv/Include/pyfpe.h +176 -0
  91. quarchpy/venv/Include/pygetopt.h +18 -0
  92. quarchpy/venv/Include/pymacconfig.h +102 -0
  93. quarchpy/venv/Include/pymactoolbox.h +232 -0
  94. quarchpy/venv/Include/pymath.h +214 -0
  95. quarchpy/venv/Include/pymem.h +122 -0
  96. quarchpy/venv/Include/pyport.h +950 -0
  97. quarchpy/venv/Include/pystate.h +200 -0
  98. quarchpy/venv/Include/pystrcmp.h +23 -0
  99. quarchpy/venv/Include/pystrtod.h +45 -0
  100. quarchpy/venv/Include/pythonrun.h +181 -0
  101. quarchpy/venv/Include/pythread.h +41 -0
  102. quarchpy/venv/Include/rangeobject.h +28 -0
  103. quarchpy/venv/Include/setobject.h +99 -0
  104. quarchpy/venv/Include/sliceobject.h +50 -0
  105. quarchpy/venv/Include/stringobject.h +210 -0
  106. quarchpy/venv/Include/structmember.h +99 -0
  107. quarchpy/venv/Include/structseq.h +41 -0
  108. quarchpy/venv/Include/symtable.h +98 -0
  109. quarchpy/venv/Include/sysmodule.h +31 -0
  110. quarchpy/venv/Include/timefuncs.h +26 -0
  111. quarchpy/venv/Include/token.h +85 -0
  112. quarchpy/venv/Include/traceback.h +31 -0
  113. quarchpy/venv/Include/tupleobject.h +61 -0
  114. quarchpy/venv/Include/ucnhash.h +33 -0
  115. quarchpy/venv/Include/unicodeobject.h +1413 -0
  116. quarchpy/venv/Include/warnings.h +23 -0
  117. quarchpy/venv/Include/weakrefobject.h +82 -0
  118. quarchpy/venv/Lib/os.py +742 -0
  119. quarchpy/venv/Lib/os.pyc +0 -0
  120. quarchpy/venv/Lib/site-packages/_virtualenv.pth +1 -0
  121. quarchpy/venv/Lib/site-packages/_virtualenv.py +130 -0
  122. quarchpy/venv/Lib/site-packages/_virtualenv.pyc +0 -0
  123. quarchpy/venv/Lib/site-packages/easy_install.py +5 -0
  124. quarchpy/venv/Lib/site-packages/pip/__init__.py +18 -0
  125. quarchpy/venv/Lib/site-packages/pip/__main__.py +26 -0
  126. quarchpy/venv/Lib/site-packages/pip/_internal/__init__.py +17 -0
  127. quarchpy/venv/Lib/site-packages/pip/_internal/build_env.py +242 -0
  128. quarchpy/venv/Lib/site-packages/pip/_internal/cache.py +346 -0
  129. quarchpy/venv/Lib/site-packages/pip/_internal/cli/__init__.py +4 -0
  130. quarchpy/venv/Lib/site-packages/pip/_internal/cli/autocompletion.py +164 -0
  131. quarchpy/venv/Lib/site-packages/pip/_internal/cli/base_command.py +260 -0
  132. quarchpy/venv/Lib/site-packages/pip/_internal/cli/cmdoptions.py +971 -0
  133. quarchpy/venv/Lib/site-packages/pip/_internal/cli/command_context.py +36 -0
  134. quarchpy/venv/Lib/site-packages/pip/_internal/cli/main.py +75 -0
  135. quarchpy/venv/Lib/site-packages/pip/_internal/cli/main_parser.py +96 -0
  136. quarchpy/venv/Lib/site-packages/pip/_internal/cli/parser.py +285 -0
  137. quarchpy/venv/Lib/site-packages/pip/_internal/cli/progress_bars.py +280 -0
  138. quarchpy/venv/Lib/site-packages/pip/_internal/cli/req_command.py +436 -0
  139. quarchpy/venv/Lib/site-packages/pip/_internal/cli/spinners.py +173 -0
  140. quarchpy/venv/Lib/site-packages/pip/_internal/cli/status_codes.py +8 -0
  141. quarchpy/venv/Lib/site-packages/pip/_internal/commands/__init__.py +123 -0
  142. quarchpy/venv/Lib/site-packages/pip/_internal/commands/cache.py +234 -0
  143. quarchpy/venv/Lib/site-packages/pip/_internal/commands/check.py +51 -0
  144. quarchpy/venv/Lib/site-packages/pip/_internal/commands/completion.py +98 -0
  145. quarchpy/venv/Lib/site-packages/pip/_internal/commands/configuration.py +280 -0
  146. quarchpy/venv/Lib/site-packages/pip/_internal/commands/debug.py +230 -0
  147. quarchpy/venv/Lib/site-packages/pip/_internal/commands/download.py +143 -0
  148. quarchpy/venv/Lib/site-packages/pip/_internal/commands/freeze.py +116 -0
  149. quarchpy/venv/Lib/site-packages/pip/_internal/commands/hash.py +63 -0
  150. quarchpy/venv/Lib/site-packages/pip/_internal/commands/help.py +46 -0
  151. quarchpy/venv/Lib/site-packages/pip/_internal/commands/install.py +737 -0
  152. quarchpy/venv/Lib/site-packages/pip/_internal/commands/list.py +327 -0
  153. quarchpy/venv/Lib/site-packages/pip/_internal/commands/search.py +169 -0
  154. quarchpy/venv/Lib/site-packages/pip/_internal/commands/show.py +186 -0
  155. quarchpy/venv/Lib/site-packages/pip/_internal/commands/uninstall.py +95 -0
  156. quarchpy/venv/Lib/site-packages/pip/_internal/commands/wheel.py +198 -0
  157. quarchpy/venv/Lib/site-packages/pip/_internal/configuration.py +407 -0
  158. quarchpy/venv/Lib/site-packages/pip/_internal/distributions/__init__.py +24 -0
  159. quarchpy/venv/Lib/site-packages/pip/_internal/distributions/base.py +46 -0
  160. quarchpy/venv/Lib/site-packages/pip/_internal/distributions/installed.py +25 -0
  161. quarchpy/venv/Lib/site-packages/pip/_internal/distributions/sdist.py +105 -0
  162. quarchpy/venv/Lib/site-packages/pip/_internal/distributions/wheel.py +37 -0
  163. quarchpy/venv/Lib/site-packages/pip/_internal/exceptions.py +391 -0
  164. quarchpy/venv/Lib/site-packages/pip/_internal/index/__init__.py +2 -0
  165. quarchpy/venv/Lib/site-packages/pip/_internal/index/collector.py +667 -0
  166. quarchpy/venv/Lib/site-packages/pip/_internal/index/package_finder.py +1015 -0
  167. quarchpy/venv/Lib/site-packages/pip/_internal/locations.py +193 -0
  168. quarchpy/venv/Lib/site-packages/pip/_internal/main.py +16 -0
  169. quarchpy/venv/Lib/site-packages/pip/_internal/models/__init__.py +2 -0
  170. quarchpy/venv/Lib/site-packages/pip/_internal/models/candidate.py +39 -0
  171. quarchpy/venv/Lib/site-packages/pip/_internal/models/direct_url.py +243 -0
  172. quarchpy/venv/Lib/site-packages/pip/_internal/models/format_control.py +92 -0
  173. quarchpy/venv/Lib/site-packages/pip/_internal/models/index.py +34 -0
  174. quarchpy/venv/Lib/site-packages/pip/_internal/models/link.py +246 -0
  175. quarchpy/venv/Lib/site-packages/pip/_internal/models/scheme.py +31 -0
  176. quarchpy/venv/Lib/site-packages/pip/_internal/models/search_scope.py +135 -0
  177. quarchpy/venv/Lib/site-packages/pip/_internal/models/selection_prefs.py +50 -0
  178. quarchpy/venv/Lib/site-packages/pip/_internal/models/target_python.py +117 -0
  179. quarchpy/venv/Lib/site-packages/pip/_internal/models/wheel.py +78 -0
  180. quarchpy/venv/Lib/site-packages/pip/_internal/network/__init__.py +2 -0
  181. quarchpy/venv/Lib/site-packages/pip/_internal/network/auth.py +310 -0
  182. quarchpy/venv/Lib/site-packages/pip/_internal/network/cache.py +79 -0
  183. quarchpy/venv/Lib/site-packages/pip/_internal/network/download.py +202 -0
  184. quarchpy/venv/Lib/site-packages/pip/_internal/network/lazy_wheel.py +231 -0
  185. quarchpy/venv/Lib/site-packages/pip/_internal/network/session.py +428 -0
  186. quarchpy/venv/Lib/site-packages/pip/_internal/network/utils.py +97 -0
  187. quarchpy/venv/Lib/site-packages/pip/_internal/network/xmlrpc.py +53 -0
  188. quarchpy/venv/Lib/site-packages/pip/_internal/operations/__init__.py +0 -0
  189. quarchpy/venv/Lib/site-packages/pip/_internal/operations/build/__init__.py +0 -0
  190. quarchpy/venv/Lib/site-packages/pip/_internal/operations/build/metadata.py +38 -0
  191. quarchpy/venv/Lib/site-packages/pip/_internal/operations/build/metadata_legacy.py +77 -0
  192. quarchpy/venv/Lib/site-packages/pip/_internal/operations/build/wheel.py +47 -0
  193. quarchpy/venv/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py +113 -0
  194. quarchpy/venv/Lib/site-packages/pip/_internal/operations/check.py +155 -0
  195. quarchpy/venv/Lib/site-packages/pip/_internal/operations/freeze.py +277 -0
  196. quarchpy/venv/Lib/site-packages/pip/_internal/operations/install/__init__.py +2 -0
  197. quarchpy/venv/Lib/site-packages/pip/_internal/operations/install/editable_legacy.py +52 -0
  198. quarchpy/venv/Lib/site-packages/pip/_internal/operations/install/legacy.py +130 -0
  199. quarchpy/venv/Lib/site-packages/pip/_internal/operations/install/wheel.py +846 -0
  200. quarchpy/venv/Lib/site-packages/pip/_internal/operations/prepare.py +608 -0
  201. quarchpy/venv/Lib/site-packages/pip/_internal/pyproject.py +196 -0
  202. quarchpy/venv/Lib/site-packages/pip/_internal/req/__init__.py +103 -0
  203. quarchpy/venv/Lib/site-packages/pip/_internal/req/constructors.py +476 -0
  204. quarchpy/venv/Lib/site-packages/pip/_internal/req/req_file.py +574 -0
  205. quarchpy/venv/Lib/site-packages/pip/_internal/req/req_install.py +907 -0
  206. quarchpy/venv/Lib/site-packages/pip/_internal/req/req_set.py +204 -0
  207. quarchpy/venv/Lib/site-packages/pip/_internal/req/req_tracker.py +151 -0
  208. quarchpy/venv/Lib/site-packages/pip/_internal/req/req_uninstall.py +657 -0
  209. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/__init__.py +0 -0
  210. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/base.py +21 -0
  211. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
  212. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +473 -0
  213. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
  214. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +156 -0
  215. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +604 -0
  216. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +504 -0
  217. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +101 -0
  218. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +174 -0
  219. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/resolvelib/reporter.py +84 -0
  220. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/resolvelib/requirements.py +201 -0
  221. quarchpy/venv/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +296 -0
  222. quarchpy/venv/Lib/site-packages/pip/_internal/self_outdated_check.py +197 -0
  223. quarchpy/venv/Lib/site-packages/pip/_internal/utils/__init__.py +0 -0
  224. quarchpy/venv/Lib/site-packages/pip/_internal/utils/appdirs.py +44 -0
  225. quarchpy/venv/Lib/site-packages/pip/_internal/utils/compat.py +293 -0
  226. quarchpy/venv/Lib/site-packages/pip/_internal/utils/compatibility_tags.py +178 -0
  227. quarchpy/venv/Lib/site-packages/pip/_internal/utils/datetime.py +14 -0
  228. quarchpy/venv/Lib/site-packages/pip/_internal/utils/deprecation.py +104 -0
  229. quarchpy/venv/Lib/site-packages/pip/_internal/utils/direct_url_helpers.py +126 -0
  230. quarchpy/venv/Lib/site-packages/pip/_internal/utils/distutils_args.py +48 -0
  231. quarchpy/venv/Lib/site-packages/pip/_internal/utils/encoding.py +41 -0
  232. quarchpy/venv/Lib/site-packages/pip/_internal/utils/entrypoints.py +31 -0
  233. quarchpy/venv/Lib/site-packages/pip/_internal/utils/filesystem.py +224 -0
  234. quarchpy/venv/Lib/site-packages/pip/_internal/utils/filetypes.py +26 -0
  235. quarchpy/venv/Lib/site-packages/pip/_internal/utils/glibc.py +98 -0
  236. quarchpy/venv/Lib/site-packages/pip/_internal/utils/hashes.py +169 -0
  237. quarchpy/venv/Lib/site-packages/pip/_internal/utils/inject_securetransport.py +36 -0
  238. quarchpy/venv/Lib/site-packages/pip/_internal/utils/logging.py +399 -0
  239. quarchpy/venv/Lib/site-packages/pip/_internal/utils/misc.py +962 -0
  240. quarchpy/venv/Lib/site-packages/pip/_internal/utils/models.py +44 -0
  241. quarchpy/venv/Lib/site-packages/pip/_internal/utils/packaging.py +95 -0
  242. quarchpy/venv/Lib/site-packages/pip/_internal/utils/parallel.py +107 -0
  243. quarchpy/venv/Lib/site-packages/pip/_internal/utils/pkg_resources.py +44 -0
  244. quarchpy/venv/Lib/site-packages/pip/_internal/utils/setuptools_build.py +181 -0
  245. quarchpy/venv/Lib/site-packages/pip/_internal/utils/subprocess.py +299 -0
  246. quarchpy/venv/Lib/site-packages/pip/_internal/utils/temp_dir.py +284 -0
  247. quarchpy/venv/Lib/site-packages/pip/_internal/utils/typing.py +38 -0
  248. quarchpy/venv/Lib/site-packages/pip/_internal/utils/unpacking.py +281 -0
  249. quarchpy/venv/Lib/site-packages/pip/_internal/utils/urls.py +55 -0
  250. quarchpy/venv/Lib/site-packages/pip/_internal/utils/virtualenv.py +119 -0
  251. quarchpy/venv/Lib/site-packages/pip/_internal/utils/wheel.py +225 -0
  252. quarchpy/venv/Lib/site-packages/pip/_internal/vcs/__init__.py +15 -0
  253. quarchpy/venv/Lib/site-packages/pip/_internal/vcs/bazaar.py +123 -0
  254. quarchpy/venv/Lib/site-packages/pip/_internal/vcs/git.py +454 -0
  255. quarchpy/venv/Lib/site-packages/pip/_internal/vcs/mercurial.py +172 -0
  256. quarchpy/venv/Lib/site-packages/pip/_internal/vcs/subversion.py +340 -0
  257. quarchpy/venv/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +735 -0
  258. quarchpy/venv/Lib/site-packages/pip/_internal/wheel_builder.py +362 -0
  259. quarchpy/venv/Lib/site-packages/pip/_vendor/__init__.py +114 -0
  260. quarchpy/venv/Lib/site-packages/pip/_vendor/appdirs.py +633 -0
  261. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/__init__.py +11 -0
  262. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/_cmd.py +57 -0
  263. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/adapter.py +133 -0
  264. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/cache.py +39 -0
  265. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +2 -0
  266. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +146 -0
  267. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +33 -0
  268. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/compat.py +29 -0
  269. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/controller.py +376 -0
  270. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/filewrapper.py +80 -0
  271. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/heuristics.py +135 -0
  272. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py +188 -0
  273. quarchpy/venv/Lib/site-packages/pip/_vendor/cachecontrol/wrapper.py +29 -0
  274. quarchpy/venv/Lib/site-packages/pip/_vendor/certifi/__init__.py +3 -0
  275. quarchpy/venv/Lib/site-packages/pip/_vendor/certifi/__main__.py +12 -0
  276. quarchpy/venv/Lib/site-packages/pip/_vendor/certifi/cacert.pem +4606 -0
  277. quarchpy/venv/Lib/site-packages/pip/_vendor/certifi/core.py +60 -0
  278. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/__init__.py +39 -0
  279. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/big5freq.py +386 -0
  280. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/big5prober.py +47 -0
  281. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/chardistribution.py +233 -0
  282. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/charsetgroupprober.py +106 -0
  283. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/charsetprober.py +145 -0
  284. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/cli/__init__.py +1 -0
  285. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/cli/chardetect.py +85 -0
  286. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/codingstatemachine.py +88 -0
  287. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/compat.py +34 -0
  288. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/cp949prober.py +49 -0
  289. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/enums.py +76 -0
  290. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/escprober.py +101 -0
  291. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/escsm.py +246 -0
  292. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/eucjpprober.py +92 -0
  293. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/euckrfreq.py +195 -0
  294. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/euckrprober.py +47 -0
  295. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/euctwfreq.py +387 -0
  296. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/euctwprober.py +46 -0
  297. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/gb2312freq.py +283 -0
  298. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/gb2312prober.py +46 -0
  299. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/hebrewprober.py +292 -0
  300. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/jisfreq.py +325 -0
  301. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/jpcntx.py +233 -0
  302. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/langbulgarianmodel.py +228 -0
  303. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/langcyrillicmodel.py +333 -0
  304. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/langgreekmodel.py +225 -0
  305. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/langhebrewmodel.py +200 -0
  306. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/langhungarianmodel.py +225 -0
  307. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/langthaimodel.py +199 -0
  308. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/langturkishmodel.py +193 -0
  309. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/latin1prober.py +145 -0
  310. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/mbcharsetprober.py +91 -0
  311. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/mbcsgroupprober.py +54 -0
  312. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/mbcssm.py +572 -0
  313. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/sbcharsetprober.py +132 -0
  314. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/sbcsgroupprober.py +73 -0
  315. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/sjisprober.py +92 -0
  316. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/universaldetector.py +286 -0
  317. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/utf8prober.py +82 -0
  318. quarchpy/venv/Lib/site-packages/pip/_vendor/chardet/version.py +9 -0
  319. quarchpy/venv/Lib/site-packages/pip/_vendor/colorama/__init__.py +6 -0
  320. quarchpy/venv/Lib/site-packages/pip/_vendor/colorama/ansi.py +102 -0
  321. quarchpy/venv/Lib/site-packages/pip/_vendor/colorama/ansitowin32.py +258 -0
  322. quarchpy/venv/Lib/site-packages/pip/_vendor/colorama/initialise.py +80 -0
  323. quarchpy/venv/Lib/site-packages/pip/_vendor/colorama/win32.py +152 -0
  324. quarchpy/venv/Lib/site-packages/pip/_vendor/colorama/winterm.py +169 -0
  325. quarchpy/venv/Lib/site-packages/pip/_vendor/contextlib2.py +518 -0
  326. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/__init__.py +23 -0
  327. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/_backport/__init__.py +6 -0
  328. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/_backport/misc.py +41 -0
  329. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/_backport/shutil.py +764 -0
  330. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg +84 -0
  331. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/_backport/sysconfig.py +786 -0
  332. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/_backport/tarfile.py +2607 -0
  333. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/compat.py +1120 -0
  334. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/database.py +1339 -0
  335. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/index.py +516 -0
  336. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/locators.py +1302 -0
  337. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/manifest.py +393 -0
  338. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/markers.py +131 -0
  339. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/metadata.py +1056 -0
  340. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/resources.py +355 -0
  341. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/scripts.py +419 -0
  342. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/t32.exe +0 -0
  343. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/t64.exe +0 -0
  344. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/util.py +1761 -0
  345. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/version.py +736 -0
  346. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/w32.exe +0 -0
  347. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/w64.exe +0 -0
  348. quarchpy/venv/Lib/site-packages/pip/_vendor/distlib/wheel.py +1018 -0
  349. quarchpy/venv/Lib/site-packages/pip/_vendor/distro.py +1230 -0
  350. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/__init__.py +35 -0
  351. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/_ihatexml.py +289 -0
  352. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/_inputstream.py +918 -0
  353. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/_tokenizer.py +1735 -0
  354. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/_trie/__init__.py +5 -0
  355. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/_trie/_base.py +40 -0
  356. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/_trie/py.py +67 -0
  357. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/_utils.py +159 -0
  358. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/constants.py +2946 -0
  359. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/filters/__init__.py +0 -0
  360. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +29 -0
  361. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/filters/base.py +12 -0
  362. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +73 -0
  363. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/filters/lint.py +93 -0
  364. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +207 -0
  365. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +916 -0
  366. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/filters/whitespace.py +38 -0
  367. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/html5parser.py +2795 -0
  368. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/serializer.py +409 -0
  369. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py +30 -0
  370. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py +54 -0
  371. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treeadapters/sax.py +50 -0
  372. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py +88 -0
  373. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treebuilders/base.py +417 -0
  374. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treebuilders/dom.py +239 -0
  375. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treebuilders/etree.py +343 -0
  376. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py +392 -0
  377. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py +154 -0
  378. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treewalkers/base.py +252 -0
  379. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treewalkers/dom.py +43 -0
  380. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treewalkers/etree.py +131 -0
  381. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treewalkers/etree_lxml.py +215 -0
  382. quarchpy/venv/Lib/site-packages/pip/_vendor/html5lib/treewalkers/genshi.py +69 -0
  383. quarchpy/venv/Lib/site-packages/pip/_vendor/idna/__init__.py +2 -0
  384. quarchpy/venv/Lib/site-packages/pip/_vendor/idna/codec.py +118 -0
  385. quarchpy/venv/Lib/site-packages/pip/_vendor/idna/compat.py +12 -0
  386. quarchpy/venv/Lib/site-packages/pip/_vendor/idna/core.py +400 -0
  387. quarchpy/venv/Lib/site-packages/pip/_vendor/idna/idnadata.py +2050 -0
  388. quarchpy/venv/Lib/site-packages/pip/_vendor/idna/intranges.py +53 -0
  389. quarchpy/venv/Lib/site-packages/pip/_vendor/idna/package_data.py +2 -0
  390. quarchpy/venv/Lib/site-packages/pip/_vendor/idna/uts46data.py +8357 -0
  391. quarchpy/venv/Lib/site-packages/pip/_vendor/ipaddress.py +2420 -0
  392. quarchpy/venv/Lib/site-packages/pip/_vendor/msgpack/__init__.py +54 -0
  393. quarchpy/venv/Lib/site-packages/pip/_vendor/msgpack/_version.py +1 -0
  394. quarchpy/venv/Lib/site-packages/pip/_vendor/msgpack/exceptions.py +48 -0
  395. quarchpy/venv/Lib/site-packages/pip/_vendor/msgpack/ext.py +191 -0
  396. quarchpy/venv/Lib/site-packages/pip/_vendor/msgpack/fallback.py +1063 -0
  397. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/__about__.py +27 -0
  398. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/__init__.py +26 -0
  399. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/_compat.py +38 -0
  400. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/_structures.py +86 -0
  401. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/_typing.py +48 -0
  402. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/markers.py +328 -0
  403. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/requirements.py +151 -0
  404. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/specifiers.py +864 -0
  405. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/tags.py +852 -0
  406. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/utils.py +67 -0
  407. quarchpy/venv/Lib/site-packages/pip/_vendor/packaging/version.py +556 -0
  408. quarchpy/venv/Lib/site-packages/pip/_vendor/pep517/__init__.py +6 -0
  409. quarchpy/venv/Lib/site-packages/pip/_vendor/pep517/_in_process.py +280 -0
  410. quarchpy/venv/Lib/site-packages/pip/_vendor/pep517/build.py +124 -0
  411. quarchpy/venv/Lib/site-packages/pip/_vendor/pep517/check.py +203 -0
  412. quarchpy/venv/Lib/site-packages/pip/_vendor/pep517/colorlog.py +115 -0
  413. quarchpy/venv/Lib/site-packages/pip/_vendor/pep517/compat.py +34 -0
  414. quarchpy/venv/Lib/site-packages/pip/_vendor/pep517/dirtools.py +44 -0
  415. quarchpy/venv/Lib/site-packages/pip/_vendor/pep517/envbuild.py +167 -0
  416. quarchpy/venv/Lib/site-packages/pip/_vendor/pep517/meta.py +92 -0
  417. quarchpy/venv/Lib/site-packages/pip/_vendor/pep517/wrappers.py +327 -0
  418. quarchpy/venv/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py +3296 -0
  419. quarchpy/venv/Lib/site-packages/pip/_vendor/pkg_resources/py31compat.py +23 -0
  420. quarchpy/venv/Lib/site-packages/pip/_vendor/progress/__init__.py +177 -0
  421. quarchpy/venv/Lib/site-packages/pip/_vendor/progress/bar.py +91 -0
  422. quarchpy/venv/Lib/site-packages/pip/_vendor/progress/counter.py +41 -0
  423. quarchpy/venv/Lib/site-packages/pip/_vendor/progress/spinner.py +43 -0
  424. quarchpy/venv/Lib/site-packages/pip/_vendor/pyparsing.py +7107 -0
  425. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/__init__.py +144 -0
  426. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/__version__.py +14 -0
  427. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +42 -0
  428. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/adapters.py +533 -0
  429. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/api.py +161 -0
  430. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/auth.py +305 -0
  431. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/certs.py +18 -0
  432. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/compat.py +76 -0
  433. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/cookies.py +549 -0
  434. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/exceptions.py +123 -0
  435. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/help.py +119 -0
  436. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/hooks.py +34 -0
  437. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/models.py +956 -0
  438. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/packages.py +16 -0
  439. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/sessions.py +781 -0
  440. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/status_codes.py +123 -0
  441. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/structures.py +105 -0
  442. quarchpy/venv/Lib/site-packages/pip/_vendor/requests/utils.py +988 -0
  443. quarchpy/venv/Lib/site-packages/pip/_vendor/resolvelib/__init__.py +26 -0
  444. quarchpy/venv/Lib/site-packages/pip/_vendor/resolvelib/compat/__init__.py +0 -0
  445. quarchpy/venv/Lib/site-packages/pip/_vendor/resolvelib/compat/collections_abc.py +6 -0
  446. quarchpy/venv/Lib/site-packages/pip/_vendor/resolvelib/providers.py +119 -0
  447. quarchpy/venv/Lib/site-packages/pip/_vendor/resolvelib/reporters.py +37 -0
  448. quarchpy/venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers.py +454 -0
  449. quarchpy/venv/Lib/site-packages/pip/_vendor/resolvelib/structs.py +149 -0
  450. quarchpy/venv/Lib/site-packages/pip/_vendor/retrying.py +267 -0
  451. quarchpy/venv/Lib/site-packages/pip/_vendor/six.py +982 -0
  452. quarchpy/venv/Lib/site-packages/pip/_vendor/toml/__init__.py +25 -0
  453. quarchpy/venv/Lib/site-packages/pip/_vendor/toml/decoder.py +1057 -0
  454. quarchpy/venv/Lib/site-packages/pip/_vendor/toml/encoder.py +304 -0
  455. quarchpy/venv/Lib/site-packages/pip/_vendor/toml/ordered.py +15 -0
  456. quarchpy/venv/Lib/site-packages/pip/_vendor/toml/tz.py +24 -0
  457. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/__init__.py +85 -0
  458. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/_collections.py +337 -0
  459. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/_version.py +2 -0
  460. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/connection.py +535 -0
  461. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +1067 -0
  462. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
  463. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +36 -0
  464. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
  465. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +519 -0
  466. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +396 -0
  467. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py +314 -0
  468. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +121 -0
  469. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +509 -0
  470. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +920 -0
  471. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +216 -0
  472. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +313 -0
  473. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/fields.py +274 -0
  474. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/filepost.py +98 -0
  475. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/packages/__init__.py +5 -0
  476. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
  477. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +51 -0
  478. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/packages/six.py +1021 -0
  479. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/__init__.py +22 -0
  480. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/packages/ssl_match_hostname/_implementation.py +160 -0
  481. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +536 -0
  482. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/request.py +170 -0
  483. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/response.py +821 -0
  484. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py +49 -0
  485. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/connection.py +150 -0
  486. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py +56 -0
  487. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/queue.py +22 -0
  488. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/request.py +143 -0
  489. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/response.py +107 -0
  490. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +601 -0
  491. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +474 -0
  492. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py +221 -0
  493. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py +268 -0
  494. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py +430 -0
  495. quarchpy/venv/Lib/site-packages/pip/_vendor/urllib3/util/wait.py +153 -0
  496. quarchpy/venv/Lib/site-packages/pip/_vendor/vendor.txt +24 -0
  497. quarchpy/venv/Lib/site-packages/pip/_vendor/webencodings/__init__.py +342 -0
  498. quarchpy/venv/Lib/site-packages/pip/_vendor/webencodings/labels.py +231 -0
  499. quarchpy/venv/Lib/site-packages/pip/_vendor/webencodings/mklabels.py +59 -0
  500. quarchpy/venv/Lib/site-packages/pip/_vendor/webencodings/tests.py +153 -0
  501. quarchpy/venv/Lib/site-packages/pip/_vendor/webencodings/x_user_defined.py +325 -0
  502. quarchpy/venv/Lib/site-packages/pip-20.3.4.dist-info/INSTALLER +1 -0
  503. quarchpy/venv/Lib/site-packages/pip-20.3.4.dist-info/LICENSE.txt +20 -0
  504. quarchpy/venv/Lib/site-packages/pip-20.3.4.dist-info/METADATA +94 -0
  505. quarchpy/venv/Lib/site-packages/pip-20.3.4.dist-info/RECORD +812 -0
  506. quarchpy/venv/Lib/site-packages/pip-20.3.4.dist-info/WHEEL +6 -0
  507. quarchpy/venv/Lib/site-packages/pip-20.3.4.dist-info/entry_points.txt +5 -0
  508. quarchpy/venv/Lib/site-packages/pip-20.3.4.dist-info/top_level.txt +1 -0
  509. quarchpy/venv/Lib/site-packages/pip-20.3.4.virtualenv +0 -0
  510. quarchpy/venv/Lib/site-packages/pkg_resources/__init__.py +3296 -0
  511. quarchpy/venv/Lib/site-packages/pkg_resources/__init__.pyc +0 -0
  512. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/__init__.py +0 -0
  513. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/__init__.pyc +0 -0
  514. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/appdirs.py +608 -0
  515. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/appdirs.pyc +0 -0
  516. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/__about__.py +21 -0
  517. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/__about__.pyc +0 -0
  518. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/__init__.py +14 -0
  519. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/__init__.pyc +0 -0
  520. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/_compat.py +30 -0
  521. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/_compat.pyc +0 -0
  522. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/_structures.py +68 -0
  523. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/_structures.pyc +0 -0
  524. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/markers.py +301 -0
  525. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/markers.pyc +0 -0
  526. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/requirements.py +127 -0
  527. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/requirements.pyc +0 -0
  528. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/specifiers.py +774 -0
  529. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/specifiers.pyc +0 -0
  530. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/utils.py +14 -0
  531. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/version.py +393 -0
  532. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/packaging/version.pyc +0 -0
  533. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/pyparsing.py +5742 -0
  534. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/pyparsing.pyc +0 -0
  535. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/six.py +868 -0
  536. quarchpy/venv/Lib/site-packages/pkg_resources/_vendor/six.pyc +0 -0
  537. quarchpy/venv/Lib/site-packages/pkg_resources/extern/__init__.py +73 -0
  538. quarchpy/venv/Lib/site-packages/pkg_resources/extern/__init__.pyc +0 -0
  539. quarchpy/venv/Lib/site-packages/pkg_resources/py31compat.py +23 -0
  540. quarchpy/venv/Lib/site-packages/pkg_resources/py31compat.pyc +0 -0
  541. quarchpy/venv/Lib/site-packages/setuptools/__init__.py +245 -0
  542. quarchpy/venv/Lib/site-packages/setuptools/_deprecation_warning.py +7 -0
  543. quarchpy/venv/Lib/site-packages/setuptools/_imp.py +73 -0
  544. quarchpy/venv/Lib/site-packages/setuptools/_vendor/__init__.py +0 -0
  545. quarchpy/venv/Lib/site-packages/setuptools/_vendor/ordered_set.py +488 -0
  546. quarchpy/venv/Lib/site-packages/setuptools/_vendor/packaging/__about__.py +27 -0
  547. quarchpy/venv/Lib/site-packages/setuptools/_vendor/packaging/__init__.py +26 -0
  548. quarchpy/venv/Lib/site-packages/setuptools/_vendor/packaging/_compat.py +31 -0
  549. quarchpy/venv/Lib/site-packages/setuptools/_vendor/packaging/_structures.py +68 -0
  550. quarchpy/venv/Lib/site-packages/setuptools/_vendor/packaging/markers.py +296 -0
  551. quarchpy/venv/Lib/site-packages/setuptools/_vendor/packaging/requirements.py +138 -0
  552. quarchpy/venv/Lib/site-packages/setuptools/_vendor/packaging/specifiers.py +749 -0
  553. quarchpy/venv/Lib/site-packages/setuptools/_vendor/packaging/tags.py +404 -0
  554. quarchpy/venv/Lib/site-packages/setuptools/_vendor/packaging/utils.py +57 -0
  555. quarchpy/venv/Lib/site-packages/setuptools/_vendor/packaging/version.py +420 -0
  556. quarchpy/venv/Lib/site-packages/setuptools/_vendor/pyparsing.py +5742 -0
  557. quarchpy/venv/Lib/site-packages/setuptools/_vendor/six.py +868 -0
  558. quarchpy/venv/Lib/site-packages/setuptools/archive_util.py +173 -0
  559. quarchpy/venv/Lib/site-packages/setuptools/build_meta.py +264 -0
  560. quarchpy/venv/Lib/site-packages/setuptools/cli-32.exe +0 -0
  561. quarchpy/venv/Lib/site-packages/setuptools/cli-64.exe +0 -0
  562. quarchpy/venv/Lib/site-packages/setuptools/cli.exe +0 -0
  563. quarchpy/venv/Lib/site-packages/setuptools/command/__init__.py +17 -0
  564. quarchpy/venv/Lib/site-packages/setuptools/command/alias.py +80 -0
  565. quarchpy/venv/Lib/site-packages/setuptools/command/bdist_egg.py +502 -0
  566. quarchpy/venv/Lib/site-packages/setuptools/command/bdist_rpm.py +43 -0
  567. quarchpy/venv/Lib/site-packages/setuptools/command/bdist_wininst.py +21 -0
  568. quarchpy/venv/Lib/site-packages/setuptools/command/build_clib.py +98 -0
  569. quarchpy/venv/Lib/site-packages/setuptools/command/build_ext.py +327 -0
  570. quarchpy/venv/Lib/site-packages/setuptools/command/build_py.py +270 -0
  571. quarchpy/venv/Lib/site-packages/setuptools/command/develop.py +221 -0
  572. quarchpy/venv/Lib/site-packages/setuptools/command/dist_info.py +36 -0
  573. quarchpy/venv/Lib/site-packages/setuptools/command/easy_install.py +2347 -0
  574. quarchpy/venv/Lib/site-packages/setuptools/command/egg_info.py +717 -0
  575. quarchpy/venv/Lib/site-packages/setuptools/command/install.py +125 -0
  576. quarchpy/venv/Lib/site-packages/setuptools/command/install_egg_info.py +62 -0
  577. quarchpy/venv/Lib/site-packages/setuptools/command/install_lib.py +121 -0
  578. quarchpy/venv/Lib/site-packages/setuptools/command/install_scripts.py +65 -0
  579. quarchpy/venv/Lib/site-packages/setuptools/command/launcher manifest.xml +15 -0
  580. quarchpy/venv/Lib/site-packages/setuptools/command/py36compat.py +136 -0
  581. quarchpy/venv/Lib/site-packages/setuptools/command/register.py +18 -0
  582. quarchpy/venv/Lib/site-packages/setuptools/command/rotate.py +66 -0
  583. quarchpy/venv/Lib/site-packages/setuptools/command/saveopts.py +22 -0
  584. quarchpy/venv/Lib/site-packages/setuptools/command/sdist.py +252 -0
  585. quarchpy/venv/Lib/site-packages/setuptools/command/setopt.py +149 -0
  586. quarchpy/venv/Lib/site-packages/setuptools/command/test.py +279 -0
  587. quarchpy/venv/Lib/site-packages/setuptools/command/upload.py +17 -0
  588. quarchpy/venv/Lib/site-packages/setuptools/command/upload_docs.py +206 -0
  589. quarchpy/venv/Lib/site-packages/setuptools/config.py +659 -0
  590. quarchpy/venv/Lib/site-packages/setuptools/dep_util.py +23 -0
  591. quarchpy/venv/Lib/site-packages/setuptools/depends.py +176 -0
  592. quarchpy/venv/Lib/site-packages/setuptools/dist.py +1274 -0
  593. quarchpy/venv/Lib/site-packages/setuptools/errors.py +16 -0
  594. quarchpy/venv/Lib/site-packages/setuptools/extension.py +57 -0
  595. quarchpy/venv/Lib/site-packages/setuptools/extern/__init__.py +73 -0
  596. quarchpy/venv/Lib/site-packages/setuptools/glob.py +174 -0
  597. quarchpy/venv/Lib/site-packages/setuptools/gui-32.exe +0 -0
  598. quarchpy/venv/Lib/site-packages/setuptools/gui-64.exe +0 -0
  599. quarchpy/venv/Lib/site-packages/setuptools/gui.exe +0 -0
  600. quarchpy/venv/Lib/site-packages/setuptools/installer.py +150 -0
  601. quarchpy/venv/Lib/site-packages/setuptools/launch.py +35 -0
  602. quarchpy/venv/Lib/site-packages/setuptools/lib2to3_ex.py +62 -0
  603. quarchpy/venv/Lib/site-packages/setuptools/monkey.py +179 -0
  604. quarchpy/venv/Lib/site-packages/setuptools/msvc.py +1679 -0
  605. quarchpy/venv/Lib/site-packages/setuptools/namespaces.py +107 -0
  606. quarchpy/venv/Lib/site-packages/setuptools/package_index.py +1136 -0
  607. quarchpy/venv/Lib/site-packages/setuptools/py27compat.py +60 -0
  608. quarchpy/venv/Lib/site-packages/setuptools/py31compat.py +32 -0
  609. quarchpy/venv/Lib/site-packages/setuptools/py33compat.py +59 -0
  610. quarchpy/venv/Lib/site-packages/setuptools/py34compat.py +13 -0
  611. quarchpy/venv/Lib/site-packages/setuptools/sandbox.py +491 -0
  612. quarchpy/venv/Lib/site-packages/setuptools/script (dev).tmpl +6 -0
  613. quarchpy/venv/Lib/site-packages/setuptools/script.tmpl +3 -0
  614. quarchpy/venv/Lib/site-packages/setuptools/site-patch.py +74 -0
  615. quarchpy/venv/Lib/site-packages/setuptools/ssl_support.py +260 -0
  616. quarchpy/venv/Lib/site-packages/setuptools/unicode_utils.py +44 -0
  617. quarchpy/venv/Lib/site-packages/setuptools/version.py +6 -0
  618. quarchpy/venv/Lib/site-packages/setuptools/wheel.py +220 -0
  619. quarchpy/venv/Lib/site-packages/setuptools/windows_support.py +29 -0
  620. quarchpy/venv/Lib/site-packages/setuptools-44.1.1.dist-info/INSTALLER +1 -0
  621. quarchpy/venv/Lib/site-packages/setuptools-44.1.1.dist-info/LICENSE +19 -0
  622. quarchpy/venv/Lib/site-packages/setuptools-44.1.1.dist-info/METADATA +86 -0
  623. quarchpy/venv/Lib/site-packages/setuptools-44.1.1.dist-info/RECORD +207 -0
  624. quarchpy/venv/Lib/site-packages/setuptools-44.1.1.dist-info/WHEEL +6 -0
  625. quarchpy/venv/Lib/site-packages/setuptools-44.1.1.dist-info/dependency_links.txt +2 -0
  626. quarchpy/venv/Lib/site-packages/setuptools-44.1.1.dist-info/entry_points.txt +69 -0
  627. quarchpy/venv/Lib/site-packages/setuptools-44.1.1.dist-info/top_level.txt +3 -0
  628. quarchpy/venv/Lib/site-packages/setuptools-44.1.1.dist-info/zip-safe +1 -0
  629. quarchpy/venv/Lib/site-packages/setuptools-44.1.1.virtualenv +0 -0
  630. quarchpy/venv/Lib/site-packages/wheel/__init__.py +1 -0
  631. quarchpy/venv/Lib/site-packages/wheel/__main__.py +19 -0
  632. quarchpy/venv/Lib/site-packages/wheel/bdist_wheel.py +492 -0
  633. quarchpy/venv/Lib/site-packages/wheel/cli/__init__.py +88 -0
  634. quarchpy/venv/Lib/site-packages/wheel/cli/convert.py +269 -0
  635. quarchpy/venv/Lib/site-packages/wheel/cli/pack.py +82 -0
  636. quarchpy/venv/Lib/site-packages/wheel/cli/unpack.py +25 -0
  637. quarchpy/venv/Lib/site-packages/wheel/macosx_libfile.py +428 -0
  638. quarchpy/venv/Lib/site-packages/wheel/metadata.py +133 -0
  639. quarchpy/venv/Lib/site-packages/wheel/pkginfo.py +43 -0
  640. quarchpy/venv/Lib/site-packages/wheel/util.py +46 -0
  641. quarchpy/venv/Lib/site-packages/wheel/vendored/__init__.py +0 -0
  642. quarchpy/venv/Lib/site-packages/wheel/vendored/packaging/__init__.py +0 -0
  643. quarchpy/venv/Lib/site-packages/wheel/vendored/packaging/_typing.py +48 -0
  644. quarchpy/venv/Lib/site-packages/wheel/vendored/packaging/tags.py +866 -0
  645. quarchpy/venv/Lib/site-packages/wheel/wheelfile.py +181 -0
  646. quarchpy/venv/Lib/site-packages/wheel-0.37.1.dist-info/INSTALLER +1 -0
  647. quarchpy/venv/Lib/site-packages/wheel-0.37.1.dist-info/LICENSE.txt +22 -0
  648. quarchpy/venv/Lib/site-packages/wheel-0.37.1.dist-info/METADATA +69 -0
  649. quarchpy/venv/Lib/site-packages/wheel-0.37.1.dist-info/RECORD +49 -0
  650. quarchpy/venv/Lib/site-packages/wheel-0.37.1.dist-info/WHEEL +6 -0
  651. quarchpy/venv/Lib/site-packages/wheel-0.37.1.dist-info/entry_points.txt +6 -0
  652. quarchpy/venv/Lib/site-packages/wheel-0.37.1.dist-info/top_level.txt +1 -0
  653. quarchpy/venv/Lib/site-packages/wheel-0.37.1.virtualenv +0 -0
  654. quarchpy/venv/Lib/site.py +190 -0
  655. quarchpy/venv/Lib/site.pyc +0 -0
  656. quarchpy/venv/Scripts/activate +83 -0
  657. quarchpy/venv/Scripts/activate.bat +39 -0
  658. quarchpy/venv/Scripts/activate.fish +100 -0
  659. quarchpy/venv/Scripts/activate.nu +41 -0
  660. quarchpy/venv/Scripts/activate.ps1 +60 -0
  661. quarchpy/venv/Scripts/activate_this.py +32 -0
  662. quarchpy/venv/Scripts/deactivate.bat +19 -0
  663. quarchpy/venv/Scripts/deactivate.nu +11 -0
  664. quarchpy/venv/Scripts/easy_install-2.7.exe +0 -0
  665. quarchpy/venv/Scripts/easy_install.exe +0 -0
  666. quarchpy/venv/Scripts/easy_install2.7.exe +0 -0
  667. quarchpy/venv/Scripts/easy_install2.exe +0 -0
  668. quarchpy/venv/Scripts/pip-2.7.exe +0 -0
  669. quarchpy/venv/Scripts/pip.exe +0 -0
  670. quarchpy/venv/Scripts/pip2.7.exe +0 -0
  671. quarchpy/venv/Scripts/pip2.exe +0 -0
  672. quarchpy/venv/Scripts/pydoc.bat +1 -0
  673. quarchpy/venv/Scripts/python.exe +0 -0
  674. quarchpy/venv/Scripts/python27.dll +0 -0
  675. quarchpy/venv/Scripts/pythonw.exe +0 -0
  676. quarchpy/venv/Scripts/wheel-2.7.exe +0 -0
  677. quarchpy/venv/Scripts/wheel.exe +0 -0
  678. quarchpy/venv/Scripts/wheel2.7.exe +0 -0
  679. quarchpy/venv/Scripts/wheel2.exe +0 -0
  680. quarchpy/venv/libs/_bsddb.lib +0 -0
  681. quarchpy/venv/libs/_ctypes.lib +0 -0
  682. quarchpy/venv/libs/_ctypes_test.lib +0 -0
  683. quarchpy/venv/libs/_elementtree.lib +0 -0
  684. quarchpy/venv/libs/_hashlib.lib +0 -0
  685. quarchpy/venv/libs/_msi.lib +0 -0
  686. quarchpy/venv/libs/_multiprocessing.lib +0 -0
  687. quarchpy/venv/libs/_socket.lib +0 -0
  688. quarchpy/venv/libs/_sqlite3.lib +0 -0
  689. quarchpy/venv/libs/_ssl.lib +0 -0
  690. quarchpy/venv/libs/_testcapi.lib +0 -0
  691. quarchpy/venv/libs/_tkinter.lib +0 -0
  692. quarchpy/venv/libs/bz2.lib +0 -0
  693. quarchpy/venv/libs/libpython27.a +0 -0
  694. quarchpy/venv/libs/pyexpat.lib +0 -0
  695. quarchpy/venv/libs/python27.lib +0 -0
  696. quarchpy/venv/libs/select.lib +0 -0
  697. quarchpy/venv/libs/unicodedata.lib +0 -0
  698. quarchpy/venv/libs/winsound.lib +0 -0
  699. quarchpy/venv/pyvenv.cfg +8 -0
  700. {quarchpy-2.1.14.dev4.dist-info → quarchpy-2.1.14.dev5.dist-info}/METADATA +1 -1
  701. quarchpy-2.1.14.dev5.dist-info/RECORD +1219 -0
  702. quarchpy/connection_specific/QPS/qis/qis_lib/CInterface-1.7.02.jar +0 -0
  703. quarchpy/connection_specific/QPS/qis/qis_lib/CInterface-1.7.8.jar +0 -0
  704. quarchpy/connection_specific/QPS/qis/qis_lib/Collections-1.2.jar +0 -0
  705. quarchpy/connection_specific/QPS/qis/qis_lib/Desktop-1.0.jar +0 -0
  706. quarchpy/connection_specific/QPS/qis/qis_lib/Executor-3.11.jar +0 -0
  707. quarchpy/connection_specific/QPS/qis/qis_lib/JNA-1.0.jar +0 -0
  708. quarchpy/connection_specific/QPS/qis/qis_lib/OS-1.6.jar +0 -0
  709. quarchpy/connection_specific/QPS/qis/qis_lib/QuarchCommon-0.2.9.jar +0 -0
  710. quarchpy/connection_specific/QPS/qis/qis_lib/SystemTray-4.2.1.jar +0 -0
  711. quarchpy/connection_specific/QPS/qis/qis_lib/Updates-1.1.jar +0 -0
  712. quarchpy/connection_specific/QPS/qis/qis_lib/Utilities-1.39.jar +0 -0
  713. quarchpy/connection_specific/QPS/qis/qis_lib/commons-csv-1.8.jar +0 -0
  714. quarchpy/connection_specific/QPS/qis/qis_lib/javassist-3.29.2-GA.jar +0 -0
  715. quarchpy/connection_specific/QPS/qis/qis_lib/jna-jpms-5.12.1.jar +0 -0
  716. quarchpy/connection_specific/QPS/qis/qis_lib/jna-platform-jpms-5.12.1.jar +0 -0
  717. quarchpy/connection_specific/QPS/qis/qis_lib/kotlin-stdlib-1.7.22.jar +0 -0
  718. quarchpy/connection_specific/QPS/qis/qis_lib/slf4j-api-2.0.9.jar +0 -0
  719. quarchpy/connection_specific/QPS/qis/qis_lib/slf4j-simple-2.0.9.jar +0 -0
  720. quarchpy/connection_specific/QPS/qis/resources/filters/filters.csv +0 -1004
  721. quarchpy/connection_specific/QPS/qps_lib/QuarchCommon-0.2.9.jar +0 -0
  722. quarchpy/connection_specific/QPS/qps_lib/commons-lang3-3.12.0.jar +0 -0
  723. quarchpy/connection_specific/QPS/qps_lib/opencsv-5.9.jar +0 -0
  724. quarchpy/connection_specific/QPS/qps_lib/qis-1.39.4.jar +0 -0
  725. quarchpy/connection_specific/QPS/qps_lib/qis-1.39.5.jar +0 -0
  726. quarchpy/connection_specific/QPS/qps_lib/qis-1.39.6.jar +0 -0
  727. quarchpy/connection_specific/QPS/qps_lib/qis-1.39.7.jar +0 -0
  728. quarchpy-2.1.14.dev4.dist-info/RECORD +0 -561
  729. {quarchpy-2.1.14.dev4.dist-info → quarchpy-2.1.14.dev5.dist-info}/WHEEL +0 -0
  730. {quarchpy-2.1.14.dev4.dist-info → quarchpy-2.1.14.dev5.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1136 @@
1
+ """PyPI and direct package downloading"""
2
+ import sys
3
+ import os
4
+ import re
5
+ import shutil
6
+ import socket
7
+ import base64
8
+ import hashlib
9
+ import itertools
10
+ import warnings
11
+ from functools import wraps
12
+
13
+ from setuptools.extern import six
14
+ from setuptools.extern.six.moves import urllib, http_client, configparser, map
15
+
16
+ import setuptools
17
+ from pkg_resources import (
18
+ CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST,
19
+ Environment, find_distributions, safe_name, safe_version,
20
+ to_filename, Requirement, DEVELOP_DIST, EGG_DIST,
21
+ )
22
+ from setuptools import ssl_support
23
+ from distutils import log
24
+ from distutils.errors import DistutilsError
25
+ from fnmatch import translate
26
+ from setuptools.py27compat import get_all_headers
27
+ from setuptools.py33compat import unescape
28
+ from setuptools.wheel import Wheel
29
+
30
+ __metaclass__ = type
31
+
32
+ EGG_FRAGMENT = re.compile(r'^egg=([-A-Za-z0-9_.+!]+)$')
33
+ HREF = re.compile(r"""href\s*=\s*['"]?([^'"> ]+)""", re.I)
34
+ PYPI_MD5 = re.compile(
35
+ r'<a href="([^"#]+)">([^<]+)</a>\n\s+\(<a (?:title="MD5 hash"\n\s+)'
36
+ r'href="[^?]+\?:action=show_md5&amp;digest=([0-9a-f]{32})">md5</a>\)'
37
+ )
38
+ URL_SCHEME = re.compile('([-+.a-z0-9]{2,}):', re.I).match
39
+ EXTENSIONS = ".tar.gz .tar.bz2 .tar .zip .tgz".split()
40
+
41
+ __all__ = [
42
+ 'PackageIndex', 'distros_for_url', 'parse_bdist_wininst',
43
+ 'interpret_distro_name',
44
+ ]
45
+
46
+ _SOCKET_TIMEOUT = 15
47
+
48
+ _tmpl = "setuptools/{setuptools.__version__} Python-urllib/{py_major}"
49
+ user_agent = _tmpl.format(py_major='{}.{}'.format(*sys.version_info), setuptools=setuptools)
50
+
51
+
52
+ def parse_requirement_arg(spec):
53
+ try:
54
+ return Requirement.parse(spec)
55
+ except ValueError:
56
+ raise DistutilsError(
57
+ "Not a URL, existing file, or requirement spec: %r" % (spec,)
58
+ )
59
+
60
+
61
+ def parse_bdist_wininst(name):
62
+ """Return (base,pyversion) or (None,None) for possible .exe name"""
63
+
64
+ lower = name.lower()
65
+ base, py_ver, plat = None, None, None
66
+
67
+ if lower.endswith('.exe'):
68
+ if lower.endswith('.win32.exe'):
69
+ base = name[:-10]
70
+ plat = 'win32'
71
+ elif lower.startswith('.win32-py', -16):
72
+ py_ver = name[-7:-4]
73
+ base = name[:-16]
74
+ plat = 'win32'
75
+ elif lower.endswith('.win-amd64.exe'):
76
+ base = name[:-14]
77
+ plat = 'win-amd64'
78
+ elif lower.startswith('.win-amd64-py', -20):
79
+ py_ver = name[-7:-4]
80
+ base = name[:-20]
81
+ plat = 'win-amd64'
82
+ return base, py_ver, plat
83
+
84
+
85
+ def egg_info_for_url(url):
86
+ parts = urllib.parse.urlparse(url)
87
+ scheme, server, path, parameters, query, fragment = parts
88
+ base = urllib.parse.unquote(path.split('/')[-1])
89
+ if server == 'sourceforge.net' and base == 'download': # XXX Yuck
90
+ base = urllib.parse.unquote(path.split('/')[-2])
91
+ if '#' in base:
92
+ base, fragment = base.split('#', 1)
93
+ return base, fragment
94
+
95
+
96
+ def distros_for_url(url, metadata=None):
97
+ """Yield egg or source distribution objects that might be found at a URL"""
98
+ base, fragment = egg_info_for_url(url)
99
+ for dist in distros_for_location(url, base, metadata):
100
+ yield dist
101
+ if fragment:
102
+ match = EGG_FRAGMENT.match(fragment)
103
+ if match:
104
+ for dist in interpret_distro_name(
105
+ url, match.group(1), metadata, precedence=CHECKOUT_DIST
106
+ ):
107
+ yield dist
108
+
109
+
110
+ def distros_for_location(location, basename, metadata=None):
111
+ """Yield egg or source distribution objects based on basename"""
112
+ if basename.endswith('.egg.zip'):
113
+ basename = basename[:-4] # strip the .zip
114
+ if basename.endswith('.egg') and '-' in basename:
115
+ # only one, unambiguous interpretation
116
+ return [Distribution.from_location(location, basename, metadata)]
117
+ if basename.endswith('.whl') and '-' in basename:
118
+ wheel = Wheel(basename)
119
+ if not wheel.is_compatible():
120
+ return []
121
+ return [Distribution(
122
+ location=location,
123
+ project_name=wheel.project_name,
124
+ version=wheel.version,
125
+ # Increase priority over eggs.
126
+ precedence=EGG_DIST + 1,
127
+ )]
128
+ if basename.endswith('.exe'):
129
+ win_base, py_ver, platform = parse_bdist_wininst(basename)
130
+ if win_base is not None:
131
+ return interpret_distro_name(
132
+ location, win_base, metadata, py_ver, BINARY_DIST, platform
133
+ )
134
+ # Try source distro extensions (.zip, .tgz, etc.)
135
+ #
136
+ for ext in EXTENSIONS:
137
+ if basename.endswith(ext):
138
+ basename = basename[:-len(ext)]
139
+ return interpret_distro_name(location, basename, metadata)
140
+ return [] # no extension matched
141
+
142
+
143
+ def distros_for_filename(filename, metadata=None):
144
+ """Yield possible egg or source distribution objects based on a filename"""
145
+ return distros_for_location(
146
+ normalize_path(filename), os.path.basename(filename), metadata
147
+ )
148
+
149
+
150
+ def interpret_distro_name(
151
+ location, basename, metadata, py_version=None, precedence=SOURCE_DIST,
152
+ platform=None
153
+ ):
154
+ """Generate alternative interpretations of a source distro name
155
+
156
+ Note: if `location` is a filesystem filename, you should call
157
+ ``pkg_resources.normalize_path()`` on it before passing it to this
158
+ routine!
159
+ """
160
+ # Generate alternative interpretations of a source distro name
161
+ # Because some packages are ambiguous as to name/versions split
162
+ # e.g. "adns-python-1.1.0", "egenix-mx-commercial", etc.
163
+ # So, we generate each possible interepretation (e.g. "adns, python-1.1.0"
164
+ # "adns-python, 1.1.0", and "adns-python-1.1.0, no version"). In practice,
165
+ # the spurious interpretations should be ignored, because in the event
166
+ # there's also an "adns" package, the spurious "python-1.1.0" version will
167
+ # compare lower than any numeric version number, and is therefore unlikely
168
+ # to match a request for it. It's still a potential problem, though, and
169
+ # in the long run PyPI and the distutils should go for "safe" names and
170
+ # versions in distribution archive names (sdist and bdist).
171
+
172
+ parts = basename.split('-')
173
+ if not py_version and any(re.match(r'py\d\.\d$', p) for p in parts[2:]):
174
+ # it is a bdist_dumb, not an sdist -- bail out
175
+ return
176
+
177
+ for p in range(1, len(parts) + 1):
178
+ yield Distribution(
179
+ location, metadata, '-'.join(parts[:p]), '-'.join(parts[p:]),
180
+ py_version=py_version, precedence=precedence,
181
+ platform=platform
182
+ )
183
+
184
+
185
+ # From Python 2.7 docs
186
+ def unique_everseen(iterable, key=None):
187
+ "List unique elements, preserving order. Remember all elements ever seen."
188
+ # unique_everseen('AAAABBBCCDAABBB') --> A B C D
189
+ # unique_everseen('ABBCcAD', str.lower) --> A B C D
190
+ seen = set()
191
+ seen_add = seen.add
192
+ if key is None:
193
+ for element in six.moves.filterfalse(seen.__contains__, iterable):
194
+ seen_add(element)
195
+ yield element
196
+ else:
197
+ for element in iterable:
198
+ k = key(element)
199
+ if k not in seen:
200
+ seen_add(k)
201
+ yield element
202
+
203
+
204
+ def unique_values(func):
205
+ """
206
+ Wrap a function returning an iterable such that the resulting iterable
207
+ only ever yields unique items.
208
+ """
209
+
210
+ @wraps(func)
211
+ def wrapper(*args, **kwargs):
212
+ return unique_everseen(func(*args, **kwargs))
213
+
214
+ return wrapper
215
+
216
+
217
+ REL = re.compile(r"""<([^>]*\srel\s*=\s*['"]?([^'">]+)[^>]*)>""", re.I)
218
+ # this line is here to fix emacs' cruddy broken syntax highlighting
219
+
220
+
221
+ @unique_values
222
+ def find_external_links(url, page):
223
+ """Find rel="homepage" and rel="download" links in `page`, yielding URLs"""
224
+
225
+ for match in REL.finditer(page):
226
+ tag, rel = match.groups()
227
+ rels = set(map(str.strip, rel.lower().split(',')))
228
+ if 'homepage' in rels or 'download' in rels:
229
+ for match in HREF.finditer(tag):
230
+ yield urllib.parse.urljoin(url, htmldecode(match.group(1)))
231
+
232
+ for tag in ("<th>Home Page", "<th>Download URL"):
233
+ pos = page.find(tag)
234
+ if pos != -1:
235
+ match = HREF.search(page, pos)
236
+ if match:
237
+ yield urllib.parse.urljoin(url, htmldecode(match.group(1)))
238
+
239
+
240
+ class ContentChecker:
241
+ """
242
+ A null content checker that defines the interface for checking content
243
+ """
244
+
245
+ def feed(self, block):
246
+ """
247
+ Feed a block of data to the hash.
248
+ """
249
+ return
250
+
251
+ def is_valid(self):
252
+ """
253
+ Check the hash. Return False if validation fails.
254
+ """
255
+ return True
256
+
257
+ def report(self, reporter, template):
258
+ """
259
+ Call reporter with information about the checker (hash name)
260
+ substituted into the template.
261
+ """
262
+ return
263
+
264
+
265
+ class HashChecker(ContentChecker):
266
+ pattern = re.compile(
267
+ r'(?P<hash_name>sha1|sha224|sha384|sha256|sha512|md5)='
268
+ r'(?P<expected>[a-f0-9]+)'
269
+ )
270
+
271
+ def __init__(self, hash_name, expected):
272
+ self.hash_name = hash_name
273
+ self.hash = hashlib.new(hash_name)
274
+ self.expected = expected
275
+
276
+ @classmethod
277
+ def from_url(cls, url):
278
+ "Construct a (possibly null) ContentChecker from a URL"
279
+ fragment = urllib.parse.urlparse(url)[-1]
280
+ if not fragment:
281
+ return ContentChecker()
282
+ match = cls.pattern.search(fragment)
283
+ if not match:
284
+ return ContentChecker()
285
+ return cls(**match.groupdict())
286
+
287
+ def feed(self, block):
288
+ self.hash.update(block)
289
+
290
+ def is_valid(self):
291
+ return self.hash.hexdigest() == self.expected
292
+
293
+ def report(self, reporter, template):
294
+ msg = template % self.hash_name
295
+ return reporter(msg)
296
+
297
+
298
+ class PackageIndex(Environment):
299
+ """A distribution index that scans web pages for download URLs"""
300
+
301
+ def __init__(
302
+ self, index_url="https://pypi.org/simple/", hosts=('*',),
303
+ ca_bundle=None, verify_ssl=True, *args, **kw
304
+ ):
305
+ Environment.__init__(self, *args, **kw)
306
+ self.index_url = index_url + "/" [:not index_url.endswith('/')]
307
+ self.scanned_urls = {}
308
+ self.fetched_urls = {}
309
+ self.package_pages = {}
310
+ self.allows = re.compile('|'.join(map(translate, hosts))).match
311
+ self.to_scan = []
312
+ use_ssl = (
313
+ verify_ssl
314
+ and ssl_support.is_available
315
+ and (ca_bundle or ssl_support.find_ca_bundle())
316
+ )
317
+ if use_ssl:
318
+ self.opener = ssl_support.opener_for(ca_bundle)
319
+ else:
320
+ self.opener = urllib.request.urlopen
321
+
322
+ def process_url(self, url, retrieve=False):
323
+ """Evaluate a URL as a possible download, and maybe retrieve it"""
324
+ if url in self.scanned_urls and not retrieve:
325
+ return
326
+ self.scanned_urls[url] = True
327
+ if not URL_SCHEME(url):
328
+ self.process_filename(url)
329
+ return
330
+ else:
331
+ dists = list(distros_for_url(url))
332
+ if dists:
333
+ if not self.url_ok(url):
334
+ return
335
+ self.debug("Found link: %s", url)
336
+
337
+ if dists or not retrieve or url in self.fetched_urls:
338
+ list(map(self.add, dists))
339
+ return # don't need the actual page
340
+
341
+ if not self.url_ok(url):
342
+ self.fetched_urls[url] = True
343
+ return
344
+
345
+ self.info("Reading %s", url)
346
+ self.fetched_urls[url] = True # prevent multiple fetch attempts
347
+ tmpl = "Download error on %s: %%s -- Some packages may not be found!"
348
+ f = self.open_url(url, tmpl % url)
349
+ if f is None:
350
+ return
351
+ self.fetched_urls[f.url] = True
352
+ if 'html' not in f.headers.get('content-type', '').lower():
353
+ f.close() # not html, we can't process it
354
+ return
355
+
356
+ base = f.url # handle redirects
357
+ page = f.read()
358
+ if not isinstance(page, str):
359
+ # In Python 3 and got bytes but want str.
360
+ if isinstance(f, urllib.error.HTTPError):
361
+ # Errors have no charset, assume latin1:
362
+ charset = 'latin-1'
363
+ else:
364
+ charset = f.headers.get_param('charset') or 'latin-1'
365
+ page = page.decode(charset, "ignore")
366
+ f.close()
367
+ for match in HREF.finditer(page):
368
+ link = urllib.parse.urljoin(base, htmldecode(match.group(1)))
369
+ self.process_url(link)
370
+ if url.startswith(self.index_url) and getattr(f, 'code', None) != 404:
371
+ page = self.process_index(url, page)
372
+
373
+ def process_filename(self, fn, nested=False):
374
+ # process filenames or directories
375
+ if not os.path.exists(fn):
376
+ self.warn("Not found: %s", fn)
377
+ return
378
+
379
+ if os.path.isdir(fn) and not nested:
380
+ path = os.path.realpath(fn)
381
+ for item in os.listdir(path):
382
+ self.process_filename(os.path.join(path, item), True)
383
+
384
+ dists = distros_for_filename(fn)
385
+ if dists:
386
+ self.debug("Found: %s", fn)
387
+ list(map(self.add, dists))
388
+
389
+ def url_ok(self, url, fatal=False):
390
+ s = URL_SCHEME(url)
391
+ is_file = s and s.group(1).lower() == 'file'
392
+ if is_file or self.allows(urllib.parse.urlparse(url)[1]):
393
+ return True
394
+ msg = (
395
+ "\nNote: Bypassing %s (disallowed host; see "
396
+ "http://bit.ly/2hrImnY for details).\n")
397
+ if fatal:
398
+ raise DistutilsError(msg % url)
399
+ else:
400
+ self.warn(msg, url)
401
+
402
+ def scan_egg_links(self, search_path):
403
+ dirs = filter(os.path.isdir, search_path)
404
+ egg_links = (
405
+ (path, entry)
406
+ for path in dirs
407
+ for entry in os.listdir(path)
408
+ if entry.endswith('.egg-link')
409
+ )
410
+ list(itertools.starmap(self.scan_egg_link, egg_links))
411
+
412
+ def scan_egg_link(self, path, entry):
413
+ with open(os.path.join(path, entry)) as raw_lines:
414
+ # filter non-empty lines
415
+ lines = list(filter(None, map(str.strip, raw_lines)))
416
+
417
+ if len(lines) != 2:
418
+ # format is not recognized; punt
419
+ return
420
+
421
+ egg_path, setup_path = lines
422
+
423
+ for dist in find_distributions(os.path.join(path, egg_path)):
424
+ dist.location = os.path.join(path, *lines)
425
+ dist.precedence = SOURCE_DIST
426
+ self.add(dist)
427
+
428
+ def process_index(self, url, page):
429
+ """Process the contents of a PyPI page"""
430
+
431
+ def scan(link):
432
+ # Process a URL to see if it's for a package page
433
+ if link.startswith(self.index_url):
434
+ parts = list(map(
435
+ urllib.parse.unquote, link[len(self.index_url):].split('/')
436
+ ))
437
+ if len(parts) == 2 and '#' not in parts[1]:
438
+ # it's a package page, sanitize and index it
439
+ pkg = safe_name(parts[0])
440
+ ver = safe_version(parts[1])
441
+ self.package_pages.setdefault(pkg.lower(), {})[link] = True
442
+ return to_filename(pkg), to_filename(ver)
443
+ return None, None
444
+
445
+ # process an index page into the package-page index
446
+ for match in HREF.finditer(page):
447
+ try:
448
+ scan(urllib.parse.urljoin(url, htmldecode(match.group(1))))
449
+ except ValueError:
450
+ pass
451
+
452
+ pkg, ver = scan(url) # ensure this page is in the page index
453
+ if pkg:
454
+ # process individual package page
455
+ for new_url in find_external_links(url, page):
456
+ # Process the found URL
457
+ base, frag = egg_info_for_url(new_url)
458
+ if base.endswith('.py') and not frag:
459
+ if ver:
460
+ new_url += '#egg=%s-%s' % (pkg, ver)
461
+ else:
462
+ self.need_version_info(url)
463
+ self.scan_url(new_url)
464
+
465
+ return PYPI_MD5.sub(
466
+ lambda m: '<a href="%s#md5=%s">%s</a>' % m.group(1, 3, 2), page
467
+ )
468
+ else:
469
+ return "" # no sense double-scanning non-package pages
470
+
471
+ def need_version_info(self, url):
472
+ self.scan_all(
473
+ "Page at %s links to .py file(s) without version info; an index "
474
+ "scan is required.", url
475
+ )
476
+
477
+ def scan_all(self, msg=None, *args):
478
+ if self.index_url not in self.fetched_urls:
479
+ if msg:
480
+ self.warn(msg, *args)
481
+ self.info(
482
+ "Scanning index of all packages (this may take a while)"
483
+ )
484
+ self.scan_url(self.index_url)
485
+
486
+ def find_packages(self, requirement):
487
+ self.scan_url(self.index_url + requirement.unsafe_name + '/')
488
+
489
+ if not self.package_pages.get(requirement.key):
490
+ # Fall back to safe version of the name
491
+ self.scan_url(self.index_url + requirement.project_name + '/')
492
+
493
+ if not self.package_pages.get(requirement.key):
494
+ # We couldn't find the target package, so search the index page too
495
+ self.not_found_in_index(requirement)
496
+
497
+ for url in list(self.package_pages.get(requirement.key, ())):
498
+ # scan each page that might be related to the desired package
499
+ self.scan_url(url)
500
+
501
+ def obtain(self, requirement, installer=None):
502
+ self.prescan()
503
+ self.find_packages(requirement)
504
+ for dist in self[requirement.key]:
505
+ if dist in requirement:
506
+ return dist
507
+ self.debug("%s does not match %s", requirement, dist)
508
+ return super(PackageIndex, self).obtain(requirement, installer)
509
+
510
+ def check_hash(self, checker, filename, tfp):
511
+ """
512
+ checker is a ContentChecker
513
+ """
514
+ checker.report(
515
+ self.debug,
516
+ "Validating %%s checksum for %s" % filename)
517
+ if not checker.is_valid():
518
+ tfp.close()
519
+ os.unlink(filename)
520
+ raise DistutilsError(
521
+ "%s validation failed for %s; "
522
+ "possible download problem?"
523
+ % (checker.hash.name, os.path.basename(filename))
524
+ )
525
+
526
+ def add_find_links(self, urls):
527
+ """Add `urls` to the list that will be prescanned for searches"""
528
+ for url in urls:
529
+ if (
530
+ self.to_scan is None # if we have already "gone online"
531
+ or not URL_SCHEME(url) # or it's a local file/directory
532
+ or url.startswith('file:')
533
+ or list(distros_for_url(url)) # or a direct package link
534
+ ):
535
+ # then go ahead and process it now
536
+ self.scan_url(url)
537
+ else:
538
+ # otherwise, defer retrieval till later
539
+ self.to_scan.append(url)
540
+
541
+ def prescan(self):
542
+ """Scan urls scheduled for prescanning (e.g. --find-links)"""
543
+ if self.to_scan:
544
+ list(map(self.scan_url, self.to_scan))
545
+ self.to_scan = None # from now on, go ahead and process immediately
546
+
547
+ def not_found_in_index(self, requirement):
548
+ if self[requirement.key]: # we've seen at least one distro
549
+ meth, msg = self.info, "Couldn't retrieve index page for %r"
550
+ else: # no distros seen for this name, might be misspelled
551
+ meth, msg = (
552
+ self.warn,
553
+ "Couldn't find index page for %r (maybe misspelled?)")
554
+ meth(msg, requirement.unsafe_name)
555
+ self.scan_all()
556
+
557
+ def download(self, spec, tmpdir):
558
+ """Locate and/or download `spec` to `tmpdir`, returning a local path
559
+
560
+ `spec` may be a ``Requirement`` object, or a string containing a URL,
561
+ an existing local filename, or a project/version requirement spec
562
+ (i.e. the string form of a ``Requirement`` object). If it is the URL
563
+ of a .py file with an unambiguous ``#egg=name-version`` tag (i.e., one
564
+ that escapes ``-`` as ``_`` throughout), a trivial ``setup.py`` is
565
+ automatically created alongside the downloaded file.
566
+
567
+ If `spec` is a ``Requirement`` object or a string containing a
568
+ project/version requirement spec, this method returns the location of
569
+ a matching distribution (possibly after downloading it to `tmpdir`).
570
+ If `spec` is a locally existing file or directory name, it is simply
571
+ returned unchanged. If `spec` is a URL, it is downloaded to a subpath
572
+ of `tmpdir`, and the local filename is returned. Various errors may be
573
+ raised if a problem occurs during downloading.
574
+ """
575
+ if not isinstance(spec, Requirement):
576
+ scheme = URL_SCHEME(spec)
577
+ if scheme:
578
+ # It's a url, download it to tmpdir
579
+ found = self._download_url(scheme.group(1), spec, tmpdir)
580
+ base, fragment = egg_info_for_url(spec)
581
+ if base.endswith('.py'):
582
+ found = self.gen_setup(found, fragment, tmpdir)
583
+ return found
584
+ elif os.path.exists(spec):
585
+ # Existing file or directory, just return it
586
+ return spec
587
+ else:
588
+ spec = parse_requirement_arg(spec)
589
+ return getattr(self.fetch_distribution(spec, tmpdir), 'location', None)
590
+
591
+ def fetch_distribution(
592
+ self, requirement, tmpdir, force_scan=False, source=False,
593
+ develop_ok=False, local_index=None):
594
+ """Obtain a distribution suitable for fulfilling `requirement`
595
+
596
+ `requirement` must be a ``pkg_resources.Requirement`` instance.
597
+ If necessary, or if the `force_scan` flag is set, the requirement is
598
+ searched for in the (online) package index as well as the locally
599
+ installed packages. If a distribution matching `requirement` is found,
600
+ the returned distribution's ``location`` is the value you would have
601
+ gotten from calling the ``download()`` method with the matching
602
+ distribution's URL or filename. If no matching distribution is found,
603
+ ``None`` is returned.
604
+
605
+ If the `source` flag is set, only source distributions and source
606
+ checkout links will be considered. Unless the `develop_ok` flag is
607
+ set, development and system eggs (i.e., those using the ``.egg-info``
608
+ format) will be ignored.
609
+ """
610
+ # process a Requirement
611
+ self.info("Searching for %s", requirement)
612
+ skipped = {}
613
+ dist = None
614
+
615
+ def find(req, env=None):
616
+ if env is None:
617
+ env = self
618
+ # Find a matching distribution; may be called more than once
619
+
620
+ for dist in env[req.key]:
621
+
622
+ if dist.precedence == DEVELOP_DIST and not develop_ok:
623
+ if dist not in skipped:
624
+ self.warn(
625
+ "Skipping development or system egg: %s", dist,
626
+ )
627
+ skipped[dist] = 1
628
+ continue
629
+
630
+ test = (
631
+ dist in req
632
+ and (dist.precedence <= SOURCE_DIST or not source)
633
+ )
634
+ if test:
635
+ loc = self.download(dist.location, tmpdir)
636
+ dist.download_location = loc
637
+ if os.path.exists(dist.download_location):
638
+ return dist
639
+
640
+ if force_scan:
641
+ self.prescan()
642
+ self.find_packages(requirement)
643
+ dist = find(requirement)
644
+
645
+ if not dist and local_index is not None:
646
+ dist = find(requirement, local_index)
647
+
648
+ if dist is None:
649
+ if self.to_scan is not None:
650
+ self.prescan()
651
+ dist = find(requirement)
652
+
653
+ if dist is None and not force_scan:
654
+ self.find_packages(requirement)
655
+ dist = find(requirement)
656
+
657
+ if dist is None:
658
+ self.warn(
659
+ "No local packages or working download links found for %s%s",
660
+ (source and "a source distribution of " or ""),
661
+ requirement,
662
+ )
663
+ else:
664
+ self.info("Best match: %s", dist)
665
+ return dist.clone(location=dist.download_location)
666
+
667
+ def fetch(self, requirement, tmpdir, force_scan=False, source=False):
668
+ """Obtain a file suitable for fulfilling `requirement`
669
+
670
+ DEPRECATED; use the ``fetch_distribution()`` method now instead. For
671
+ backward compatibility, this routine is identical but returns the
672
+ ``location`` of the downloaded distribution instead of a distribution
673
+ object.
674
+ """
675
+ dist = self.fetch_distribution(requirement, tmpdir, force_scan, source)
676
+ if dist is not None:
677
+ return dist.location
678
+ return None
679
+
680
+ def gen_setup(self, filename, fragment, tmpdir):
681
+ match = EGG_FRAGMENT.match(fragment)
682
+ dists = match and [
683
+ d for d in
684
+ interpret_distro_name(filename, match.group(1), None) if d.version
685
+ ] or []
686
+
687
+ if len(dists) == 1: # unambiguous ``#egg`` fragment
688
+ basename = os.path.basename(filename)
689
+
690
+ # Make sure the file has been downloaded to the temp dir.
691
+ if os.path.dirname(filename) != tmpdir:
692
+ dst = os.path.join(tmpdir, basename)
693
+ from setuptools.command.easy_install import samefile
694
+ if not samefile(filename, dst):
695
+ shutil.copy2(filename, dst)
696
+ filename = dst
697
+
698
+ with open(os.path.join(tmpdir, 'setup.py'), 'w') as file:
699
+ file.write(
700
+ "from setuptools import setup\n"
701
+ "setup(name=%r, version=%r, py_modules=[%r])\n"
702
+ % (
703
+ dists[0].project_name, dists[0].version,
704
+ os.path.splitext(basename)[0]
705
+ )
706
+ )
707
+ return filename
708
+
709
+ elif match:
710
+ raise DistutilsError(
711
+ "Can't unambiguously interpret project/version identifier %r; "
712
+ "any dashes in the name or version should be escaped using "
713
+ "underscores. %r" % (fragment, dists)
714
+ )
715
+ else:
716
+ raise DistutilsError(
717
+ "Can't process plain .py files without an '#egg=name-version'"
718
+ " suffix to enable automatic setup script generation."
719
+ )
720
+
721
+ dl_blocksize = 8192
722
+
723
+ def _download_to(self, url, filename):
724
+ self.info("Downloading %s", url)
725
+ # Download the file
726
+ fp = None
727
+ try:
728
+ checker = HashChecker.from_url(url)
729
+ fp = self.open_url(url)
730
+ if isinstance(fp, urllib.error.HTTPError):
731
+ raise DistutilsError(
732
+ "Can't download %s: %s %s" % (url, fp.code, fp.msg)
733
+ )
734
+ headers = fp.info()
735
+ blocknum = 0
736
+ bs = self.dl_blocksize
737
+ size = -1
738
+ if "content-length" in headers:
739
+ # Some servers return multiple Content-Length headers :(
740
+ sizes = get_all_headers(headers, 'Content-Length')
741
+ size = max(map(int, sizes))
742
+ self.reporthook(url, filename, blocknum, bs, size)
743
+ with open(filename, 'wb') as tfp:
744
+ while True:
745
+ block = fp.read(bs)
746
+ if block:
747
+ checker.feed(block)
748
+ tfp.write(block)
749
+ blocknum += 1
750
+ self.reporthook(url, filename, blocknum, bs, size)
751
+ else:
752
+ break
753
+ self.check_hash(checker, filename, tfp)
754
+ return headers
755
+ finally:
756
+ if fp:
757
+ fp.close()
758
+
759
+ def reporthook(self, url, filename, blocknum, blksize, size):
760
+ pass # no-op
761
+
762
+ def open_url(self, url, warning=None):
763
+ if url.startswith('file:'):
764
+ return local_open(url)
765
+ try:
766
+ return open_with_auth(url, self.opener)
767
+ except (ValueError, http_client.InvalidURL) as v:
768
+ msg = ' '.join([str(arg) for arg in v.args])
769
+ if warning:
770
+ self.warn(warning, msg)
771
+ else:
772
+ raise DistutilsError('%s %s' % (url, msg))
773
+ except urllib.error.HTTPError as v:
774
+ return v
775
+ except urllib.error.URLError as v:
776
+ if warning:
777
+ self.warn(warning, v.reason)
778
+ else:
779
+ raise DistutilsError("Download error for %s: %s"
780
+ % (url, v.reason))
781
+ except http_client.BadStatusLine as v:
782
+ if warning:
783
+ self.warn(warning, v.line)
784
+ else:
785
+ raise DistutilsError(
786
+ '%s returned a bad status line. The server might be '
787
+ 'down, %s' %
788
+ (url, v.line)
789
+ )
790
+ except (http_client.HTTPException, socket.error) as v:
791
+ if warning:
792
+ self.warn(warning, v)
793
+ else:
794
+ raise DistutilsError("Download error for %s: %s"
795
+ % (url, v))
796
+
797
+ def _download_url(self, scheme, url, tmpdir):
798
+ # Determine download filename
799
+ #
800
+ name, fragment = egg_info_for_url(url)
801
+ if name:
802
+ while '..' in name:
803
+ name = name.replace('..', '.').replace('\\', '_')
804
+ else:
805
+ name = "__downloaded__" # default if URL has no path contents
806
+
807
+ if name.endswith('.egg.zip'):
808
+ name = name[:-4] # strip the extra .zip before download
809
+
810
+ filename = os.path.join(tmpdir, name)
811
+
812
+ # Download the file
813
+ #
814
+ if scheme == 'svn' or scheme.startswith('svn+'):
815
+ return self._download_svn(url, filename)
816
+ elif scheme == 'git' or scheme.startswith('git+'):
817
+ return self._download_git(url, filename)
818
+ elif scheme.startswith('hg+'):
819
+ return self._download_hg(url, filename)
820
+ elif scheme == 'file':
821
+ return urllib.request.url2pathname(urllib.parse.urlparse(url)[2])
822
+ else:
823
+ self.url_ok(url, True) # raises error if not allowed
824
+ return self._attempt_download(url, filename)
825
+
826
+ def scan_url(self, url):
827
+ self.process_url(url, True)
828
+
829
+ def _attempt_download(self, url, filename):
830
+ headers = self._download_to(url, filename)
831
+ if 'html' in headers.get('content-type', '').lower():
832
+ return self._download_html(url, headers, filename)
833
+ else:
834
+ return filename
835
+
836
+ def _download_html(self, url, headers, filename):
837
+ file = open(filename)
838
+ for line in file:
839
+ if line.strip():
840
+ # Check for a subversion index page
841
+ if re.search(r'<title>([^- ]+ - )?Revision \d+:', line):
842
+ # it's a subversion index page:
843
+ file.close()
844
+ os.unlink(filename)
845
+ return self._download_svn(url, filename)
846
+ break # not an index page
847
+ file.close()
848
+ os.unlink(filename)
849
+ raise DistutilsError("Unexpected HTML page found at " + url)
850
+
851
+ def _download_svn(self, url, filename):
852
+ warnings.warn("SVN download support is deprecated", UserWarning)
853
+ url = url.split('#', 1)[0] # remove any fragment for svn's sake
854
+ creds = ''
855
+ if url.lower().startswith('svn:') and '@' in url:
856
+ scheme, netloc, path, p, q, f = urllib.parse.urlparse(url)
857
+ if not netloc and path.startswith('//') and '/' in path[2:]:
858
+ netloc, path = path[2:].split('/', 1)
859
+ auth, host = _splituser(netloc)
860
+ if auth:
861
+ if ':' in auth:
862
+ user, pw = auth.split(':', 1)
863
+ creds = " --username=%s --password=%s" % (user, pw)
864
+ else:
865
+ creds = " --username=" + auth
866
+ netloc = host
867
+ parts = scheme, netloc, url, p, q, f
868
+ url = urllib.parse.urlunparse(parts)
869
+ self.info("Doing subversion checkout from %s to %s", url, filename)
870
+ os.system("svn checkout%s -q %s %s" % (creds, url, filename))
871
+ return filename
872
+
873
+ @staticmethod
874
+ def _vcs_split_rev_from_url(url, pop_prefix=False):
875
+ scheme, netloc, path, query, frag = urllib.parse.urlsplit(url)
876
+
877
+ scheme = scheme.split('+', 1)[-1]
878
+
879
+ # Some fragment identification fails
880
+ path = path.split('#', 1)[0]
881
+
882
+ rev = None
883
+ if '@' in path:
884
+ path, rev = path.rsplit('@', 1)
885
+
886
+ # Also, discard fragment
887
+ url = urllib.parse.urlunsplit((scheme, netloc, path, query, ''))
888
+
889
+ return url, rev
890
+
891
+ def _download_git(self, url, filename):
892
+ filename = filename.split('#', 1)[0]
893
+ url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True)
894
+
895
+ self.info("Doing git clone from %s to %s", url, filename)
896
+ os.system("git clone --quiet %s %s" % (url, filename))
897
+
898
+ if rev is not None:
899
+ self.info("Checking out %s", rev)
900
+ os.system("git -C %s checkout --quiet %s" % (
901
+ filename,
902
+ rev,
903
+ ))
904
+
905
+ return filename
906
+
907
+ def _download_hg(self, url, filename):
908
+ filename = filename.split('#', 1)[0]
909
+ url, rev = self._vcs_split_rev_from_url(url, pop_prefix=True)
910
+
911
+ self.info("Doing hg clone from %s to %s", url, filename)
912
+ os.system("hg clone --quiet %s %s" % (url, filename))
913
+
914
+ if rev is not None:
915
+ self.info("Updating to %s", rev)
916
+ os.system("hg --cwd %s up -C -r %s -q" % (
917
+ filename,
918
+ rev,
919
+ ))
920
+
921
+ return filename
922
+
923
+ def debug(self, msg, *args):
924
+ log.debug(msg, *args)
925
+
926
+ def info(self, msg, *args):
927
+ log.info(msg, *args)
928
+
929
+ def warn(self, msg, *args):
930
+ log.warn(msg, *args)
931
+
932
+
933
+ # This pattern matches a character entity reference (a decimal numeric
934
+ # references, a hexadecimal numeric reference, or a named reference).
935
+ entity_sub = re.compile(r'&(#(\d+|x[\da-fA-F]+)|[\w.:-]+);?').sub
936
+
937
+
938
+ def decode_entity(match):
939
+ what = match.group(0)
940
+ return unescape(what)
941
+
942
+
943
+ def htmldecode(text):
944
+ """
945
+ Decode HTML entities in the given text.
946
+
947
+ >>> htmldecode(
948
+ ... 'https://../package_name-0.1.2.tar.gz'
949
+ ... '?tokena=A&amp;tokenb=B">package_name-0.1.2.tar.gz')
950
+ 'https://../package_name-0.1.2.tar.gz?tokena=A&tokenb=B">package_name-0.1.2.tar.gz'
951
+ """
952
+ return entity_sub(decode_entity, text)
953
+
954
+
955
+ def socket_timeout(timeout=15):
956
+ def _socket_timeout(func):
957
+ def _socket_timeout(*args, **kwargs):
958
+ old_timeout = socket.getdefaulttimeout()
959
+ socket.setdefaulttimeout(timeout)
960
+ try:
961
+ return func(*args, **kwargs)
962
+ finally:
963
+ socket.setdefaulttimeout(old_timeout)
964
+
965
+ return _socket_timeout
966
+
967
+ return _socket_timeout
968
+
969
+
970
+ def _encode_auth(auth):
971
+ """
972
+ A function compatible with Python 2.3-3.3 that will encode
973
+ auth from a URL suitable for an HTTP header.
974
+ >>> str(_encode_auth('username%3Apassword'))
975
+ 'dXNlcm5hbWU6cGFzc3dvcmQ='
976
+
977
+ Long auth strings should not cause a newline to be inserted.
978
+ >>> long_auth = 'username:' + 'password'*10
979
+ >>> chr(10) in str(_encode_auth(long_auth))
980
+ False
981
+ """
982
+ auth_s = urllib.parse.unquote(auth)
983
+ # convert to bytes
984
+ auth_bytes = auth_s.encode()
985
+ encoded_bytes = base64.b64encode(auth_bytes)
986
+ # convert back to a string
987
+ encoded = encoded_bytes.decode()
988
+ # strip the trailing carriage return
989
+ return encoded.replace('\n', '')
990
+
991
+
992
+ class Credential:
993
+ """
994
+ A username/password pair. Use like a namedtuple.
995
+ """
996
+
997
+ def __init__(self, username, password):
998
+ self.username = username
999
+ self.password = password
1000
+
1001
+ def __iter__(self):
1002
+ yield self.username
1003
+ yield self.password
1004
+
1005
+ def __str__(self):
1006
+ return '%(username)s:%(password)s' % vars(self)
1007
+
1008
+
1009
+ class PyPIConfig(configparser.RawConfigParser):
1010
+ def __init__(self):
1011
+ """
1012
+ Load from ~/.pypirc
1013
+ """
1014
+ defaults = dict.fromkeys(['username', 'password', 'repository'], '')
1015
+ configparser.RawConfigParser.__init__(self, defaults)
1016
+
1017
+ rc = os.path.join(os.path.expanduser('~'), '.pypirc')
1018
+ if os.path.exists(rc):
1019
+ self.read(rc)
1020
+
1021
+ @property
1022
+ def creds_by_repository(self):
1023
+ sections_with_repositories = [
1024
+ section for section in self.sections()
1025
+ if self.get(section, 'repository').strip()
1026
+ ]
1027
+
1028
+ return dict(map(self._get_repo_cred, sections_with_repositories))
1029
+
1030
+ def _get_repo_cred(self, section):
1031
+ repo = self.get(section, 'repository').strip()
1032
+ return repo, Credential(
1033
+ self.get(section, 'username').strip(),
1034
+ self.get(section, 'password').strip(),
1035
+ )
1036
+
1037
+ def find_credential(self, url):
1038
+ """
1039
+ If the URL indicated appears to be a repository defined in this
1040
+ config, return the credential for that repository.
1041
+ """
1042
+ for repository, cred in self.creds_by_repository.items():
1043
+ if url.startswith(repository):
1044
+ return cred
1045
+
1046
+
1047
+ def open_with_auth(url, opener=urllib.request.urlopen):
1048
+ """Open a urllib2 request, handling HTTP authentication"""
1049
+
1050
+ parsed = urllib.parse.urlparse(url)
1051
+ scheme, netloc, path, params, query, frag = parsed
1052
+
1053
+ # Double scheme does not raise on Mac OS X as revealed by a
1054
+ # failing test. We would expect "nonnumeric port". Refs #20.
1055
+ if netloc.endswith(':'):
1056
+ raise http_client.InvalidURL("nonnumeric port: ''")
1057
+
1058
+ if scheme in ('http', 'https'):
1059
+ auth, address = _splituser(netloc)
1060
+ else:
1061
+ auth = None
1062
+
1063
+ if not auth:
1064
+ cred = PyPIConfig().find_credential(url)
1065
+ if cred:
1066
+ auth = str(cred)
1067
+ info = cred.username, url
1068
+ log.info('Authenticating as %s for %s (from .pypirc)', *info)
1069
+
1070
+ if auth:
1071
+ auth = "Basic " + _encode_auth(auth)
1072
+ parts = scheme, address, path, params, query, frag
1073
+ new_url = urllib.parse.urlunparse(parts)
1074
+ request = urllib.request.Request(new_url)
1075
+ request.add_header("Authorization", auth)
1076
+ else:
1077
+ request = urllib.request.Request(url)
1078
+
1079
+ request.add_header('User-Agent', user_agent)
1080
+ fp = opener(request)
1081
+
1082
+ if auth:
1083
+ # Put authentication info back into request URL if same host,
1084
+ # so that links found on the page will work
1085
+ s2, h2, path2, param2, query2, frag2 = urllib.parse.urlparse(fp.url)
1086
+ if s2 == scheme and h2 == address:
1087
+ parts = s2, netloc, path2, param2, query2, frag2
1088
+ fp.url = urllib.parse.urlunparse(parts)
1089
+
1090
+ return fp
1091
+
1092
+
1093
+ # copy of urllib.parse._splituser from Python 3.8
1094
+ def _splituser(host):
1095
+ """splituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'."""
1096
+ user, delim, host = host.rpartition('@')
1097
+ return (user if delim else None), host
1098
+
1099
+
1100
+ # adding a timeout to avoid freezing package_index
1101
+ open_with_auth = socket_timeout(_SOCKET_TIMEOUT)(open_with_auth)
1102
+
1103
+
1104
+ def fix_sf_url(url):
1105
+ return url # backward compatibility
1106
+
1107
+
1108
+ def local_open(url):
1109
+ """Read a local path, with special support for directories"""
1110
+ scheme, server, path, param, query, frag = urllib.parse.urlparse(url)
1111
+ filename = urllib.request.url2pathname(path)
1112
+ if os.path.isfile(filename):
1113
+ return urllib.request.urlopen(url)
1114
+ elif path.endswith('/') and os.path.isdir(filename):
1115
+ files = []
1116
+ for f in os.listdir(filename):
1117
+ filepath = os.path.join(filename, f)
1118
+ if f == 'index.html':
1119
+ with open(filepath, 'r') as fp:
1120
+ body = fp.read()
1121
+ break
1122
+ elif os.path.isdir(filepath):
1123
+ f += '/'
1124
+ files.append('<a href="{name}">{name}</a>'.format(name=f))
1125
+ else:
1126
+ tmpl = (
1127
+ "<html><head><title>{url}</title>"
1128
+ "</head><body>{files}</body></html>")
1129
+ body = tmpl.format(url=url, files='\n'.join(files))
1130
+ status, message = 200, "OK"
1131
+ else:
1132
+ status, message, body = 404, "Path not found", "Not found"
1133
+
1134
+ headers = {'content-type': 'text/html'}
1135
+ body_stream = six.StringIO(body)
1136
+ return urllib.error.HTTPError(url, status, message, headers, body_stream)