com.googler.python 1.0.7 → 1.0.9

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 (354) hide show
  1. package/package.json +4 -2
  2. package/python3.4.2/lib/python3.4/site-packages/pip/__init__.py +1 -277
  3. package/python3.4.2/lib/python3.4/site-packages/pip/__main__.py +19 -7
  4. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/__init__.py +246 -0
  5. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/basecommand.py +373 -0
  6. package/python3.4.2/lib/python3.4/site-packages/pip/{baseparser.py → _internal/baseparser.py} +240 -224
  7. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/build_env.py +92 -0
  8. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/cache.py +202 -0
  9. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/cmdoptions.py +609 -0
  10. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/__init__.py +79 -0
  11. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/check.py +42 -0
  12. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/completion.py +94 -0
  13. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/configuration.py +227 -0
  14. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/download.py +233 -0
  15. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/freeze.py +96 -0
  16. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/hash.py +57 -0
  17. package/python3.4.2/lib/python3.4/site-packages/pip/{commands → _internal/commands}/help.py +36 -33
  18. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/install.py +477 -0
  19. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/list.py +343 -0
  20. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/search.py +135 -0
  21. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/show.py +164 -0
  22. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/uninstall.py +71 -0
  23. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/wheel.py +179 -0
  24. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/compat.py +235 -0
  25. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/configuration.py +378 -0
  26. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/download.py +922 -0
  27. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/exceptions.py +249 -0
  28. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/index.py +1117 -0
  29. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/locations.py +194 -0
  30. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/models/__init__.py +4 -0
  31. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/models/index.py +15 -0
  32. package/python3.4.2/lib/python3.4/site-packages/pip/{_vendor/requests/packages/urllib3/contrib → _internal/operations}/__init__.py +0 -0
  33. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/check.py +106 -0
  34. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/freeze.py +252 -0
  35. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/prepare.py +378 -0
  36. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/pep425tags.py +317 -0
  37. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/__init__.py +69 -0
  38. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_file.py +338 -0
  39. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_install.py +1115 -0
  40. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_set.py +164 -0
  41. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_uninstall.py +455 -0
  42. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/resolve.py +354 -0
  43. package/python3.4.2/lib/python3.4/site-packages/pip/{status_codes.py → _internal/status_codes.py} +8 -6
  44. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/__init__.py +0 -0
  45. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/appdirs.py +258 -0
  46. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/deprecation.py +77 -0
  47. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/encoding.py +33 -0
  48. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/filesystem.py +28 -0
  49. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/glibc.py +84 -0
  50. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/hashes.py +94 -0
  51. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/logging.py +132 -0
  52. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/misc.py +851 -0
  53. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/outdated.py +163 -0
  54. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/packaging.py +70 -0
  55. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/setuptools_build.py +8 -0
  56. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/temp_dir.py +82 -0
  57. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/typing.py +29 -0
  58. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/ui.py +421 -0
  59. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/__init__.py +471 -0
  60. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/bazaar.py +113 -0
  61. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/git.py +311 -0
  62. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/mercurial.py +105 -0
  63. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/subversion.py +271 -0
  64. package/python3.4.2/lib/python3.4/site-packages/pip/_internal/wheel.py +817 -0
  65. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/__init__.py +109 -8
  66. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/appdirs.py +604 -0
  67. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/__init__.py +11 -0
  68. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/_cmd.py +60 -0
  69. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/adapter.py +134 -0
  70. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/cache.py +39 -0
  71. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +2 -0
  72. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +133 -0
  73. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +43 -0
  74. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/compat.py +29 -0
  75. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/controller.py +373 -0
  76. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/filewrapper.py +78 -0
  77. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/heuristics.py +138 -0
  78. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/serialize.py +194 -0
  79. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/wrapper.py +27 -0
  80. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/__init__.py +3 -0
  81. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/__main__.py +2 -0
  82. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests → certifi}/cacert.pem +1765 -2358
  83. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/core.py +37 -0
  84. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/__init__.py +39 -32
  85. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/big5freq.py +386 -0
  86. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/big5prober.py +47 -42
  87. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/chardistribution.py +233 -231
  88. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/charsetgroupprober.py +106 -0
  89. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/charsetprober.py +145 -0
  90. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/cli/__init__.py +1 -0
  91. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/cli/chardetect.py +85 -0
  92. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/codingstatemachine.py +88 -0
  93. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/compat.py +34 -34
  94. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/cp949prober.py +49 -44
  95. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/enums.py +76 -0
  96. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/escprober.py +101 -0
  97. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/escsm.py +246 -0
  98. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/eucjpprober.py +92 -0
  99. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/euckrfreq.py +195 -0
  100. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euckrprober.py +47 -42
  101. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euctwfreq.py +387 -428
  102. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euctwprober.py +46 -41
  103. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/gb2312freq.py +283 -472
  104. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/gb2312prober.py +46 -41
  105. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/hebrewprober.py +292 -283
  106. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/jisfreq.py +325 -569
  107. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/jpcntx.py +233 -219
  108. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langbulgarianmodel.py +228 -229
  109. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langcyrillicmodel.py +333 -329
  110. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langgreekmodel.py +225 -225
  111. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langhebrewmodel.py +200 -201
  112. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langhungarianmodel.py +225 -225
  113. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langthaimodel.py +199 -200
  114. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/langturkishmodel.py +193 -0
  115. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/latin1prober.py +145 -139
  116. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/mbcharsetprober.py +91 -0
  117. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/mbcsgroupprober.py +54 -54
  118. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/mbcssm.py +572 -0
  119. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/sbcharsetprober.py +132 -0
  120. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/sbcsgroupprober.py +73 -69
  121. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/sjisprober.py +92 -0
  122. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/universaldetector.py +286 -0
  123. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/utf8prober.py +82 -76
  124. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/version.py +9 -0
  125. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/__init__.py +7 -7
  126. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansi.py +102 -50
  127. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansitowin32.py +236 -190
  128. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/initialise.py +82 -56
  129. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/win32.py +156 -137
  130. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/winterm.py +162 -120
  131. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/__init__.py +23 -23
  132. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/__init__.py +6 -6
  133. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/misc.py +41 -41
  134. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/shutil.py +761 -761
  135. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg +84 -84
  136. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.py +788 -788
  137. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/tarfile.py +2607 -2607
  138. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/compat.py +1117 -1064
  139. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/database.py +1318 -1301
  140. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/index.py +516 -488
  141. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/locators.py +1292 -1194
  142. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/manifest.py +393 -364
  143. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py +131 -190
  144. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/metadata.py +1068 -1026
  145. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/resources.py +355 -317
  146. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/scripts.py +415 -323
  147. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t32.exe +0 -0
  148. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t64.exe +0 -0
  149. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/util.py +1755 -1575
  150. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/version.py +736 -721
  151. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w32.exe +0 -0
  152. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w64.exe +0 -0
  153. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/wheel.py +984 -958
  154. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distro.py +1104 -0
  155. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/__init__.py +35 -23
  156. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{ihatexml.py → _ihatexml.py} +288 -285
  157. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{inputstream.py → _inputstream.py} +923 -881
  158. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{tokenizer.py → _tokenizer.py} +1721 -1731
  159. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/__init__.py +14 -12
  160. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/_base.py +37 -37
  161. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/datrie.py +44 -44
  162. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/py.py +67 -67
  163. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{utils.py → _utils.py} +124 -82
  164. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/constants.py +2947 -3104
  165. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +29 -20
  166. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/{_base.py → base.py} +12 -12
  167. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +73 -65
  168. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/lint.py +93 -93
  169. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +207 -205
  170. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +896 -12
  171. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/whitespace.py +38 -38
  172. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/html5parser.py +2791 -2713
  173. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer.py +409 -0
  174. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py +30 -0
  175. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py +54 -0
  176. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/sax.py +50 -44
  177. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py +88 -76
  178. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/{_base.py → base.py} +417 -377
  179. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/dom.py +236 -227
  180. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree.py +340 -337
  181. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py +366 -369
  182. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py +154 -57
  183. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{_base.py → base.py} +252 -200
  184. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/dom.py +43 -46
  185. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/etree.py +130 -138
  186. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{lxmletree.py → etree_lxml.py} +213 -208
  187. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{genshistream.py → genshi.py} +69 -69
  188. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/__init__.py +2 -0
  189. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/codec.py +118 -0
  190. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/compat.py +12 -0
  191. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/core.py +387 -0
  192. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/idnadata.py +1585 -0
  193. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/intranges.py +53 -0
  194. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/package_data.py +2 -0
  195. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/uts46data.py +7634 -0
  196. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/ipaddress.py +2419 -0
  197. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/__init__.py +347 -0
  198. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/linklockfile.py +73 -0
  199. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/mkdirlockfile.py +84 -0
  200. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/pidlockfile.py +190 -0
  201. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/sqlitelockfile.py +156 -0
  202. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/symlinklockfile.py +70 -0
  203. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/__init__.py +66 -0
  204. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/_version.py +1 -0
  205. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/exceptions.py +41 -0
  206. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/fallback.py +971 -0
  207. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/__about__.py +21 -0
  208. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/__init__.py +14 -0
  209. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/_compat.py +30 -0
  210. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/_structures.py +70 -0
  211. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/markers.py +301 -0
  212. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/requirements.py +130 -0
  213. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/specifiers.py +774 -0
  214. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/utils.py +63 -0
  215. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/version.py +441 -0
  216. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{pkg_resources.py → pkg_resources/__init__.py} +3125 -2762
  217. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pkg_resources/py31compat.py +22 -0
  218. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/__init__.py +127 -0
  219. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/bar.py +88 -0
  220. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/counter.py +48 -0
  221. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/helpers.py +91 -0
  222. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/spinner.py +44 -0
  223. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pyparsing.py +5720 -0
  224. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/__init__.py +3 -0
  225. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/core.py +13 -0
  226. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/parser.py +374 -0
  227. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/writer.py +127 -0
  228. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__init__.py +123 -77
  229. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__version__.py +14 -0
  230. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/_internal_utils.py +42 -0
  231. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/adapters.py +525 -388
  232. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/api.py +152 -120
  233. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/auth.py +293 -193
  234. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/certs.py +18 -24
  235. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/compat.py +73 -115
  236. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cookies.py +542 -454
  237. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/exceptions.py +122 -75
  238. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/help.py +120 -0
  239. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/hooks.py +34 -45
  240. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/models.py +948 -803
  241. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages.py +16 -0
  242. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/sessions.py +737 -637
  243. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/status_codes.py +91 -88
  244. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/structures.py +105 -127
  245. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/utils.py +904 -673
  246. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/retrying.py +267 -0
  247. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/six.py +891 -646
  248. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/__init__.py +97 -0
  249. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/_collections.py +319 -0
  250. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/connection.py +373 -0
  251. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/connectionpool.py +905 -710
  252. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
  253. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
  254. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +593 -0
  255. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +343 -0
  256. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/appengine.py +296 -0
  257. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/contrib/ntlmpool.py +112 -120
  258. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +455 -0
  259. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +810 -0
  260. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/socks.py +188 -0
  261. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/exceptions.py +246 -0
  262. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/fields.py +178 -177
  263. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/filepost.py +94 -100
  264. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/__init__.py +5 -4
  265. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
  266. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +53 -0
  267. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ordered_dict.py +259 -260
  268. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/six.py +868 -0
  269. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ssl_match_hostname/__init__.py +19 -13
  270. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ssl_match_hostname/_implementation.py +157 -105
  271. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/poolmanager.py +440 -0
  272. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/request.py +148 -141
  273. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/response.py +626 -0
  274. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/__init__.py +54 -0
  275. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/connection.py +130 -0
  276. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/request.py +118 -0
  277. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/response.py +81 -0
  278. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/retry.py +401 -0
  279. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/selectors.py +581 -0
  280. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/ssl_.py +341 -0
  281. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/util/timeout.py +242 -234
  282. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/util/url.py +230 -162
  283. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/wait.py +40 -0
  284. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/__init__.py +342 -0
  285. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/labels.py +231 -0
  286. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/mklabels.py +59 -0
  287. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/tests.py +153 -0
  288. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/x_user_defined.py +325 -0
  289. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/__init__.py +0 -16
  290. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/markers.py +0 -119
  291. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/sanitizer.py +0 -271
  292. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/__init__.py +0 -16
  293. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py +0 -320
  294. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py +0 -63
  295. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/re-vendor.py +0 -34
  296. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/__init__.py +0 -3
  297. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py +0 -925
  298. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py +0 -46
  299. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py +0 -106
  300. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py +0 -62
  301. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py +0 -61
  302. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/constants.py +0 -39
  303. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escprober.py +0 -86
  304. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py +0 -242
  305. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py +0 -90
  306. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py +0 -596
  307. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py +0 -86
  308. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py +0 -575
  309. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py +0 -120
  310. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py +0 -91
  311. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py +0 -170
  312. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py +0 -58
  313. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py +0 -205
  314. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connection.py +0 -204
  315. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py +0 -422
  316. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py +0 -126
  317. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py +0 -385
  318. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py +0 -258
  319. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/response.py +0 -308
  320. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py +0 -27
  321. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py +0 -45
  322. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py +0 -68
  323. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py +0 -13
  324. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py +0 -133
  325. package/python3.4.2/lib/python3.4/site-packages/pip/backwardcompat/__init__.py +0 -138
  326. package/python3.4.2/lib/python3.4/site-packages/pip/basecommand.py +0 -201
  327. package/python3.4.2/lib/python3.4/site-packages/pip/cmdoptions.py +0 -371
  328. package/python3.4.2/lib/python3.4/site-packages/pip/commands/__init__.py +0 -88
  329. package/python3.4.2/lib/python3.4/site-packages/pip/commands/bundle.py +0 -42
  330. package/python3.4.2/lib/python3.4/site-packages/pip/commands/completion.py +0 -59
  331. package/python3.4.2/lib/python3.4/site-packages/pip/commands/freeze.py +0 -114
  332. package/python3.4.2/lib/python3.4/site-packages/pip/commands/install.py +0 -314
  333. package/python3.4.2/lib/python3.4/site-packages/pip/commands/list.py +0 -162
  334. package/python3.4.2/lib/python3.4/site-packages/pip/commands/search.py +0 -132
  335. package/python3.4.2/lib/python3.4/site-packages/pip/commands/show.py +0 -80
  336. package/python3.4.2/lib/python3.4/site-packages/pip/commands/uninstall.py +0 -59
  337. package/python3.4.2/lib/python3.4/site-packages/pip/commands/unzip.py +0 -7
  338. package/python3.4.2/lib/python3.4/site-packages/pip/commands/wheel.py +0 -195
  339. package/python3.4.2/lib/python3.4/site-packages/pip/commands/zip.py +0 -351
  340. package/python3.4.2/lib/python3.4/site-packages/pip/download.py +0 -644
  341. package/python3.4.2/lib/python3.4/site-packages/pip/exceptions.py +0 -46
  342. package/python3.4.2/lib/python3.4/site-packages/pip/index.py +0 -990
  343. package/python3.4.2/lib/python3.4/site-packages/pip/locations.py +0 -171
  344. package/python3.4.2/lib/python3.4/site-packages/pip/log.py +0 -276
  345. package/python3.4.2/lib/python3.4/site-packages/pip/pep425tags.py +0 -102
  346. package/python3.4.2/lib/python3.4/site-packages/pip/req.py +0 -1931
  347. package/python3.4.2/lib/python3.4/site-packages/pip/runner.py +0 -18
  348. package/python3.4.2/lib/python3.4/site-packages/pip/util.py +0 -720
  349. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/__init__.py +0 -251
  350. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/bazaar.py +0 -131
  351. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/git.py +0 -194
  352. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/mercurial.py +0 -151
  353. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/subversion.py +0 -273
  354. package/python3.4.2/lib/python3.4/site-packages/pip/wheel.py +0 -560
