com.googler.python 1.0.8 → 1.1.0

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 (365) hide show
  1. package/package.json +1 -1
  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-10.0.0.dist-info/LICENSE.txt +20 -0
  290. package/python3.4.2/lib/python3.4/site-packages/pip-10.0.0.dist-info/METADATA +78 -0
  291. package/python3.4.2/lib/python3.4/site-packages/pip-10.0.0.dist-info/RECORD +294 -0
  292. package/python3.4.2/lib/python3.4/site-packages/{pip-1.5.6.dist-info → pip-10.0.0.dist-info}/WHEEL +6 -6
  293. package/python3.4.2/lib/python3.4/site-packages/pip-10.0.0.dist-info/entry_points.txt +5 -0
  294. package/python3.4.2/lib/python3.4/site-packages/{pip-1.5.6.dist-info → pip-10.0.0.dist-info}/top_level.txt +0 -0
  295. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/__init__.py +0 -16
  296. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/markers.py +0 -119
  297. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/sanitizer.py +0 -271
  298. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/__init__.py +0 -16
  299. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py +0 -320
  300. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py +0 -63
  301. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/re-vendor.py +0 -34
  302. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/__init__.py +0 -3
  303. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py +0 -925
  304. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py +0 -46
  305. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py +0 -106
  306. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py +0 -62
  307. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py +0 -61
  308. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/constants.py +0 -39
  309. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escprober.py +0 -86
  310. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py +0 -242
  311. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py +0 -90
  312. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py +0 -596
  313. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py +0 -86
  314. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py +0 -575
  315. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py +0 -120
  316. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py +0 -91
  317. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py +0 -170
  318. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py +0 -58
  319. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py +0 -205
  320. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connection.py +0 -204
  321. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py +0 -422
  322. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py +0 -126
  323. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py +0 -385
  324. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py +0 -258
  325. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/response.py +0 -308
  326. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py +0 -27
  327. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py +0 -45
  328. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py +0 -68
  329. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py +0 -13
  330. package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py +0 -133
  331. package/python3.4.2/lib/python3.4/site-packages/pip/backwardcompat/__init__.py +0 -138
  332. package/python3.4.2/lib/python3.4/site-packages/pip/basecommand.py +0 -201
  333. package/python3.4.2/lib/python3.4/site-packages/pip/cmdoptions.py +0 -371
  334. package/python3.4.2/lib/python3.4/site-packages/pip/commands/__init__.py +0 -88
  335. package/python3.4.2/lib/python3.4/site-packages/pip/commands/bundle.py +0 -42
  336. package/python3.4.2/lib/python3.4/site-packages/pip/commands/completion.py +0 -59
  337. package/python3.4.2/lib/python3.4/site-packages/pip/commands/freeze.py +0 -114
  338. package/python3.4.2/lib/python3.4/site-packages/pip/commands/install.py +0 -314
  339. package/python3.4.2/lib/python3.4/site-packages/pip/commands/list.py +0 -162
  340. package/python3.4.2/lib/python3.4/site-packages/pip/commands/search.py +0 -132
  341. package/python3.4.2/lib/python3.4/site-packages/pip/commands/show.py +0 -80
  342. package/python3.4.2/lib/python3.4/site-packages/pip/commands/uninstall.py +0 -59
  343. package/python3.4.2/lib/python3.4/site-packages/pip/commands/unzip.py +0 -7
  344. package/python3.4.2/lib/python3.4/site-packages/pip/commands/wheel.py +0 -195
  345. package/python3.4.2/lib/python3.4/site-packages/pip/commands/zip.py +0 -351
  346. package/python3.4.2/lib/python3.4/site-packages/pip/download.py +0 -644
  347. package/python3.4.2/lib/python3.4/site-packages/pip/exceptions.py +0 -46
  348. package/python3.4.2/lib/python3.4/site-packages/pip/index.py +0 -990
  349. package/python3.4.2/lib/python3.4/site-packages/pip/locations.py +0 -171
  350. package/python3.4.2/lib/python3.4/site-packages/pip/log.py +0 -276
  351. package/python3.4.2/lib/python3.4/site-packages/pip/pep425tags.py +0 -102
  352. package/python3.4.2/lib/python3.4/site-packages/pip/req.py +0 -1931
  353. package/python3.4.2/lib/python3.4/site-packages/pip/runner.py +0 -18
  354. package/python3.4.2/lib/python3.4/site-packages/pip/util.py +0 -720
  355. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/__init__.py +0 -251
  356. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/bazaar.py +0 -131
  357. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/git.py +0 -194
  358. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/mercurial.py +0 -151
  359. package/python3.4.2/lib/python3.4/site-packages/pip/vcs/subversion.py +0 -273
  360. package/python3.4.2/lib/python3.4/site-packages/pip/wheel.py +0 -560
  361. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/DESCRIPTION.rst +0 -71
  362. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/METADATA +0 -98
  363. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/RECORD +0 -373
  364. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/entry_points.txt +0 -5
  365. package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/metadata.json +0 -1
