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,194 @@
1
+ """Locations where we look for configs, install stuff, etc"""
2
+ from __future__ import absolute_import
3
+
4
+ import os
5
+ import os.path
6
+ import platform
7
+ import site
8
+ import sys
9
+ import sysconfig
10
+ from distutils import sysconfig as distutils_sysconfig
11
+ from distutils.command.install import SCHEME_KEYS, install # type: ignore
12
+
13
+ from pip._internal.compat import WINDOWS, expanduser
14
+ from pip._internal.utils import appdirs
15
+
16
+ # Application Directories
17
+ USER_CACHE_DIR = appdirs.user_cache_dir("pip")
18
+
19
+
20
+ DELETE_MARKER_MESSAGE = '''\
21
+ This file is placed here by pip to indicate the source was put
22
+ here by pip.
23
+
24
+ Once this package is successfully installed this source code will be
25
+ deleted (unless you remove this file).
26
+ '''
27
+ PIP_DELETE_MARKER_FILENAME = 'pip-delete-this-directory.txt'
28
+
29
+
30
+ def write_delete_marker_file(directory):
31
+ """
32
+ Write the pip delete marker file into this directory.
33
+ """
34
+ filepath = os.path.join(directory, PIP_DELETE_MARKER_FILENAME)
35
+ with open(filepath, 'w') as marker_fp:
36
+ marker_fp.write(DELETE_MARKER_MESSAGE)
37
+
38
+
39
+ def running_under_virtualenv():
40
+ """
41
+ Return True if we're running inside a virtualenv, False otherwise.
42
+
43
+ """
44
+ if hasattr(sys, 'real_prefix'):
45
+ return True
46
+ elif sys.prefix != getattr(sys, "base_prefix", sys.prefix):
47
+ return True
48
+
49
+ return False
50
+
51
+
52
+ def virtualenv_no_global():
53
+ """
54
+ Return True if in a venv and no system site packages.
55
+ """
56
+ # this mirrors the logic in virtualenv.py for locating the
57
+ # no-global-site-packages.txt file
58
+ site_mod_dir = os.path.dirname(os.path.abspath(site.__file__))
59
+ no_global_file = os.path.join(site_mod_dir, 'no-global-site-packages.txt')
60
+ if running_under_virtualenv() and os.path.isfile(no_global_file):
61
+ return True
62
+
63
+
64
+ if running_under_virtualenv():
65
+ src_prefix = os.path.join(sys.prefix, 'src')
66
+ else:
67
+ # FIXME: keep src in cwd for now (it is not a temporary folder)
68
+ try:
69
+ src_prefix = os.path.join(os.getcwd(), 'src')
70
+ except OSError:
71
+ # In case the current working directory has been renamed or deleted
72
+ sys.exit(
73
+ "The folder you are executing pip from can no longer be found."
74
+ )
75
+
76
+ # under macOS + virtualenv sys.prefix is not properly resolved
77
+ # it is something like /path/to/python/bin/..
78
+ # Note: using realpath due to tmp dirs on OSX being symlinks
79
+ src_prefix = os.path.abspath(src_prefix)
80
+
81
+ # FIXME doesn't account for venv linked to global site-packages
82
+
83
+ site_packages = sysconfig.get_path("purelib")
84
+ # This is because of a bug in PyPy's sysconfig module, see
85
+ # https://bitbucket.org/pypy/pypy/issues/2506/sysconfig-returns-incorrect-paths
86
+ # for more information.
87
+ if platform.python_implementation().lower() == "pypy":
88
+ site_packages = distutils_sysconfig.get_python_lib()
89
+ try:
90
+ # Use getusersitepackages if this is present, as it ensures that the
91
+ # value is initialised properly.
92
+ user_site = site.getusersitepackages()
93
+ except AttributeError:
94
+ user_site = site.USER_SITE
95
+ user_dir = expanduser('~')
96
+ if WINDOWS:
97
+ bin_py = os.path.join(sys.prefix, 'Scripts')
98
+ bin_user = os.path.join(user_site, 'Scripts')
99
+ # buildout uses 'bin' on Windows too?
100
+ if not os.path.exists(bin_py):
101
+ bin_py = os.path.join(sys.prefix, 'bin')
102
+ bin_user = os.path.join(user_site, 'bin')
103
+
104
+ config_basename = 'pip.ini'
105
+
106
+ legacy_storage_dir = os.path.join(user_dir, 'pip')
107
+ legacy_config_file = os.path.join(
108
+ legacy_storage_dir,
109
+ config_basename,
110
+ )
111
+ else:
112
+ bin_py = os.path.join(sys.prefix, 'bin')
113
+ bin_user = os.path.join(user_site, 'bin')
114
+
115
+ config_basename = 'pip.conf'
116
+
117
+ legacy_storage_dir = os.path.join(user_dir, '.pip')
118
+ legacy_config_file = os.path.join(
119
+ legacy_storage_dir,
120
+ config_basename,
121
+ )
122
+ # Forcing to use /usr/local/bin for standard macOS framework installs
123
+ # Also log to ~/Library/Logs/ for use with the Console.app log viewer
124
+ if sys.platform[:6] == 'darwin' and sys.prefix[:16] == '/System/Library/':
125
+ bin_py = '/usr/local/bin'
126
+
127
+ site_config_files = [
128
+ os.path.join(path, config_basename)
129
+ for path in appdirs.site_config_dirs('pip')
130
+ ]
131
+
132
+ venv_config_file = os.path.join(sys.prefix, config_basename)
133
+ new_config_file = os.path.join(appdirs.user_config_dir("pip"), config_basename)
134
+
135
+
136
+ def distutils_scheme(dist_name, user=False, home=None, root=None,
137
+ isolated=False, prefix=None):
138
+ """
139
+ Return a distutils install scheme
140
+ """
141
+ from distutils.dist import Distribution
142
+
143
+ scheme = {}
144
+
145
+ if isolated:
146
+ extra_dist_args = {"script_args": ["--no-user-cfg"]}
147
+ else:
148
+ extra_dist_args = {}
149
+ dist_args = {'name': dist_name}
150
+ dist_args.update(extra_dist_args)
151
+
152
+ d = Distribution(dist_args)
153
+ d.parse_config_files()
154
+ i = d.get_command_obj('install', create=True)
155
+ # NOTE: setting user or home has the side-effect of creating the home dir
156
+ # or user base for installations during finalize_options()
157
+ # ideally, we'd prefer a scheme class that has no side-effects.
158
+ assert not (user and prefix), "user={} prefix={}".format(user, prefix)
159
+ i.user = user or i.user
160
+ if user:
161
+ i.prefix = ""
162
+ i.prefix = prefix or i.prefix
163
+ i.home = home or i.home
164
+ i.root = root or i.root
165
+ i.finalize_options()
166
+ for key in SCHEME_KEYS:
167
+ scheme[key] = getattr(i, 'install_' + key)
168
+
169
+ # install_lib specified in setup.cfg should install *everything*
170
+ # into there (i.e. it takes precedence over both purelib and
171
+ # platlib). Note, i.install_lib is *always* set after
172
+ # finalize_options(); we only want to override here if the user
173
+ # has explicitly requested it hence going back to the config
174
+ if 'install_lib' in d.get_option_dict('install'):
175
+ scheme.update(dict(purelib=i.install_lib, platlib=i.install_lib))
176
+
177
+ if running_under_virtualenv():
178
+ scheme['headers'] = os.path.join(
179
+ sys.prefix,
180
+ 'include',
181
+ 'site',
182
+ 'python' + sys.version[:3],
183
+ dist_name,
184
+ )
185
+
186
+ if root is not None:
187
+ path_no_drive = os.path.splitdrive(
188
+ os.path.abspath(scheme["headers"]))[1]
189
+ scheme["headers"] = os.path.join(
190
+ root,
191
+ path_no_drive[1:],
192
+ )
193
+
194
+ return scheme
@@ -0,0 +1,4 @@
1
+ from pip._internal.models.index import Index, PyPI
2
+
3
+
4
+ __all__ = ["Index", "PyPI"]
@@ -0,0 +1,15 @@
1
+ from pip._vendor.six.moves.urllib import parse as urllib_parse
2
+
3
+
4
+ class Index(object):
5
+ def __init__(self, url):
6
+ self.url = url
7
+ self.netloc = urllib_parse.urlsplit(url).netloc
8
+ self.simple_url = self.url_to_path('simple')
9
+ self.pypi_url = self.url_to_path('pypi')
10
+
11
+ def url_to_path(self, path):
12
+ return urllib_parse.urljoin(self.url, path)
13
+
14
+
15
+ PyPI = Index('https://pypi.python.org/')
@@ -0,0 +1,106 @@
1
+ """Validation of dependencies of packages
2
+ """
3
+
4
+ from collections import namedtuple
5
+
6
+ from pip._vendor.packaging.utils import canonicalize_name
7
+
8
+ from pip._internal.operations.prepare import make_abstract_dist
9
+
10
+ from pip._internal.utils.misc import get_installed_distributions
11
+ from pip._internal.utils.typing import MYPY_CHECK_RUNNING
12
+
13
+ if MYPY_CHECK_RUNNING:
14
+ from pip._internal.req.req_install import InstallRequirement
15
+ from typing import Any, Dict, Iterator, Set, Tuple, List
16
+
17
+ # Shorthands
18
+ PackageSet = Dict[str, 'PackageDetails']
19
+ Missing = Tuple[str, Any]
20
+ Conflicting = Tuple[str, str, Any]
21
+
22
+ MissingDict = Dict[str, List[Missing]]
23
+ ConflictingDict = Dict[str, List[Conflicting]]
24
+ CheckResult = Tuple[MissingDict, ConflictingDict]
25
+
26
+ PackageDetails = namedtuple('PackageDetails', ['version', 'requires'])
27
+
28
+
29
+ def create_package_set_from_installed(**kwargs):
30
+ # type: (**Any) -> PackageSet
31
+ """Converts a list of distributions into a PackageSet.
32
+ """
33
+ # Default to using all packages installed on the system
34
+ if kwargs == {}:
35
+ kwargs = {"local_only": False, "skip": ()}
36
+ retval = {}
37
+ for dist in get_installed_distributions(**kwargs):
38
+ name = canonicalize_name(dist.project_name)
39
+ retval[name] = PackageDetails(dist.version, dist.requires())
40
+ return retval
41
+
42
+
43
+ def check_package_set(package_set):
44
+ # type: (PackageSet) -> CheckResult
45
+ """Check if a package set is consistent
46
+ """
47
+ missing = dict()
48
+ conflicting = dict()
49
+
50
+ for package_name in package_set:
51
+ # Info about dependencies of package_name
52
+ missing_deps = set() # type: Set[Missing]
53
+ conflicting_deps = set() # type: Set[Conflicting]
54
+
55
+ for req in package_set[package_name].requires:
56
+ name = canonicalize_name(req.project_name) # type: str
57
+
58
+ # Check if it's missing
59
+ if name not in package_set:
60
+ missed = True
61
+ if req.marker is not None:
62
+ missed = req.marker.evaluate()
63
+ if missed:
64
+ missing_deps.add((name, req))
65
+ continue
66
+
67
+ # Check if there's a conflict
68
+ version = package_set[name].version # type: str
69
+ if not req.specifier.contains(version, prereleases=True):
70
+ conflicting_deps.add((name, version, req))
71
+
72
+ def str_key(x):
73
+ return str(x)
74
+
75
+ if missing_deps:
76
+ missing[package_name] = sorted(missing_deps, key=str_key)
77
+ if conflicting_deps:
78
+ conflicting[package_name] = sorted(conflicting_deps, key=str_key)
79
+
80
+ return missing, conflicting
81
+
82
+
83
+ def check_install_conflicts(to_install):
84
+ # type: (List[InstallRequirement]) -> Tuple[PackageSet, CheckResult]
85
+ """For checking if the dependency graph would be consistent after \
86
+ installing given requirements
87
+ """
88
+ # Start from the current state
89
+ state = create_package_set_from_installed()
90
+ _simulate_installation_of(to_install, state)
91
+ return state, check_package_set(state)
92
+
93
+
94
+ # NOTE from @pradyunsg
95
+ # This required a minor update in dependency link handling logic over at
96
+ # operations.prepare.IsSDist.dist() to get it working
97
+ def _simulate_installation_of(to_install, state):
98
+ # type: (List[InstallRequirement], PackageSet) -> None
99
+ """Computes the version of packages after installing to_install.
100
+ """
101
+
102
+ # Modify it as installing requirement_set would (assuming no errors)
103
+ for inst_req in to_install:
104
+ dist = make_abstract_dist(inst_req).dist(finder=None)
105
+ name = canonicalize_name(dist.key)
106
+ state[name] = PackageDetails(dist.version, dist.requires())
@@ -0,0 +1,252 @@
1
+ from __future__ import absolute_import
2
+
3
+ import collections
4
+ import logging
5
+ import os
6
+ import re
7
+ import warnings
8
+
9
+ from pip._vendor import pkg_resources, six
10
+ from pip._vendor.packaging.utils import canonicalize_name
11
+ from pip._vendor.pkg_resources import RequirementParseError
12
+
13
+ from pip._internal.exceptions import InstallationError
14
+ from pip._internal.req import InstallRequirement
15
+ from pip._internal.req.req_file import COMMENT_RE
16
+ from pip._internal.utils.deprecation import RemovedInPip11Warning
17
+ from pip._internal.utils.misc import (
18
+ dist_is_editable, get_installed_distributions,
19
+ )
20
+
21
+ logger = logging.getLogger(__name__)
22
+
23
+
24
+ def freeze(
25
+ requirement=None,
26
+ find_links=None, local_only=None, user_only=None, skip_regex=None,
27
+ isolated=False,
28
+ wheel_cache=None,
29
+ exclude_editable=False,
30
+ skip=()):
31
+ find_links = find_links or []
32
+ skip_match = None
33
+
34
+ if skip_regex:
35
+ skip_match = re.compile(skip_regex).search
36
+
37
+ dependency_links = []
38
+
39
+ for dist in pkg_resources.working_set:
40
+ if dist.has_metadata('dependency_links.txt'):
41
+ dependency_links.extend(
42
+ dist.get_metadata_lines('dependency_links.txt')
43
+ )
44
+ for link in find_links:
45
+ if '#egg=' in link:
46
+ dependency_links.append(link)
47
+ for link in find_links:
48
+ yield '-f %s' % link
49
+ installations = {}
50
+ for dist in get_installed_distributions(local_only=local_only,
51
+ skip=(),
52
+ user_only=user_only):
53
+ try:
54
+ req = FrozenRequirement.from_dist(
55
+ dist,
56
+ dependency_links
57
+ )
58
+ except RequirementParseError:
59
+ logger.warning(
60
+ "Could not parse requirement: %s",
61
+ dist.project_name
62
+ )
63
+ continue
64
+ if exclude_editable and req.editable:
65
+ continue
66
+ installations[req.name] = req
67
+
68
+ if requirement:
69
+ # the options that don't get turned into an InstallRequirement
70
+ # should only be emitted once, even if the same option is in multiple
71
+ # requirements files, so we need to keep track of what has been emitted
72
+ # so that we don't emit it again if it's seen again
73
+ emitted_options = set()
74
+ # keep track of which files a requirement is in so that we can
75
+ # give an accurate warning if a requirement appears multiple times.
76
+ req_files = collections.defaultdict(list)
77
+ for req_file_path in requirement:
78
+ with open(req_file_path) as req_file:
79
+ for line in req_file:
80
+ if (not line.strip() or
81
+ line.strip().startswith('#') or
82
+ (skip_match and skip_match(line)) or
83
+ line.startswith((
84
+ '-r', '--requirement',
85
+ '-Z', '--always-unzip',
86
+ '-f', '--find-links',
87
+ '-i', '--index-url',
88
+ '--pre',
89
+ '--trusted-host',
90
+ '--process-dependency-links',
91
+ '--extra-index-url'))):
92
+ line = line.rstrip()
93
+ if line not in emitted_options:
94
+ emitted_options.add(line)
95
+ yield line
96
+ continue
97
+
98
+ if line.startswith('-e') or line.startswith('--editable'):
99
+ if line.startswith('-e'):
100
+ line = line[2:].strip()
101
+ else:
102
+ line = line[len('--editable'):].strip().lstrip('=')
103
+ line_req = InstallRequirement.from_editable(
104
+ line,
105
+ isolated=isolated,
106
+ wheel_cache=wheel_cache,
107
+ )
108
+ else:
109
+ line_req = InstallRequirement.from_line(
110
+ COMMENT_RE.sub('', line).strip(),
111
+ isolated=isolated,
112
+ wheel_cache=wheel_cache,
113
+ )
114
+
115
+ if not line_req.name:
116
+ logger.info(
117
+ "Skipping line in requirement file [%s] because "
118
+ "it's not clear what it would install: %s",
119
+ req_file_path, line.strip(),
120
+ )
121
+ logger.info(
122
+ " (add #egg=PackageName to the URL to avoid"
123
+ " this warning)"
124
+ )
125
+ elif line_req.name not in installations:
126
+ # either it's not installed, or it is installed
127
+ # but has been processed already
128
+ if not req_files[line_req.name]:
129
+ logger.warning(
130
+ "Requirement file [%s] contains %s, but that "
131
+ "package is not installed",
132
+ req_file_path,
133
+ COMMENT_RE.sub('', line).strip(),
134
+ )
135
+ else:
136
+ req_files[line_req.name].append(req_file_path)
137
+ else:
138
+ yield str(installations[line_req.name]).rstrip()
139
+ del installations[line_req.name]
140
+ req_files[line_req.name].append(req_file_path)
141
+
142
+ # Warn about requirements that were included multiple times (in a
143
+ # single requirements file or in different requirements files).
144
+ for name, files in six.iteritems(req_files):
145
+ if len(files) > 1:
146
+ logger.warning("Requirement %s included multiple times [%s]",
147
+ name, ', '.join(sorted(set(files))))
148
+
149
+ yield(
150
+ '## The following requirements were added by '
151
+ 'pip freeze:'
152
+ )
153
+ for installation in sorted(
154
+ installations.values(), key=lambda x: x.name.lower()):
155
+ if canonicalize_name(installation.name) not in skip:
156
+ yield str(installation).rstrip()
157
+
158
+
159
+ class FrozenRequirement(object):
160
+ def __init__(self, name, req, editable, comments=()):
161
+ self.name = name
162
+ self.req = req
163
+ self.editable = editable
164
+ self.comments = comments
165
+
166
+ _rev_re = re.compile(r'-r(\d+)$')
167
+ _date_re = re.compile(r'-(20\d\d\d\d\d\d)$')
168
+
169
+ @classmethod
170
+ def from_dist(cls, dist, dependency_links):
171
+ location = os.path.normcase(os.path.abspath(dist.location))
172
+ comments = []
173
+ from pip._internal.vcs import vcs, get_src_requirement
174
+ if dist_is_editable(dist) and vcs.get_backend_name(location):
175
+ editable = True
176
+ try:
177
+ req = get_src_requirement(dist, location)
178
+ except InstallationError as exc:
179
+ logger.warning(
180
+ "Error when trying to get requirement for VCS system %s, "
181
+ "falling back to uneditable format", exc
182
+ )
183
+ req = None
184
+ if req is None:
185
+ logger.warning(
186
+ 'Could not determine repository location of %s', location
187
+ )
188
+ comments.append(
189
+ '## !! Could not determine repository location'
190
+ )
191
+ req = dist.as_requirement()
192
+ editable = False
193
+ else:
194
+ editable = False
195
+ req = dist.as_requirement()
196
+ specs = req.specs
197
+ assert len(specs) == 1 and specs[0][0] in ["==", "==="], \
198
+ 'Expected 1 spec with == or ===; specs = %r; dist = %r' % \
199
+ (specs, dist)
200
+ version = specs[0][1]
201
+ ver_match = cls._rev_re.search(version)
202
+ date_match = cls._date_re.search(version)
203
+ if ver_match or date_match:
204
+ svn_backend = vcs.get_backend('svn')
205
+ if svn_backend:
206
+ svn_location = svn_backend().get_location(
207
+ dist,
208
+ dependency_links,
209
+ )
210
+ if not svn_location:
211
+ logger.warning(
212
+ 'Warning: cannot find svn location for %s', req,
213
+ )
214
+ comments.append(
215
+ '## FIXME: could not find svn URL in dependency_links '
216
+ 'for this package:'
217
+ )
218
+ else:
219
+ warnings.warn(
220
+ "SVN editable detection based on dependency links "
221
+ "will be dropped in the future.",
222
+ RemovedInPip11Warning,
223
+ )
224
+ comments.append(
225
+ '# Installing as editable to satisfy requirement %s:' %
226
+ req
227
+ )
228
+ if ver_match:
229
+ rev = ver_match.group(1)
230
+ else:
231
+ rev = '{%s}' % date_match.group(1)
232
+ editable = True
233
+ req = '%s@%s#egg=%s' % (
234
+ svn_location,
235
+ rev,
236
+ cls.egg_name(dist)
237
+ )
238
+ return cls(dist.project_name, req, editable, comments)
239
+
240
+ @staticmethod
241
+ def egg_name(dist):
242
+ name = dist.egg_name()
243
+ match = re.search(r'-py\d\.\d$', name)
244
+ if match:
245
+ name = name[:match.start()]
246
+ return name
247
+
248
+ def __str__(self):
249
+ req = self.req
250
+ if self.editable:
251
+ req = '-e %s' % req
252
+ return '\n'.join(list(self.comments) + [str(req)]) + '\n'