@@ -0,0 +1,354 @@
1
+ """Dependency Resolution
2
+
3
+ The dependency resolution in pip is performed as follows:
4
+
5
+ for top-level requirements:
6
+ a. only one spec allowed per project, regardless of conflicts or not.
7
+ otherwise a "double requirement" exception is raised
8
+ b. they override sub-dependency requirements.
9
+ for sub-dependencies
10
+ a. "first found, wins" (where the order is breadth first)
11
+ """
12
+
13
+ import logging
14
+ from collections import defaultdict
15
+ from itertools import chain
16
+
17
+ from pip._internal.exceptions import (
18
+ BestVersionAlreadyInstalled, DistributionNotFound, HashError, HashErrors,
19
+ UnsupportedPythonVersion,
20
+ )
21
+
22
+ from pip._internal.req.req_install import InstallRequirement
23
+ from pip._internal.utils.logging import indent_log
24
+ from pip._internal.utils.misc import dist_in_usersite, ensure_dir
25
+ from pip._internal.utils.packaging import check_dist_requires_python
26
+
27
+ logger = logging.getLogger(__name__)
28
+
29
+
30
+ class Resolver(object):
31
+ """Resolves which packages need to be installed/uninstalled to perform \
32
+ the requested operation without breaking the requirements of any package.
33
+ """
34
+
35
+ _allowed_strategies = {"eager", "only-if-needed", "to-satisfy-only"}
36
+
37
+ def __init__(self, preparer, session, finder, wheel_cache, use_user_site,
38
+ ignore_dependencies, ignore_installed, ignore_requires_python,
39
+ force_reinstall, isolated, upgrade_strategy):
40
+ super(Resolver, self).__init__()
41
+ assert upgrade_strategy in self._allowed_strategies
42
+
43
+ self.preparer = preparer
44
+ self.finder = finder
45
+ self.session = session
46
+
47
+ # NOTE: This would eventually be replaced with a cache that can give
48
+ # information about both sdist and wheels transparently.
49
+ self.wheel_cache = wheel_cache
50
+
51
+ self.require_hashes = None # This is set in resolve
52
+
53
+ self.upgrade_strategy = upgrade_strategy
54
+ self.force_reinstall = force_reinstall
55
+ self.isolated = isolated
56
+ self.ignore_dependencies = ignore_dependencies
57
+ self.ignore_installed = ignore_installed
58
+ self.ignore_requires_python = ignore_requires_python
59
+ self.use_user_site = use_user_site
60
+
61
+ self._discovered_dependencies = defaultdict(list)
62
+
63
+ def resolve(self, requirement_set):
64
+ """Resolve what operations need to be done
65
+
66
+ As a side-effect of this method, the packages (and their dependencies)
67
+ are downloaded, unpacked and prepared for installation. This
68
+ preparation is done by ``pip.operations.prepare``.
69
+
70
+ Once PyPI has static dependency metadata available, it would be
71
+ possible to move the preparation to become a step separated from
72
+ dependency resolution.
73
+ """
74
+ # make the wheelhouse
75
+ if self.preparer.wheel_download_dir:
76
+ ensure_dir(self.preparer.wheel_download_dir)
77
+
78
+ # If any top-level requirement has a hash specified, enter
79
+ # hash-checking mode, which requires hashes from all.
80
+ root_reqs = (
81
+ requirement_set.unnamed_requirements +
82
+ list(requirement_set.requirements.values())
83
+ )
84
+ self.require_hashes = (
85
+ requirement_set.require_hashes or
86
+ any(req.has_hash_options for req in root_reqs)
87
+ )
88
+
89
+ # Display where finder is looking for packages
90
+ locations = self.finder.get_formatted_locations()
91
+ if locations:
92
+ logger.info(locations)
93
+
94
+ # Actually prepare the files, and collect any exceptions. Most hash
95
+ # exceptions cannot be checked ahead of time, because
96
+ # req.populate_link() needs to be called before we can make decisions
97
+ # based on link type.
98
+ discovered_reqs = []
99
+ hash_errors = HashErrors()
100
+ for req in chain(root_reqs, discovered_reqs):
101
+ try:
102
+ discovered_reqs.extend(
103
+ self._resolve_one(requirement_set, req)
104
+ )
105
+ except HashError as exc:
106
+ exc.req = req
107
+ hash_errors.append(exc)
108
+
109
+ if hash_errors:
110
+ raise hash_errors
111
+
112
+ def _is_upgrade_allowed(self, req):
113
+ if self.upgrade_strategy == "to-satisfy-only":
114
+ return False
115
+ elif self.upgrade_strategy == "eager":
116
+ return True
117
+ else:
118
+ assert self.upgrade_strategy == "only-if-needed"
119
+ return req.is_direct
120
+
121
+ def _set_req_to_reinstall(self, req):
122
+ """
123
+ Set a requirement to be installed.
124
+ """
125
+ # Don't uninstall the conflict if doing a user install and the
126
+ # conflict is not a user install.
127
+ if not self.use_user_site or dist_in_usersite(req.satisfied_by):
128
+ req.conflicts_with = req.satisfied_by
129
+ req.satisfied_by = None
130
+
131
+ # XXX: Stop passing requirement_set for options
132
+ def _check_skip_installed(self, req_to_install):
133
+ """Check if req_to_install should be skipped.
134
+
135
+ This will check if the req is installed, and whether we should upgrade
136
+ or reinstall it, taking into account all the relevant user options.
137
+
138
+ After calling this req_to_install will only have satisfied_by set to
139
+ None if the req_to_install is to be upgraded/reinstalled etc. Any
140
+ other value will be a dist recording the current thing installed that
141
+ satisfies the requirement.
142
+
143
+ Note that for vcs urls and the like we can't assess skipping in this
144
+ routine - we simply identify that we need to pull the thing down,
145
+ then later on it is pulled down and introspected to assess upgrade/
146
+ reinstalls etc.
147
+
148
+ :return: A text reason for why it was skipped, or None.
149
+ """
150
+ if self.ignore_installed:
151
+ return None
152
+
153
+ req_to_install.check_if_exists(self.use_user_site)
154
+ if not req_to_install.satisfied_by:
155
+ return None
156
+
157
+ if self.force_reinstall:
158
+ self._set_req_to_reinstall(req_to_install)
159
+ return None
160
+
161
+ if not self._is_upgrade_allowed(req_to_install):
162
+ if self.upgrade_strategy == "only-if-needed":
163
+ return 'not upgraded as not directly required'
164
+ return 'already satisfied'
165
+
166
+ # Check for the possibility of an upgrade. For link-based
167
+ # requirements we have to pull the tree down and inspect to assess
168
+ # the version #, so it's handled way down.
169
+ if not req_to_install.link:
170
+ try:
171
+ self.finder.find_requirement(req_to_install, upgrade=True)
172
+ except BestVersionAlreadyInstalled:
173
+ # Then the best version is installed.
174
+ return 'already up-to-date'
175
+ except DistributionNotFound:
176
+ # No distribution found, so we squash the error. It will
177
+ # be raised later when we re-try later to do the install.
178
+ # Why don't we just raise here?
179
+ pass
180
+
181
+ self._set_req_to_reinstall(req_to_install)
182
+ return None
183
+
184
+ def _get_abstract_dist_for(self, req):
185
+ """Takes a InstallRequirement and returns a single AbstractDist \
186
+ representing a prepared variant of the same.
187
+ """
188
+ assert self.require_hashes is not None, (
189
+ "require_hashes should have been set in Resolver.resolve()"
190
+ )
191
+
192
+ if req.editable:
193
+ return self.preparer.prepare_editable_requirement(
194
+ req, self.require_hashes, self.use_user_site, self.finder,
195
+ )
196
+
197
+ # satisfied_by is only evaluated by calling _check_skip_installed,
198
+ # so it must be None here.
199
+ assert req.satisfied_by is None
200
+ skip_reason = self._check_skip_installed(req)
201
+
202
+ if req.satisfied_by:
203
+ return self.preparer.prepare_installed_requirement(
204
+ req, self.require_hashes, skip_reason
205
+ )
206
+
207
+ upgrade_allowed = self._is_upgrade_allowed(req)
208
+ abstract_dist = self.preparer.prepare_linked_requirement(
209
+ req, self.session, self.finder, upgrade_allowed,
210
+ self.require_hashes
211
+ )
212
+
213
+ # NOTE
214
+ # The following portion is for determining if a certain package is
215
+ # going to be re-installed/upgraded or not and reporting to the user.
216
+ # This should probably get cleaned up in a future refactor.
217
+
218
+ # req.req is only avail after unpack for URL
219
+ # pkgs repeat check_if_exists to uninstall-on-upgrade
220
+ # (#14)
221
+ if not self.ignore_installed:
222
+ req.check_if_exists(self.use_user_site)
223
+
224
+ if req.satisfied_by:
225
+ should_modify = (
226
+ self.upgrade_strategy != "to-satisfy-only" or
227
+ self.force_reinstall or
228
+ self.ignore_installed or
229
+ req.link.scheme == 'file'
230
+ )
231
+ if should_modify:
232
+ self._set_req_to_reinstall(req)
233
+ else:
234
+ logger.info(
235
+ 'Requirement already satisfied (use --upgrade to upgrade):'
236
+ ' %s', req,
237
+ )
238
+
239
+ return abstract_dist
240
+
241
+ def _resolve_one(self, requirement_set, req_to_install):
242
+ """Prepare a single requirements file.
243
+
244
+ :return: A list of additional InstallRequirements to also install.
245
+ """
246
+ # Tell user what we are doing for this requirement:
247
+ # obtain (editable), skipping, processing (local url), collecting
248
+ # (remote url or package name)
249
+ if req_to_install.constraint or req_to_install.prepared:
250
+ return []
251
+
252
+ req_to_install.prepared = True
253
+
254
+ # register tmp src for cleanup in case something goes wrong
255
+ requirement_set.reqs_to_cleanup.append(req_to_install)
256
+
257
+ abstract_dist = self._get_abstract_dist_for(req_to_install)
258
+
259
+ # Parse and return dependencies
260
+ dist = abstract_dist.dist(self.finder)
261
+ try:
262
+ check_dist_requires_python(dist)
263
+ except UnsupportedPythonVersion as err:
264
+ if self.ignore_requires_python:
265
+ logger.warning(err.args[0])
266
+ else:
267
+ raise
268
+
269
+ more_reqs = []
270
+
271
+ def add_req(subreq, extras_requested):
272
+ sub_install_req = InstallRequirement.from_req(
273
+ str(subreq),
274
+ req_to_install,
275
+ isolated=self.isolated,
276
+ wheel_cache=self.wheel_cache,
277
+ )
278
+ parent_req_name = req_to_install.name
279
+ to_scan_again, add_to_parent = requirement_set.add_requirement(
280
+ sub_install_req,
281
+ parent_req_name=parent_req_name,
282
+ extras_requested=extras_requested,
283
+ )
284
+ if parent_req_name and add_to_parent:
285
+ self._discovered_dependencies[parent_req_name].append(
286
+ add_to_parent
287
+ )
288
+ more_reqs.extend(to_scan_again)
289
+
290
+ with indent_log():
291
+ # We add req_to_install before its dependencies, so that we
292
+ # can refer to it when adding dependencies.
293
+ if not requirement_set.has_requirement(req_to_install.name):
294
+ # 'unnamed' requirements will get added here
295
+ req_to_install.is_direct = True
296
+ requirement_set.add_requirement(
297
+ req_to_install, parent_req_name=None,
298
+ )
299
+
300
+ if not self.ignore_dependencies:
301
+ if req_to_install.extras:
302
+ logger.debug(
303
+ "Installing extra requirements: %r",
304
+ ','.join(req_to_install.extras),
305
+ )
306
+ missing_requested = sorted(
307
+ set(req_to_install.extras) - set(dist.extras)
308
+ )
309
+ for missing in missing_requested:
310
+ logger.warning(
311
+ '%s does not provide the extra \'%s\'',
312
+ dist, missing
313
+ )
314
+
315
+ available_requested = sorted(
316
+ set(dist.extras) & set(req_to_install.extras)
317
+ )
318
+ for subreq in dist.requires(available_requested):
319
+ add_req(subreq, extras_requested=available_requested)
320
+
321
+ if not req_to_install.editable and not req_to_install.satisfied_by:
322
+ # XXX: --no-install leads this to report 'Successfully
323
+ # downloaded' for only non-editable reqs, even though we took
324
+ # action on them.
325
+ requirement_set.successfully_downloaded.append(req_to_install)
326
+
327
+ return more_reqs
328
+
329
+ def get_installation_order(self, req_set):
330
+ """Create the installation order.
331
+
332
+ The installation order is topological - requirements are installed
333
+ before the requiring thing. We break cycles at an arbitrary point,
334
+ and make no other guarantees.
335
+ """
336
+ # The current implementation, which we may change at any point
337
+ # installs the user specified things in the order given, except when
338
+ # dependencies must come earlier to achieve topological order.
339
+ order = []
340
+ ordered_reqs = set()
341
+
342
+ def schedule(req):
343
+ if req.satisfied_by or req in ordered_reqs:
344
+ return
345
+ if req.constraint:
346
+ return
347
+ ordered_reqs.add(req)
348
+ for dep in self._discovered_dependencies[req.name]:
349
+ schedule(dep)
350
+ order.append(req)
351
+
352
+ for install_req in req_set.requirements.values():
353
+ schedule(install_req)
354
+ return order
@@ -1,6 +1,8 @@
1
- SUCCESS = 0
2
- ERROR = 1
3
- UNKNOWN_ERROR = 2
4
- VIRTUALENV_NOT_FOUND = 3
5
- PREVIOUS_BUILD_DIR_ERROR = 4
6
- NO_MATCHES_FOUND = 23
1
+ from __future__ import absolute_import
2
+
3
+ SUCCESS = 0
4
+ ERROR = 1
5
+ UNKNOWN_ERROR = 2
6
+ VIRTUALENV_NOT_FOUND = 3
7
+ PREVIOUS_BUILD_DIR_ERROR = 4
8
+ NO_MATCHES_FOUND = 23
@@ -0,0 +1,258 @@
1
+ """
2
+ This code was taken from https://github.com/ActiveState/appdirs and modified
3
+ to suit our purposes.
4
+ """
5
+ from __future__ import absolute_import
6
+
7
+ import os
8
+ import sys
9
+
10
+ from pip._vendor.six import PY2, text_type
11
+
12
+ from pip._internal.compat import WINDOWS, expanduser
13
+
14
+
15
+ def user_cache_dir(appname):
16
+ r"""
17
+ Return full path to the user-specific cache dir for this application.
18
+
19
+ "appname" is the name of application.
20
+
21
+ Typical user cache directories are:
22
+ macOS: ~/Library/Caches/<AppName>
23
+ Unix: ~/.cache/<AppName> (XDG default)
24
+ Windows: C:\Users\<username>\AppData\Local\<AppName>\Cache
25
+
26
+ On Windows the only suggestion in the MSDN docs is that local settings go
27
+ in the `CSIDL_LOCAL_APPDATA` directory. This is identical to the
28
+ non-roaming app data dir (the default returned by `user_data_dir`). Apps
29
+ typically put cache data somewhere *under* the given dir here. Some
30
+ examples:
31
+ ...\Mozilla\Firefox\Profiles\<ProfileName>\Cache
32
+ ...\Acme\SuperApp\Cache\1.0
33
+
34
+ OPINION: This function appends "Cache" to the `CSIDL_LOCAL_APPDATA` value.
35
+ """
36
+ if WINDOWS:
37
+ # Get the base path
38
+ path = os.path.normpath(_get_win_folder("CSIDL_LOCAL_APPDATA"))
39
+
40
+ # When using Python 2, return paths as bytes on Windows like we do on
41
+ # other operating systems. See helper function docs for more details.
42
+ if PY2 and isinstance(path, text_type):
43
+ path = _win_path_to_bytes(path)
44
+
45
+ # Add our app name and Cache directory to it
46
+ path = os.path.join(path, appname, "Cache")
47
+ elif sys.platform == "darwin":
48
+ # Get the base path
49
+ path = expanduser("~/Library/Caches")
50
+
51
+ # Add our app name to it
52
+ path = os.path.join(path, appname)
53
+ else:
54
+ # Get the base path
55
+ path = os.getenv("XDG_CACHE_HOME", expanduser("~/.cache"))
56
+
57
+ # Add our app name to it
58
+ path = os.path.join(path, appname)
59
+
60
+ return path
61
+
62
+
63
+ def user_data_dir(appname, roaming=False):
64
+ r"""
65
+ Return full path to the user-specific data dir for this application.
66
+
67
+ "appname" is the name of application.
68
+ If None, just the system directory is returned.
69
+ "roaming" (boolean, default False) can be set True to use the Windows
70
+ roaming appdata directory. That means that for users on a Windows
71
+ network setup for roaming profiles, this user data will be
72
+ sync'd on login. See
73
+ <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
74
+ for a discussion of issues.
75
+
76
+ Typical user data directories are:
77
+ macOS: ~/Library/Application Support/<AppName>
78
+ if it exists, else ~/.config/<AppName>
79
+ Unix: ~/.local/share/<AppName> # or in
80
+ $XDG_DATA_HOME, if defined
81
+ Win XP (not roaming): C:\Documents and Settings\<username>\ ...
82
+ ...Application Data\<AppName>
83
+ Win XP (roaming): C:\Documents and Settings\<username>\Local ...
84
+ ...Settings\Application Data\<AppName>
85
+ Win 7 (not roaming): C:\\Users\<username>\AppData\Local\<AppName>
86
+ Win 7 (roaming): C:\\Users\<username>\AppData\Roaming\<AppName>
87
+
88
+ For Unix, we follow the XDG spec and support $XDG_DATA_HOME.
89
+ That means, by default "~/.local/share/<AppName>".
90
+ """
91
+ if WINDOWS:
92
+ const = roaming and "CSIDL_APPDATA" or "CSIDL_LOCAL_APPDATA"
93
+ path = os.path.join(os.path.normpath(_get_win_folder(const)), appname)
94
+ elif sys.platform == "darwin":
95
+ path = os.path.join(
96
+ expanduser('~/Library/Application Support/'),
97
+ appname,
98
+ ) if os.path.isdir(os.path.join(
99
+ expanduser('~/Library/Application Support/'),
100
+ appname,
101
+ )
102
+ ) else os.path.join(
103
+ expanduser('~/.config/'),
104
+ appname,
105
+ )
106
+ else:
107
+ path = os.path.join(
108
+ os.getenv('XDG_DATA_HOME', expanduser("~/.local/share")),
109
+ appname,
110
+ )
111
+
112
+ return path
113
+
114
+
115
+ def user_config_dir(appname, roaming=True):
116
+ """Return full path to the user-specific config dir for this application.
117
+
118
+ "appname" is the name of application.
119
+ If None, just the system directory is returned.
120
+ "roaming" (boolean, default True) can be set False to not use the
121
+ Windows roaming appdata directory. That means that for users on a
122
+ Windows network setup for roaming profiles, this user data will be
123
+ sync'd on login. See
124
+ <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>
125
+ for a discussion of issues.
126
+
127
+ Typical user data directories are:
128
+ macOS: same as user_data_dir
129
+ Unix: ~/.config/<AppName>
130
+ Win *: same as user_data_dir
131
+
132
+ For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME.
133
+ That means, by default "~/.config/<AppName>".
134
+ """
135
+ if WINDOWS:
136
+ path = user_data_dir(appname, roaming=roaming)
137
+ elif sys.platform == "darwin":
138
+ path = user_data_dir(appname)
139
+ else:
140
+ path = os.getenv('XDG_CONFIG_HOME', expanduser("~/.config"))
141
+ path = os.path.join(path, appname)
142
+
143
+ return path
144
+
145
+
146
+ # for the discussion regarding site_config_dirs locations
147
+ # see <https://github.com/pypa/pip/issues/1733>
148
+ def site_config_dirs(appname):
149
+ r"""Return a list of potential user-shared config dirs for this application.
150
+
151
+ "appname" is the name of application.
152
+
153
+ Typical user config directories are:
154
+ macOS: /Library/Application Support/<AppName>/
155
+ Unix: /etc or $XDG_CONFIG_DIRS[i]/<AppName>/ for each value in
156
+ $XDG_CONFIG_DIRS
157
+ Win XP: C:\Documents and Settings\All Users\Application ...
158
+ ...Data\<AppName>\
159
+ Vista: (Fail! "C:\ProgramData" is a hidden *system* directory
160
+ on Vista.)
161
+ Win 7: Hidden, but writeable on Win 7:
162
+ C:\ProgramData\<AppName>\
163
+ """
164
+ if WINDOWS:
165
+ path = os.path.normpath(_get_win_folder("CSIDL_COMMON_APPDATA"))
166
+ pathlist = [os.path.join(path, appname)]
167
+ elif sys.platform == 'darwin':
168
+ pathlist = [os.path.join('/Library/Application Support', appname)]
169
+ else:
170
+ # try looking in $XDG_CONFIG_DIRS
171
+ xdg_config_dirs = os.getenv('XDG_CONFIG_DIRS', '/etc/xdg')
172
+ if xdg_config_dirs:
173
+ pathlist = [
174
+ os.path.join(expanduser(x), appname)
175
+ for x in xdg_config_dirs.split(os.pathsep)
176
+ ]
177
+ else:
178
+ pathlist = []
179
+
180
+ # always look in /etc directly as well
181
+ pathlist.append('/etc')
182
+
183
+ return pathlist
184
+
185
+
186
+ # -- Windows support functions --
187
+
188
+ def _get_win_folder_from_registry(csidl_name):
189
+ """
190
+ This is a fallback technique at best. I'm not sure if using the
191
+ registry for this guarantees us the correct answer for all CSIDL_*
192
+ names.
193
+ """
194
+ import _winreg
195
+
196
+ shell_folder_name = {
197
+ "CSIDL_APPDATA": "AppData",
198
+ "CSIDL_COMMON_APPDATA": "Common AppData",
199
+ "CSIDL_LOCAL_APPDATA": "Local AppData",
200
+ }[csidl_name]
201
+
202
+ key = _winreg.OpenKey(
203
+ _winreg.HKEY_CURRENT_USER,
204
+ r"Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders"
205
+ )
206
+ directory, _type = _winreg.QueryValueEx(key, shell_folder_name)
207
+ return directory
208
+
209
+
210
+ def _get_win_folder_with_ctypes(csidl_name):
211
+ csidl_const = {
212
+ "CSIDL_APPDATA": 26,
213
+ "CSIDL_COMMON_APPDATA": 35,
214
+ "CSIDL_LOCAL_APPDATA": 28,
215
+ }[csidl_name]
216
+
217
+ buf = ctypes.create_unicode_buffer(1024)
218
+ ctypes.windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)
219
+
220
+ # Downgrade to short path name if have highbit chars. See
221
+ # <http://bugs.activestate.com/show_bug.cgi?id=85099>.
222
+ has_high_char = False
223
+ for c in buf:
224
+ if ord(c) > 255:
225
+ has_high_char = True
226
+ break
227
+ if has_high_char:
228
+ buf2 = ctypes.create_unicode_buffer(1024)
229
+ if ctypes.windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024):
230
+ buf = buf2
231
+
232
+ return buf.value
233
+
234
+
235
+ if WINDOWS:
236
+ try:
237
+ import ctypes
238
+ _get_win_folder = _get_win_folder_with_ctypes
239
+ except ImportError:
240
+ _get_win_folder = _get_win_folder_from_registry
241
+
242
+
243
+ def _win_path_to_bytes(path):
244
+ """Encode Windows paths to bytes. Only used on Python 2.
245
+
246
+ Motivation is to be consistent with other operating systems where paths
247
+ are also returned as bytes. This avoids problems mixing bytes and Unicode
248
+ elsewhere in the codebase. For more details and discussion see
249
+ <https://github.com/pypa/pip/issues/3463>.
250
+
251
+ If encoding using ASCII and MBCS fails, return the original Unicode path.
252
+ """
253
+ for encoding in ('ASCII', 'MBCS'):
254
+ try:
255
+ return path.encode(encoding)
256
+ except (UnicodeEncodeError, LookupError):
257
+ pass
258
+ return path