@@ -1,251 +0,0 @@
1
- """Handles all VCS (version control) support"""
2
-
3
- import os
4
- import shutil
5
-
6
- from pip.backwardcompat import urlparse, urllib
7
- from pip.log import logger
8
- from pip.util import (display_path, backup_dir, find_command,
9
- rmtree, ask_path_exists)
10
-
11
-
12
- __all__ = ['vcs', 'get_src_requirement']
13
-
14
-
15
- class VcsSupport(object):
16
- _registry = {}
17
- schemes = ['ssh', 'git', 'hg', 'bzr', 'sftp', 'svn']
18
-
19
- def __init__(self):
20
- # Register more schemes with urlparse for various version control systems
21
- urlparse.uses_netloc.extend(self.schemes)
22
- # Python >= 2.7.4, 3.3 doesn't have uses_fragment
23
- if getattr(urlparse, 'uses_fragment', None):
24
- urlparse.uses_fragment.extend(self.schemes)
25
- super(VcsSupport, self).__init__()
26
-
27
- def __iter__(self):
28
- return self._registry.__iter__()
29
-
30
- @property
31
- def backends(self):
32
- return list(self._registry.values())
33
-
34
- @property
35
- def dirnames(self):
36
- return [backend.dirname for backend in self.backends]
37
-
38
- @property
39
- def all_schemes(self):
40
- schemes = []
41
- for backend in self.backends:
42
- schemes.extend(backend.schemes)
43
- return schemes
44
-
45
- def register(self, cls):
46
- if not hasattr(cls, 'name'):
47
- logger.warn('Cannot register VCS %s' % cls.__name__)
48
- return
49
- if cls.name not in self._registry:
50
- self._registry[cls.name] = cls
51
-
52
- def unregister(self, cls=None, name=None):
53
- if name in self._registry:
54
- del self._registry[name]
55
- elif cls in self._registry.values():
56
- del self._registry[cls.name]
57
- else:
58
- logger.warn('Cannot unregister because no class or name given')
59
-
60
- def get_backend_name(self, location):
61
- """
62
- Return the name of the version control backend if found at given
63
- location, e.g. vcs.get_backend_name('/path/to/vcs/checkout')
64
- """
65
- for vc_type in self._registry.values():
66
- path = os.path.join(location, vc_type.dirname)
67
- if os.path.exists(path):
68
- return vc_type.name
69
- return None
70
-
71
- def get_backend(self, name):
72
- name = name.lower()
73
- if name in self._registry:
74
- return self._registry[name]
75
-
76
- def get_backend_from_location(self, location):
77
- vc_type = self.get_backend_name(location)
78
- if vc_type:
79
- return self.get_backend(vc_type)
80
- return None
81
-
82
-
83
- vcs = VcsSupport()
84
-
85
-
86
- class VersionControl(object):
87
- name = ''
88
- dirname = ''
89
-
90
- def __init__(self, url=None, *args, **kwargs):
91
- self.url = url
92
- self._cmd = None
93
- super(VersionControl, self).__init__(*args, **kwargs)
94
-
95
- def _filter(self, line):
96
- return (logger.INFO, line)
97
-
98
- def _is_local_repository(self, repo):
99
- """
100
- posix absolute paths start with os.path.sep,
101
- win32 ones ones start with drive (like c:\\folder)
102
- """
103
- drive, tail = os.path.splitdrive(repo)
104
- return repo.startswith(os.path.sep) or drive
105
-
106
- @property
107
- def cmd(self):
108
- if self._cmd is not None:
109
- return self._cmd
110
- command = find_command(self.name)
111
- logger.info('Found command %r at %r' % (self.name, command))
112
- self._cmd = command
113
- return command
114
-
115
- def get_url_rev(self):
116
- """
117
- Returns the correct repository URL and revision by parsing the given
118
- repository URL
119
- """
120
- error_message = (
121
- "Sorry, '%s' is a malformed VCS url. "
122
- "The format is <vcs>+<protocol>://<url>, "
123
- "e.g. svn+http://myrepo/svn/MyApp#egg=MyApp")
124
- assert '+' in self.url, error_message % self.url
125
- url = self.url.split('+', 1)[1]
126
- scheme, netloc, path, query, frag = urlparse.urlsplit(url)
127
- rev = None
128
- if '@' in path:
129
- path, rev = path.rsplit('@', 1)
130
- url = urlparse.urlunsplit((scheme, netloc, path, query, ''))
131
- return url, rev
132
-
133
- def get_info(self, location):
134
- """
135
- Returns (url, revision), where both are strings
136
- """
137
- assert not location.rstrip('/').endswith(self.dirname), 'Bad directory: %s' % location
138
- return self.get_url(location), self.get_revision(location)
139
-
140
- def normalize_url(self, url):
141
- """
142
- Normalize a URL for comparison by unquoting it and removing any trailing slash.
143
- """
144
- return urllib.unquote(url).rstrip('/')
145
-
146
- def compare_urls(self, url1, url2):
147
- """
148
- Compare two repo URLs for identity, ignoring incidental differences.
149
- """
150
- return (self.normalize_url(url1) == self.normalize_url(url2))
151
-
152
- def parse_vcs_bundle_file(self, content):
153
- """
154
- Takes the contents of the bundled text file that explains how to revert
155
- the stripped off version control data of the given package and returns
156
- the URL and revision of it.
157
- """
158
- raise NotImplementedError
159
-
160
- def obtain(self, dest):
161
- """
162
- Called when installing or updating an editable package, takes the
163
- source path of the checkout.
164
- """
165
- raise NotImplementedError
166
-
167
- def switch(self, dest, url, rev_options):
168
- """
169
- Switch the repo at ``dest`` to point to ``URL``.
170
- """
171
- raise NotImplemented
172
-
173
- def update(self, dest, rev_options):
174
- """
175
- Update an already-existing repo to the given ``rev_options``.
176
- """
177
- raise NotImplementedError
178
-
179
- def check_destination(self, dest, url, rev_options, rev_display):
180
- """
181
- Prepare a location to receive a checkout/clone.
182
-
183
- Return True if the location is ready for (and requires) a
184
- checkout/clone, False otherwise.
185
- """
186
- checkout = True
187
- prompt = False
188
- if os.path.exists(dest):
189
- checkout = False
190
- if os.path.exists(os.path.join(dest, self.dirname)):
191
- existing_url = self.get_url(dest)
192
- if self.compare_urls(existing_url, url):
193
- logger.info('%s in %s exists, and has correct URL (%s)' %
194
- (self.repo_name.title(), display_path(dest),
195
- url))
196
- logger.notify('Updating %s %s%s' %
197
- (display_path(dest), self.repo_name,
198
- rev_display))
199
- self.update(dest, rev_options)
200
- else:
201
- logger.warn('%s %s in %s exists with URL %s' %
202
- (self.name, self.repo_name,
203
- display_path(dest), existing_url))
204
- prompt = ('(s)witch, (i)gnore, (w)ipe, (b)ackup ',
205
- ('s', 'i', 'w', 'b'))
206
- else:
207
- logger.warn('Directory %s already exists, '
208
- 'and is not a %s %s.' %
209
- (dest, self.name, self.repo_name))
210
- prompt = ('(i)gnore, (w)ipe, (b)ackup ', ('i', 'w', 'b'))
211
- if prompt:
212
- logger.warn('The plan is to install the %s repository %s' %
213
- (self.name, url))
214
- response = ask_path_exists('What to do? %s' % prompt[0],
215
- prompt[1])
216
-
217
- if response == 's':
218
- logger.notify('Switching %s %s to %s%s' %
219
- (self.repo_name, display_path(dest), url,
220
- rev_display))
221
- self.switch(dest, url, rev_options)
222
- elif response == 'i':
223
- # do nothing
224
- pass
225
- elif response == 'w':
226
- logger.warn('Deleting %s' % display_path(dest))
227
- rmtree(dest)
228
- checkout = True
229
- elif response == 'b':
230
- dest_dir = backup_dir(dest)
231
- logger.warn('Backing up %s to %s'
232
- % (display_path(dest), dest_dir))
233
- shutil.move(dest, dest_dir)
234
- checkout = True
235
- return checkout
236
-
237
- def unpack(self, location):
238
- if os.path.exists(location):
239
- rmtree(location)
240
- self.obtain(location)
241
-
242
- def get_src_requirement(self, dist, location, find_tags=False):
243
- raise NotImplementedError
244
-
245
-
246
- def get_src_requirement(dist, location, find_tags):
247
- version_control = vcs.get_backend_from_location(location)
248
- if version_control:
249
- return version_control().get_src_requirement(dist, location, find_tags)
250
- logger.warn('cannot determine version of editable source in %s (is not SVN checkout, Git clone, Mercurial clone or Bazaar branch)' % location)
251
- return dist.as_requirement()
@@ -1,131 +0,0 @@
1
- import os
2
- import tempfile
3
- import re
4
- from pip.backwardcompat import urlparse
5
- from pip.log import logger
6
- from pip.util import rmtree, display_path, call_subprocess
7
- from pip.vcs import vcs, VersionControl
8
- from pip.download import path_to_url
9
-
10
-
11
- class Bazaar(VersionControl):
12
- name = 'bzr'
13
- dirname = '.bzr'
14
- repo_name = 'branch'
15
- bundle_file = 'bzr-branch.txt'
16
- schemes = ('bzr', 'bzr+http', 'bzr+https', 'bzr+ssh', 'bzr+sftp', 'bzr+ftp', 'bzr+lp')
17
- guide = ('# This was a Bazaar branch; to make it a branch again run:\n'
18
- 'bzr branch -r %(rev)s %(url)s .\n')
19
-
20
- def __init__(self, url=None, *args, **kwargs):
21
- super(Bazaar, self).__init__(url, *args, **kwargs)
22
- # Python >= 2.7.4, 3.3 doesn't have uses_fragment or non_hierarchical
23
- # Register lp but do not expose as a scheme to support bzr+lp.
24
- if getattr(urlparse, 'uses_fragment', None):
25
- urlparse.uses_fragment.extend(['lp'])
26
- urlparse.non_hierarchical.extend(['lp'])
27
-
28
- def parse_vcs_bundle_file(self, content):
29
- url = rev = None
30
- for line in content.splitlines():
31
- if not line.strip() or line.strip().startswith('#'):
32
- continue
33
- match = re.search(r'^bzr\s*branch\s*-r\s*(\d*)', line)
34
- if match:
35
- rev = match.group(1).strip()
36
- url = line[match.end():].strip().split(None, 1)[0]
37
- if url and rev:
38
- return url, rev
39
- return None, None
40
-
41
- def export(self, location):
42
- """Export the Bazaar repository at the url to the destination location"""
43
- temp_dir = tempfile.mkdtemp('-export', 'pip-')
44
- self.unpack(temp_dir)
45
- if os.path.exists(location):
46
- # Remove the location to make sure Bazaar can export it correctly
47
- rmtree(location)
48
- try:
49
- call_subprocess([self.cmd, 'export', location], cwd=temp_dir,
50
- filter_stdout=self._filter, show_stdout=False)
51
- finally:
52
- rmtree(temp_dir)
53
-
54
- def switch(self, dest, url, rev_options):
55
- call_subprocess([self.cmd, 'switch', url], cwd=dest)
56
-
57
- def update(self, dest, rev_options):
58
- call_subprocess(
59
- [self.cmd, 'pull', '-q'] + rev_options, cwd=dest)
60
-
61
- def obtain(self, dest):
62
- url, rev = self.get_url_rev()
63
- if rev:
64
- rev_options = ['-r', rev]
65
- rev_display = ' (to revision %s)' % rev
66
- else:
67
- rev_options = []
68
- rev_display = ''
69
- if self.check_destination(dest, url, rev_options, rev_display):
70
- logger.notify('Checking out %s%s to %s'
71
- % (url, rev_display, display_path(dest)))
72
- call_subprocess(
73
- [self.cmd, 'branch', '-q'] + rev_options + [url, dest])
74
-
75
- def get_url_rev(self):
76
- # hotfix the URL scheme after removing bzr+ from bzr+ssh:// readd it
77
- url, rev = super(Bazaar, self).get_url_rev()
78
- if url.startswith('ssh://'):
79
- url = 'bzr+' + url
80
- return url, rev
81
-
82
- def get_url(self, location):
83
- urls = call_subprocess(
84
- [self.cmd, 'info'], show_stdout=False, cwd=location)
85
- for line in urls.splitlines():
86
- line = line.strip()
87
- for x in ('checkout of branch: ',
88
- 'parent branch: '):
89
- if line.startswith(x):
90
- repo = line.split(x)[1]
91
- if self._is_local_repository(repo):
92
- return path_to_url(repo)
93
- return repo
94
- return None
95
-
96
- def get_revision(self, location):
97
- revision = call_subprocess(
98
- [self.cmd, 'revno'], show_stdout=False, cwd=location)
99
- return revision.splitlines()[-1]
100
-
101
- def get_tag_revs(self, location):
102
- tags = call_subprocess(
103
- [self.cmd, 'tags'], show_stdout=False, cwd=location)
104
- tag_revs = []
105
- for line in tags.splitlines():
106
- tags_match = re.search(r'([.\w-]+)\s*(.*)$', line)
107
- if tags_match:
108
- tag = tags_match.group(1)
109
- rev = tags_match.group(2)
110
- tag_revs.append((rev.strip(), tag.strip()))
111
- return dict(tag_revs)
112
-
113
- def get_src_requirement(self, dist, location, find_tags):
114
- repo = self.get_url(location)
115
- if not repo.lower().startswith('bzr:'):
116
- repo = 'bzr+' + repo
117
- egg_project_name = dist.egg_name().split('-', 1)[0]
118
- if not repo:
119
- return None
120
- current_rev = self.get_revision(location)
121
- tag_revs = self.get_tag_revs(location)
122
-
123
- if current_rev in tag_revs:
124
- # It's a tag
125
- full_egg_name = '%s-%s' % (egg_project_name, tag_revs[current_rev])
126
- else:
127
- full_egg_name = '%s-dev_r%s' % (dist.egg_name(), current_rev)
128
- return '%s@%s#egg=%s' % (repo, current_rev, full_egg_name)
129
-
130
-
131
- vcs.register(Bazaar)
@@ -1,194 +0,0 @@
1
- import tempfile
2
- import re
3
- import os.path
4
- from pip.util import call_subprocess
5
- from pip.util import display_path, rmtree
6
- from pip.vcs import vcs, VersionControl
7
- from pip.log import logger
8
- from pip.backwardcompat import url2pathname, urlparse
9
- urlsplit = urlparse.urlsplit
10
- urlunsplit = urlparse.urlunsplit
11
-
12
-
13
- class Git(VersionControl):
14
- name = 'git'
15
- dirname = '.git'
16
- repo_name = 'clone'
17
- schemes = ('git', 'git+http', 'git+https', 'git+ssh', 'git+git', 'git+file')
18
- bundle_file = 'git-clone.txt'
19
- guide = ('# This was a Git repo; to make it a repo again run:\n'
20
- 'git init\ngit remote add origin %(url)s -f\ngit checkout %(rev)s\n')
21
-
22
- def __init__(self, url=None, *args, **kwargs):
23
-
24
- # Works around an apparent Git bug
25
- # (see http://article.gmane.org/gmane.comp.version-control.git/146500)
26
- if url:
27
- scheme, netloc, path, query, fragment = urlsplit(url)
28
- if scheme.endswith('file'):
29
- initial_slashes = path[:-len(path.lstrip('/'))]
30
- newpath = initial_slashes + url2pathname(path).replace('\\', '/').lstrip('/')
31
- url = urlunsplit((scheme, netloc, newpath, query, fragment))
32
- after_plus = scheme.find('+') + 1
33
- url = scheme[:after_plus] + urlunsplit((scheme[after_plus:], netloc, newpath, query, fragment))
34
-
35
- super(Git, self).__init__(url, *args, **kwargs)
36
-
37
- def parse_vcs_bundle_file(self, content):
38
- url = rev = None
39
- for line in content.splitlines():
40
- if not line.strip() or line.strip().startswith('#'):
41
- continue
42
- url_match = re.search(r'git\s*remote\s*add\s*origin(.*)\s*-f', line)
43
- if url_match:
44
- url = url_match.group(1).strip()
45
- rev_match = re.search(r'^git\s*checkout\s*-q\s*(.*)\s*', line)
46
- if rev_match:
47
- rev = rev_match.group(1).strip()
48
- if url and rev:
49
- return url, rev
50
- return None, None
51
-
52
- def export(self, location):
53
- """Export the Git repository at the url to the destination location"""
54
- temp_dir = tempfile.mkdtemp('-export', 'pip-')
55
- self.unpack(temp_dir)
56
- try:
57
- if not location.endswith('/'):
58
- location = location + '/'
59
- call_subprocess(
60
- [self.cmd, 'checkout-index', '-a', '-f', '--prefix', location],
61
- filter_stdout=self._filter, show_stdout=False, cwd=temp_dir)
62
- finally:
63
- rmtree(temp_dir)
64
-
65
- def check_rev_options(self, rev, dest, rev_options):
66
- """Check the revision options before checkout to compensate that tags
67
- and branches may need origin/ as a prefix.
68
- Returns the SHA1 of the branch or tag if found.
69
- """
70
- revisions = self.get_refs(dest)
71
-
72
- origin_rev = 'origin/%s' % rev
73
- if origin_rev in revisions:
74
- # remote branch
75
- return [revisions[origin_rev]]
76
- elif rev in revisions:
77
- # a local tag or branch name
78
- return [revisions[rev]]
79
- else:
80
- logger.warn("Could not find a tag or branch '%s', assuming commit." % rev)
81
- return rev_options
82
-
83
- def switch(self, dest, url, rev_options):
84
- call_subprocess(
85
- [self.cmd, 'config', 'remote.origin.url', url], cwd=dest)
86
- call_subprocess(
87
- [self.cmd, 'checkout', '-q'] + rev_options, cwd=dest)
88
-
89
- self.update_submodules(dest)
90
-
91
- def update(self, dest, rev_options):
92
- # First fetch changes from the default remote
93
- call_subprocess([self.cmd, 'fetch', '-q'], cwd=dest)
94
- # Then reset to wanted revision (maby even origin/master)
95
- if rev_options:
96
- rev_options = self.check_rev_options(rev_options[0], dest, rev_options)
97
- call_subprocess([self.cmd, 'reset', '--hard', '-q'] + rev_options, cwd=dest)
98
- #: update submodules
99
- self.update_submodules(dest)
100
-
101
- def obtain(self, dest):
102
- url, rev = self.get_url_rev()
103
- if rev:
104
- rev_options = [rev]
105
- rev_display = ' (to %s)' % rev
106
- else:
107
- rev_options = ['origin/master']
108
- rev_display = ''
109
- if self.check_destination(dest, url, rev_options, rev_display):
110
- logger.notify('Cloning %s%s to %s' % (url, rev_display, display_path(dest)))
111
- call_subprocess([self.cmd, 'clone', '-q', url, dest])
112
- #: repo may contain submodules
113
- self.update_submodules(dest)
114
- if rev:
115
- rev_options = self.check_rev_options(rev, dest, rev_options)
116
- # Only do a checkout if rev_options differs from HEAD
117
- if not self.get_revision(dest).startswith(rev_options[0]):
118
- call_subprocess([self.cmd, 'checkout', '-q'] + rev_options, cwd=dest)
119
-
120
- def get_url(self, location):
121
- url = call_subprocess(
122
- [self.cmd, 'config', 'remote.origin.url'],
123
- show_stdout=False, cwd=location)
124
- return url.strip()
125
-
126
- def get_revision(self, location):
127
- current_rev = call_subprocess(
128
- [self.cmd, 'rev-parse', 'HEAD'], show_stdout=False, cwd=location)
129
- return current_rev.strip()
130
-
131
- def get_refs(self, location):
132
- """Return map of named refs (branches or tags) to commit hashes."""
133
- output = call_subprocess([self.cmd, 'show-ref'],
134
- show_stdout=False, cwd=location)
135
- rv = {}
136
- for line in output.strip().splitlines():
137
- commit, ref = line.split(' ', 1)
138
- ref = ref.strip()
139
- ref_name = None
140
- if ref.startswith('refs/remotes/'):
141
- ref_name = ref[len('refs/remotes/'):]
142
- elif ref.startswith('refs/heads/'):
143
- ref_name = ref[len('refs/heads/'):]
144
- elif ref.startswith('refs/tags/'):
145
- ref_name = ref[len('refs/tags/'):]
146
- if ref_name is not None:
147
- rv[ref_name] = commit.strip()
148
- return rv
149
-
150
- def get_src_requirement(self, dist, location, find_tags):
151
- repo = self.get_url(location)
152
- if not repo.lower().startswith('git:'):
153
- repo = 'git+' + repo
154
- egg_project_name = dist.egg_name().split('-', 1)[0]
155
- if not repo:
156
- return None
157
- current_rev = self.get_revision(location)
158
- refs = self.get_refs(location)
159
- # refs maps names to commit hashes; we need the inverse
160
- # if multiple names map to a single commit, this arbitrarily picks one
161
- names_by_commit = dict((commit, ref) for ref, commit in refs.items())
162
-
163
- if current_rev in names_by_commit:
164
- # It's a tag
165
- full_egg_name = '%s-%s' % (egg_project_name, names_by_commit[current_rev])
166
- else:
167
- full_egg_name = '%s-dev' % egg_project_name
168
-
169
- return '%s@%s#egg=%s' % (repo, current_rev, full_egg_name)
170
-
171
- def get_url_rev(self):
172
- """
173
- Prefixes stub URLs like 'user@hostname:user/repo.git' with 'ssh://'.
174
- That's required because although they use SSH they sometimes doesn't
175
- work with a ssh:// scheme (e.g. Github). But we need a scheme for
176
- parsing. Hence we remove it again afterwards and return it as a stub.
177
- """
178
- if not '://' in self.url:
179
- assert not 'file:' in self.url
180
- self.url = self.url.replace('git+', 'git+ssh://')
181
- url, rev = super(Git, self).get_url_rev()
182
- url = url.replace('ssh://', '')
183
- else:
184
- url, rev = super(Git, self).get_url_rev()
185
-
186
- return url, rev
187
-
188
- def update_submodules(self, location):
189
- if not os.path.exists(os.path.join(location, '.gitmodules')):
190
- return
191
- call_subprocess([self.cmd, 'submodule', 'update', '--init', '--recursive', '-q'],
192
- cwd=location)
193
-
194
- vcs.register(Git)