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.
- package/package.json +4 -2
- package/python3.4.2/lib/python3.4/site-packages/pip/__init__.py +1 -277
- package/python3.4.2/lib/python3.4/site-packages/pip/__main__.py +19 -7
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/__init__.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/basecommand.py +373 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/{baseparser.py → _internal/baseparser.py} +240 -224
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/build_env.py +92 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/cache.py +202 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/cmdoptions.py +609 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/__init__.py +79 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/check.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/completion.py +94 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/configuration.py +227 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/download.py +233 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/freeze.py +96 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/hash.py +57 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/{commands → _internal/commands}/help.py +36 -33
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/install.py +477 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/list.py +343 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/search.py +135 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/show.py +164 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/uninstall.py +71 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/commands/wheel.py +179 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/compat.py +235 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/configuration.py +378 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/download.py +922 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/exceptions.py +249 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/index.py +1117 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/locations.py +194 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/models/__init__.py +4 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/models/index.py +15 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/{_vendor/requests/packages/urllib3/contrib → _internal/operations}/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/check.py +106 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/freeze.py +252 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/operations/prepare.py +378 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/pep425tags.py +317 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/__init__.py +69 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_file.py +338 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_install.py +1115 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_set.py +164 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/req/req_uninstall.py +455 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/resolve.py +354 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/{status_codes.py → _internal/status_codes.py} +8 -6
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/appdirs.py +258 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/deprecation.py +77 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/encoding.py +33 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/filesystem.py +28 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/glibc.py +84 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/hashes.py +94 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/logging.py +132 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/misc.py +851 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/outdated.py +163 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/packaging.py +70 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/setuptools_build.py +8 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/temp_dir.py +82 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/typing.py +29 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/utils/ui.py +421 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/__init__.py +471 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/bazaar.py +113 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/git.py +311 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/mercurial.py +105 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/vcs/subversion.py +271 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_internal/wheel.py +817 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/__init__.py +109 -8
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/appdirs.py +604 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/__init__.py +11 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/_cmd.py +60 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/adapter.py +134 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/cache.py +39 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +2 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +133 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +43 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/compat.py +29 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/controller.py +373 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/filewrapper.py +78 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/heuristics.py +138 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/serialize.py +194 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/cachecontrol/wrapper.py +27 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/__init__.py +3 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/__main__.py +2 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests → certifi}/cacert.pem +1765 -2358
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/certifi/core.py +37 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/__init__.py +39 -32
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/big5freq.py +386 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/big5prober.py +47 -42
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/chardistribution.py +233 -231
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/charsetgroupprober.py +106 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/charsetprober.py +145 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/cli/__init__.py +1 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/cli/chardetect.py +85 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/codingstatemachine.py +88 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/compat.py +34 -34
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/cp949prober.py +49 -44
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/enums.py +76 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/escprober.py +101 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/escsm.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/eucjpprober.py +92 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/euckrfreq.py +195 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euckrprober.py +47 -42
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euctwfreq.py +387 -428
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/euctwprober.py +46 -41
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/gb2312freq.py +283 -472
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/gb2312prober.py +46 -41
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/hebrewprober.py +292 -283
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/jisfreq.py +325 -569
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/jpcntx.py +233 -219
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langbulgarianmodel.py +228 -229
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langcyrillicmodel.py +333 -329
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langgreekmodel.py +225 -225
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langhebrewmodel.py +200 -201
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langhungarianmodel.py +225 -225
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/langthaimodel.py +199 -200
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/langturkishmodel.py +193 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/latin1prober.py +145 -139
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/mbcharsetprober.py +91 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/mbcsgroupprober.py +54 -54
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/mbcssm.py +572 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/sbcharsetprober.py +132 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/sbcsgroupprober.py +73 -69
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/sjisprober.py +92 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/universaldetector.py +286 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/chardet → chardet}/utf8prober.py +82 -76
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/chardet/version.py +9 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/__init__.py +7 -7
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansi.py +102 -50
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/ansitowin32.py +236 -190
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/initialise.py +82 -56
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/win32.py +156 -137
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/colorama/winterm.py +162 -120
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/__init__.py +23 -23
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/__init__.py +6 -6
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/misc.py +41 -41
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/shutil.py +761 -761
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg +84 -84
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/sysconfig.py +788 -788
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/tarfile.py +2607 -2607
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/compat.py +1117 -1064
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/database.py +1318 -1301
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/index.py +516 -488
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/locators.py +1292 -1194
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/manifest.py +393 -364
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/markers.py +131 -190
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/metadata.py +1068 -1026
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/resources.py +355 -317
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/scripts.py +415 -323
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/t64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/util.py +1755 -1575
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/version.py +736 -721
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w32.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/w64.exe +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distlib/wheel.py +984 -958
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/distro.py +1104 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/__init__.py +35 -23
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{ihatexml.py → _ihatexml.py} +288 -285
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{inputstream.py → _inputstream.py} +923 -881
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{tokenizer.py → _tokenizer.py} +1721 -1731
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/__init__.py +14 -12
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/_base.py +37 -37
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/datrie.py +44 -44
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{trie → _trie}/py.py +67 -67
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/{utils.py → _utils.py} +124 -82
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/constants.py +2947 -3104
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/alphabeticalattributes.py +29 -20
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/{_base.py → base.py} +12 -12
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py +73 -65
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/lint.py +93 -93
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/optionaltags.py +207 -205
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/sanitizer.py +896 -12
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/filters/whitespace.py +38 -38
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/html5parser.py +2791 -2713
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer.py +409 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/__init__.py +30 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/genshi.py +54 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treeadapters/sax.py +50 -44
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py +88 -76
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/{_base.py → base.py} +417 -377
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/dom.py +236 -227
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree.py +340 -337
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py +366 -369
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/__init__.py +154 -57
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{_base.py → base.py} +252 -200
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/dom.py +43 -46
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/etree.py +130 -138
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{lxmletree.py → etree_lxml.py} +213 -208
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/{genshistream.py → genshi.py} +69 -69
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/__init__.py +2 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/codec.py +118 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/compat.py +12 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/core.py +387 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/idnadata.py +1585 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/intranges.py +53 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/package_data.py +2 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/idna/uts46data.py +7634 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/ipaddress.py +2419 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/__init__.py +347 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/linklockfile.py +73 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/mkdirlockfile.py +84 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/pidlockfile.py +190 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/sqlitelockfile.py +156 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/lockfile/symlinklockfile.py +70 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/__init__.py +66 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/_version.py +1 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/exceptions.py +41 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/msgpack/fallback.py +971 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/__about__.py +21 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/__init__.py +14 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/_compat.py +30 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/_structures.py +70 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/markers.py +301 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/requirements.py +130 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/specifiers.py +774 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/utils.py +63 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/packaging/version.py +441 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{pkg_resources.py → pkg_resources/__init__.py} +3125 -2762
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pkg_resources/py31compat.py +22 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/__init__.py +127 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/bar.py +88 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/counter.py +48 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/helpers.py +91 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/progress/spinner.py +44 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pyparsing.py +5720 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/__init__.py +3 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/core.py +13 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/parser.py +374 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/pytoml/writer.py +127 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__init__.py +123 -77
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/__version__.py +14 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/_internal_utils.py +42 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/adapters.py +525 -388
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/api.py +152 -120
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/auth.py +293 -193
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/certs.py +18 -24
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/compat.py +73 -115
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/cookies.py +542 -454
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/exceptions.py +122 -75
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/help.py +120 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/hooks.py +34 -45
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/models.py +948 -803
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages.py +16 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/sessions.py +737 -637
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/status_codes.py +91 -88
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/structures.py +105 -127
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/utils.py +904 -673
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/retrying.py +267 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/six.py +891 -646
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/__init__.py +97 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/_collections.py +319 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/connection.py +373 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/connectionpool.py +905 -710
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +593 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +343 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/appengine.py +296 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/contrib/ntlmpool.py +112 -120
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +455 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +810 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/contrib/socks.py +188 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/exceptions.py +246 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/fields.py +178 -177
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/filepost.py +94 -100
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/__init__.py +5 -4
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +53 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ordered_dict.py +259 -260
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/packages/six.py +868 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ssl_match_hostname/__init__.py +19 -13
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/packages/ssl_match_hostname/_implementation.py +157 -105
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/poolmanager.py +440 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/request.py +148 -141
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/response.py +626 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/__init__.py +54 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/connection.py +130 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/request.py +118 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/response.py +81 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/retry.py +401 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/selectors.py +581 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/ssl_.py +341 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/util/timeout.py +242 -234
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/{requests/packages/urllib3 → urllib3}/util/url.py +230 -162
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/urllib3/util/wait.py +40 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/__init__.py +342 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/labels.py +231 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/mklabels.py +59 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/tests.py +153 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/webencodings/x_user_defined.py +325 -0
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/__init__.py +0 -16
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/_markerlib/markers.py +0 -119
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/sanitizer.py +0 -271
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/__init__.py +0 -16
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/serializer/htmlserializer.py +0 -320
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py +0 -63
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/re-vendor.py +0 -34
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/__init__.py +0 -3
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/big5freq.py +0 -925
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/chardetect.py +0 -46
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py +0 -106
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/charsetprober.py +0 -62
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py +0 -61
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/constants.py +0 -39
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escprober.py +0 -86
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/escsm.py +0 -242
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py +0 -90
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/euckrfreq.py +0 -596
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py +0 -86
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py +0 -575
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py +0 -120
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py +0 -91
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/universaldetector.py +0 -170
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/__init__.py +0 -58
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/_collections.py +0 -205
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/connection.py +0 -204
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py +0 -422
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/exceptions.py +0 -126
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/packages/six.py +0 -385
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/poolmanager.py +0 -258
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/response.py +0 -308
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/__init__.py +0 -27
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/connection.py +0 -45
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/request.py +0 -68
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py +0 -13
- package/python3.4.2/lib/python3.4/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py +0 -133
- package/python3.4.2/lib/python3.4/site-packages/pip/backwardcompat/__init__.py +0 -138
- package/python3.4.2/lib/python3.4/site-packages/pip/basecommand.py +0 -201
- package/python3.4.2/lib/python3.4/site-packages/pip/cmdoptions.py +0 -371
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/__init__.py +0 -88
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/bundle.py +0 -42
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/completion.py +0 -59
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/freeze.py +0 -114
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/install.py +0 -314
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/list.py +0 -162
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/search.py +0 -132
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/show.py +0 -80
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/uninstall.py +0 -59
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/unzip.py +0 -7
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/wheel.py +0 -195
- package/python3.4.2/lib/python3.4/site-packages/pip/commands/zip.py +0 -351
- package/python3.4.2/lib/python3.4/site-packages/pip/download.py +0 -644
- package/python3.4.2/lib/python3.4/site-packages/pip/exceptions.py +0 -46
- package/python3.4.2/lib/python3.4/site-packages/pip/index.py +0 -990
- package/python3.4.2/lib/python3.4/site-packages/pip/locations.py +0 -171
- package/python3.4.2/lib/python3.4/site-packages/pip/log.py +0 -276
- package/python3.4.2/lib/python3.4/site-packages/pip/pep425tags.py +0 -102
- package/python3.4.2/lib/python3.4/site-packages/pip/req.py +0 -1931
- package/python3.4.2/lib/python3.4/site-packages/pip/runner.py +0 -18
- package/python3.4.2/lib/python3.4/site-packages/pip/util.py +0 -720
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/__init__.py +0 -251
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/bazaar.py +0 -131
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/git.py +0 -194
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/mercurial.py +0 -151
- package/python3.4.2/lib/python3.4/site-packages/pip/vcs/subversion.py +0 -273
- package/python3.4.2/lib/python3.4/site-packages/pip/wheel.py +0 -560
|
@@ -0,0 +1,471 @@
|
|
|
1
|
+
"""Handles all VCS (version control) support"""
|
|
2
|
+
from __future__ import absolute_import
|
|
3
|
+
|
|
4
|
+
import copy
|
|
5
|
+
import errno
|
|
6
|
+
import logging
|
|
7
|
+
import os
|
|
8
|
+
import shutil
|
|
9
|
+
import sys
|
|
10
|
+
|
|
11
|
+
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
|
12
|
+
|
|
13
|
+
from pip._internal.exceptions import BadCommand
|
|
14
|
+
from pip._internal.utils.misc import (
|
|
15
|
+
display_path, backup_dir, call_subprocess, rmtree, ask_path_exists,
|
|
16
|
+
)
|
|
17
|
+
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
|
|
18
|
+
|
|
19
|
+
if MYPY_CHECK_RUNNING:
|
|
20
|
+
from typing import Dict, Optional, Tuple
|
|
21
|
+
from pip._internal.basecommand import Command
|
|
22
|
+
|
|
23
|
+
__all__ = ['vcs', 'get_src_requirement']
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
logger = logging.getLogger(__name__)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class RevOptions(object):
|
|
30
|
+
|
|
31
|
+
"""
|
|
32
|
+
Encapsulates a VCS-specific revision to install, along with any VCS
|
|
33
|
+
install options.
|
|
34
|
+
|
|
35
|
+
Instances of this class should be treated as if immutable.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self, vcs, rev=None, extra_args=None):
|
|
39
|
+
"""
|
|
40
|
+
Args:
|
|
41
|
+
vcs: a VersionControl object.
|
|
42
|
+
rev: the name of the revision to install.
|
|
43
|
+
extra_args: a list of extra options.
|
|
44
|
+
"""
|
|
45
|
+
if extra_args is None:
|
|
46
|
+
extra_args = []
|
|
47
|
+
|
|
48
|
+
self.extra_args = extra_args
|
|
49
|
+
self.rev = rev
|
|
50
|
+
self.vcs = vcs
|
|
51
|
+
|
|
52
|
+
def __repr__(self):
|
|
53
|
+
return '<RevOptions {}: rev={!r}>'.format(self.vcs.name, self.rev)
|
|
54
|
+
|
|
55
|
+
@property
|
|
56
|
+
def arg_rev(self):
|
|
57
|
+
if self.rev is None:
|
|
58
|
+
return self.vcs.default_arg_rev
|
|
59
|
+
|
|
60
|
+
return self.rev
|
|
61
|
+
|
|
62
|
+
def to_args(self):
|
|
63
|
+
"""
|
|
64
|
+
Return the VCS-specific command arguments.
|
|
65
|
+
"""
|
|
66
|
+
args = []
|
|
67
|
+
rev = self.arg_rev
|
|
68
|
+
if rev is not None:
|
|
69
|
+
args += self.vcs.get_base_rev_args(rev)
|
|
70
|
+
args += self.extra_args
|
|
71
|
+
|
|
72
|
+
return args
|
|
73
|
+
|
|
74
|
+
def to_display(self):
|
|
75
|
+
if not self.rev:
|
|
76
|
+
return ''
|
|
77
|
+
|
|
78
|
+
return ' (to revision {})'.format(self.rev)
|
|
79
|
+
|
|
80
|
+
def make_new(self, rev):
|
|
81
|
+
"""
|
|
82
|
+
Make a copy of the current instance, but with a new rev.
|
|
83
|
+
|
|
84
|
+
Args:
|
|
85
|
+
rev: the name of the revision for the new object.
|
|
86
|
+
"""
|
|
87
|
+
return self.vcs.make_rev_options(rev, extra_args=self.extra_args)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class VcsSupport(object):
|
|
91
|
+
_registry = {} # type: Dict[str, Command]
|
|
92
|
+
schemes = ['ssh', 'git', 'hg', 'bzr', 'sftp', 'svn']
|
|
93
|
+
|
|
94
|
+
def __init__(self):
|
|
95
|
+
# Register more schemes with urlparse for various version control
|
|
96
|
+
# systems
|
|
97
|
+
urllib_parse.uses_netloc.extend(self.schemes)
|
|
98
|
+
# Python >= 2.7.4, 3.3 doesn't have uses_fragment
|
|
99
|
+
if getattr(urllib_parse, 'uses_fragment', None):
|
|
100
|
+
urllib_parse.uses_fragment.extend(self.schemes)
|
|
101
|
+
super(VcsSupport, self).__init__()
|
|
102
|
+
|
|
103
|
+
def __iter__(self):
|
|
104
|
+
return self._registry.__iter__()
|
|
105
|
+
|
|
106
|
+
@property
|
|
107
|
+
def backends(self):
|
|
108
|
+
return list(self._registry.values())
|
|
109
|
+
|
|
110
|
+
@property
|
|
111
|
+
def dirnames(self):
|
|
112
|
+
return [backend.dirname for backend in self.backends]
|
|
113
|
+
|
|
114
|
+
@property
|
|
115
|
+
def all_schemes(self):
|
|
116
|
+
schemes = []
|
|
117
|
+
for backend in self.backends:
|
|
118
|
+
schemes.extend(backend.schemes)
|
|
119
|
+
return schemes
|
|
120
|
+
|
|
121
|
+
def register(self, cls):
|
|
122
|
+
if not hasattr(cls, 'name'):
|
|
123
|
+
logger.warning('Cannot register VCS %s', cls.__name__)
|
|
124
|
+
return
|
|
125
|
+
if cls.name not in self._registry:
|
|
126
|
+
self._registry[cls.name] = cls
|
|
127
|
+
logger.debug('Registered VCS backend: %s', cls.name)
|
|
128
|
+
|
|
129
|
+
def unregister(self, cls=None, name=None):
|
|
130
|
+
if name in self._registry:
|
|
131
|
+
del self._registry[name]
|
|
132
|
+
elif cls in self._registry.values():
|
|
133
|
+
del self._registry[cls.name]
|
|
134
|
+
else:
|
|
135
|
+
logger.warning('Cannot unregister because no class or name given')
|
|
136
|
+
|
|
137
|
+
def get_backend_name(self, location):
|
|
138
|
+
"""
|
|
139
|
+
Return the name of the version control backend if found at given
|
|
140
|
+
location, e.g. vcs.get_backend_name('/path/to/vcs/checkout')
|
|
141
|
+
"""
|
|
142
|
+
for vc_type in self._registry.values():
|
|
143
|
+
if vc_type.controls_location(location):
|
|
144
|
+
logger.debug('Determine that %s uses VCS: %s',
|
|
145
|
+
location, vc_type.name)
|
|
146
|
+
return vc_type.name
|
|
147
|
+
return None
|
|
148
|
+
|
|
149
|
+
def get_backend(self, name):
|
|
150
|
+
name = name.lower()
|
|
151
|
+
if name in self._registry:
|
|
152
|
+
return self._registry[name]
|
|
153
|
+
|
|
154
|
+
def get_backend_from_location(self, location):
|
|
155
|
+
vc_type = self.get_backend_name(location)
|
|
156
|
+
if vc_type:
|
|
157
|
+
return self.get_backend(vc_type)
|
|
158
|
+
return None
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
vcs = VcsSupport()
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class VersionControl(object):
|
|
165
|
+
name = ''
|
|
166
|
+
dirname = ''
|
|
167
|
+
# List of supported schemes for this Version Control
|
|
168
|
+
schemes = () # type: Tuple[str, ...]
|
|
169
|
+
# Iterable of environment variable names to pass to call_subprocess().
|
|
170
|
+
unset_environ = () # type: Tuple[str, ...]
|
|
171
|
+
default_arg_rev = None # type: Optional[str]
|
|
172
|
+
|
|
173
|
+
def __init__(self, url=None, *args, **kwargs):
|
|
174
|
+
self.url = url
|
|
175
|
+
super(VersionControl, self).__init__(*args, **kwargs)
|
|
176
|
+
|
|
177
|
+
def get_base_rev_args(self, rev):
|
|
178
|
+
"""
|
|
179
|
+
Return the base revision arguments for a vcs command.
|
|
180
|
+
|
|
181
|
+
Args:
|
|
182
|
+
rev: the name of a revision to install. Cannot be None.
|
|
183
|
+
"""
|
|
184
|
+
raise NotImplementedError
|
|
185
|
+
|
|
186
|
+
def make_rev_options(self, rev=None, extra_args=None):
|
|
187
|
+
"""
|
|
188
|
+
Return a RevOptions object.
|
|
189
|
+
|
|
190
|
+
Args:
|
|
191
|
+
rev: the name of a revision to install.
|
|
192
|
+
extra_args: a list of extra options.
|
|
193
|
+
"""
|
|
194
|
+
return RevOptions(self, rev, extra_args=extra_args)
|
|
195
|
+
|
|
196
|
+
def _is_local_repository(self, repo):
|
|
197
|
+
"""
|
|
198
|
+
posix absolute paths start with os.path.sep,
|
|
199
|
+
win32 ones start with drive (like c:\\folder)
|
|
200
|
+
"""
|
|
201
|
+
drive, tail = os.path.splitdrive(repo)
|
|
202
|
+
return repo.startswith(os.path.sep) or drive
|
|
203
|
+
|
|
204
|
+
# See issue #1083 for why this method was introduced:
|
|
205
|
+
# https://github.com/pypa/pip/issues/1083
|
|
206
|
+
def translate_egg_surname(self, surname):
|
|
207
|
+
# For example, Django has branches of the form "stable/1.7.x".
|
|
208
|
+
return surname.replace('/', '_')
|
|
209
|
+
|
|
210
|
+
def export(self, location):
|
|
211
|
+
"""
|
|
212
|
+
Export the repository at the url to the destination location
|
|
213
|
+
i.e. only download the files, without vcs informations
|
|
214
|
+
"""
|
|
215
|
+
raise NotImplementedError
|
|
216
|
+
|
|
217
|
+
def get_url_rev(self):
|
|
218
|
+
"""
|
|
219
|
+
Returns the correct repository URL and revision by parsing the given
|
|
220
|
+
repository URL
|
|
221
|
+
"""
|
|
222
|
+
error_message = (
|
|
223
|
+
"Sorry, '%s' is a malformed VCS url. "
|
|
224
|
+
"The format is <vcs>+<protocol>://<url>, "
|
|
225
|
+
"e.g. svn+http://myrepo/svn/MyApp#egg=MyApp"
|
|
226
|
+
)
|
|
227
|
+
assert '+' in self.url, error_message % self.url
|
|
228
|
+
url = self.url.split('+', 1)[1]
|
|
229
|
+
scheme, netloc, path, query, frag = urllib_parse.urlsplit(url)
|
|
230
|
+
rev = None
|
|
231
|
+
if '@' in path:
|
|
232
|
+
path, rev = path.rsplit('@', 1)
|
|
233
|
+
url = urllib_parse.urlunsplit((scheme, netloc, path, query, ''))
|
|
234
|
+
return url, rev
|
|
235
|
+
|
|
236
|
+
def get_info(self, location):
|
|
237
|
+
"""
|
|
238
|
+
Returns (url, revision), where both are strings
|
|
239
|
+
"""
|
|
240
|
+
assert not location.rstrip('/').endswith(self.dirname), \
|
|
241
|
+
'Bad directory: %s' % location
|
|
242
|
+
return self.get_url(location), self.get_revision(location)
|
|
243
|
+
|
|
244
|
+
def normalize_url(self, url):
|
|
245
|
+
"""
|
|
246
|
+
Normalize a URL for comparison by unquoting it and removing any
|
|
247
|
+
trailing slash.
|
|
248
|
+
"""
|
|
249
|
+
return urllib_parse.unquote(url).rstrip('/')
|
|
250
|
+
|
|
251
|
+
def compare_urls(self, url1, url2):
|
|
252
|
+
"""
|
|
253
|
+
Compare two repo URLs for identity, ignoring incidental differences.
|
|
254
|
+
"""
|
|
255
|
+
return (self.normalize_url(url1) == self.normalize_url(url2))
|
|
256
|
+
|
|
257
|
+
def obtain(self, dest):
|
|
258
|
+
"""
|
|
259
|
+
Called when installing or updating an editable package, takes the
|
|
260
|
+
source path of the checkout.
|
|
261
|
+
"""
|
|
262
|
+
raise NotImplementedError
|
|
263
|
+
|
|
264
|
+
def switch(self, dest, url, rev_options):
|
|
265
|
+
"""
|
|
266
|
+
Switch the repo at ``dest`` to point to ``URL``.
|
|
267
|
+
|
|
268
|
+
Args:
|
|
269
|
+
rev_options: a RevOptions object.
|
|
270
|
+
"""
|
|
271
|
+
raise NotImplementedError
|
|
272
|
+
|
|
273
|
+
def update(self, dest, rev_options):
|
|
274
|
+
"""
|
|
275
|
+
Update an already-existing repo to the given ``rev_options``.
|
|
276
|
+
|
|
277
|
+
Args:
|
|
278
|
+
rev_options: a RevOptions object.
|
|
279
|
+
"""
|
|
280
|
+
raise NotImplementedError
|
|
281
|
+
|
|
282
|
+
def is_commit_id_equal(self, dest, name):
|
|
283
|
+
"""
|
|
284
|
+
Return whether the id of the current commit equals the given name.
|
|
285
|
+
|
|
286
|
+
Args:
|
|
287
|
+
dest: the repository directory.
|
|
288
|
+
name: a string name.
|
|
289
|
+
"""
|
|
290
|
+
raise NotImplementedError
|
|
291
|
+
|
|
292
|
+
def check_destination(self, dest, url, rev_options):
|
|
293
|
+
"""
|
|
294
|
+
Prepare a location to receive a checkout/clone.
|
|
295
|
+
|
|
296
|
+
Return True if the location is ready for (and requires) a
|
|
297
|
+
checkout/clone, False otherwise.
|
|
298
|
+
|
|
299
|
+
Args:
|
|
300
|
+
rev_options: a RevOptions object.
|
|
301
|
+
"""
|
|
302
|
+
checkout = True
|
|
303
|
+
prompt = False
|
|
304
|
+
rev_display = rev_options.to_display()
|
|
305
|
+
if os.path.exists(dest):
|
|
306
|
+
checkout = False
|
|
307
|
+
if os.path.exists(os.path.join(dest, self.dirname)):
|
|
308
|
+
existing_url = self.get_url(dest)
|
|
309
|
+
if self.compare_urls(existing_url, url):
|
|
310
|
+
logger.debug(
|
|
311
|
+
'%s in %s exists, and has correct URL (%s)',
|
|
312
|
+
self.repo_name.title(),
|
|
313
|
+
display_path(dest),
|
|
314
|
+
url,
|
|
315
|
+
)
|
|
316
|
+
if not self.is_commit_id_equal(dest, rev_options.rev):
|
|
317
|
+
logger.info(
|
|
318
|
+
'Updating %s %s%s',
|
|
319
|
+
display_path(dest),
|
|
320
|
+
self.repo_name,
|
|
321
|
+
rev_display,
|
|
322
|
+
)
|
|
323
|
+
self.update(dest, rev_options)
|
|
324
|
+
else:
|
|
325
|
+
logger.info(
|
|
326
|
+
'Skipping because already up-to-date.')
|
|
327
|
+
else:
|
|
328
|
+
logger.warning(
|
|
329
|
+
'%s %s in %s exists with URL %s',
|
|
330
|
+
self.name,
|
|
331
|
+
self.repo_name,
|
|
332
|
+
display_path(dest),
|
|
333
|
+
existing_url,
|
|
334
|
+
)
|
|
335
|
+
prompt = ('(s)witch, (i)gnore, (w)ipe, (b)ackup ',
|
|
336
|
+
('s', 'i', 'w', 'b'))
|
|
337
|
+
else:
|
|
338
|
+
logger.warning(
|
|
339
|
+
'Directory %s already exists, and is not a %s %s.',
|
|
340
|
+
dest,
|
|
341
|
+
self.name,
|
|
342
|
+
self.repo_name,
|
|
343
|
+
)
|
|
344
|
+
prompt = ('(i)gnore, (w)ipe, (b)ackup ', ('i', 'w', 'b'))
|
|
345
|
+
if prompt:
|
|
346
|
+
logger.warning(
|
|
347
|
+
'The plan is to install the %s repository %s',
|
|
348
|
+
self.name,
|
|
349
|
+
url,
|
|
350
|
+
)
|
|
351
|
+
response = ask_path_exists('What to do? %s' % prompt[0],
|
|
352
|
+
prompt[1])
|
|
353
|
+
|
|
354
|
+
if response == 's':
|
|
355
|
+
logger.info(
|
|
356
|
+
'Switching %s %s to %s%s',
|
|
357
|
+
self.repo_name,
|
|
358
|
+
display_path(dest),
|
|
359
|
+
url,
|
|
360
|
+
rev_display,
|
|
361
|
+
)
|
|
362
|
+
self.switch(dest, url, rev_options)
|
|
363
|
+
elif response == 'i':
|
|
364
|
+
# do nothing
|
|
365
|
+
pass
|
|
366
|
+
elif response == 'w':
|
|
367
|
+
logger.warning('Deleting %s', display_path(dest))
|
|
368
|
+
rmtree(dest)
|
|
369
|
+
checkout = True
|
|
370
|
+
elif response == 'b':
|
|
371
|
+
dest_dir = backup_dir(dest)
|
|
372
|
+
logger.warning(
|
|
373
|
+
'Backing up %s to %s', display_path(dest), dest_dir,
|
|
374
|
+
)
|
|
375
|
+
shutil.move(dest, dest_dir)
|
|
376
|
+
checkout = True
|
|
377
|
+
elif response == 'a':
|
|
378
|
+
sys.exit(-1)
|
|
379
|
+
return checkout
|
|
380
|
+
|
|
381
|
+
def unpack(self, location):
|
|
382
|
+
"""
|
|
383
|
+
Clean up current location and download the url repository
|
|
384
|
+
(and vcs infos) into location
|
|
385
|
+
"""
|
|
386
|
+
if os.path.exists(location):
|
|
387
|
+
rmtree(location)
|
|
388
|
+
self.obtain(location)
|
|
389
|
+
|
|
390
|
+
def get_src_requirement(self, dist, location):
|
|
391
|
+
"""
|
|
392
|
+
Return a string representing the requirement needed to
|
|
393
|
+
redownload the files currently present in location, something
|
|
394
|
+
like:
|
|
395
|
+
{repository_url}@{revision}#egg={project_name}-{version_identifier}
|
|
396
|
+
"""
|
|
397
|
+
raise NotImplementedError
|
|
398
|
+
|
|
399
|
+
def get_url(self, location):
|
|
400
|
+
"""
|
|
401
|
+
Return the url used at location
|
|
402
|
+
Used in get_info or check_destination
|
|
403
|
+
"""
|
|
404
|
+
raise NotImplementedError
|
|
405
|
+
|
|
406
|
+
def get_revision(self, location):
|
|
407
|
+
"""
|
|
408
|
+
Return the current commit id of the files at the given location.
|
|
409
|
+
"""
|
|
410
|
+
raise NotImplementedError
|
|
411
|
+
|
|
412
|
+
def run_command(self, cmd, show_stdout=True, cwd=None,
|
|
413
|
+
on_returncode='raise',
|
|
414
|
+
command_desc=None,
|
|
415
|
+
extra_environ=None, spinner=None):
|
|
416
|
+
"""
|
|
417
|
+
Run a VCS subcommand
|
|
418
|
+
This is simply a wrapper around call_subprocess that adds the VCS
|
|
419
|
+
command name, and checks that the VCS is available
|
|
420
|
+
"""
|
|
421
|
+
cmd = [self.name] + cmd
|
|
422
|
+
try:
|
|
423
|
+
return call_subprocess(cmd, show_stdout, cwd,
|
|
424
|
+
on_returncode,
|
|
425
|
+
command_desc, extra_environ,
|
|
426
|
+
unset_environ=self.unset_environ,
|
|
427
|
+
spinner=spinner)
|
|
428
|
+
except OSError as e:
|
|
429
|
+
# errno.ENOENT = no such file or directory
|
|
430
|
+
# In other words, the VCS executable isn't available
|
|
431
|
+
if e.errno == errno.ENOENT:
|
|
432
|
+
raise BadCommand(
|
|
433
|
+
'Cannot find command %r - do you have '
|
|
434
|
+
'%r installed and in your '
|
|
435
|
+
'PATH?' % (self.name, self.name))
|
|
436
|
+
else:
|
|
437
|
+
raise # re-raise exception if a different error occurred
|
|
438
|
+
|
|
439
|
+
@classmethod
|
|
440
|
+
def controls_location(cls, location):
|
|
441
|
+
"""
|
|
442
|
+
Check if a location is controlled by the vcs.
|
|
443
|
+
It is meant to be overridden to implement smarter detection
|
|
444
|
+
mechanisms for specific vcs.
|
|
445
|
+
"""
|
|
446
|
+
logger.debug('Checking in %s for %s (%s)...',
|
|
447
|
+
location, cls.dirname, cls.name)
|
|
448
|
+
path = os.path.join(location, cls.dirname)
|
|
449
|
+
return os.path.exists(path)
|
|
450
|
+
|
|
451
|
+
|
|
452
|
+
def get_src_requirement(dist, location):
|
|
453
|
+
version_control = vcs.get_backend_from_location(location)
|
|
454
|
+
if version_control:
|
|
455
|
+
try:
|
|
456
|
+
return version_control().get_src_requirement(dist,
|
|
457
|
+
location)
|
|
458
|
+
except BadCommand:
|
|
459
|
+
logger.warning(
|
|
460
|
+
'cannot determine version of editable source in %s '
|
|
461
|
+
'(%s command not found in path)',
|
|
462
|
+
location,
|
|
463
|
+
version_control.name,
|
|
464
|
+
)
|
|
465
|
+
return dist.as_requirement()
|
|
466
|
+
logger.warning(
|
|
467
|
+
'cannot determine version of editable source in %s (is not SVN '
|
|
468
|
+
'checkout, Git clone, Mercurial clone or Bazaar branch)',
|
|
469
|
+
location,
|
|
470
|
+
)
|
|
471
|
+
return dist.as_requirement()
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
from __future__ import absolute_import
|
|
2
|
+
|
|
3
|
+
import logging
|
|
4
|
+
import os
|
|
5
|
+
|
|
6
|
+
from pip._vendor.six.moves.urllib import parse as urllib_parse
|
|
7
|
+
|
|
8
|
+
from pip._internal.download import path_to_url
|
|
9
|
+
from pip._internal.utils.misc import display_path, rmtree
|
|
10
|
+
from pip._internal.utils.temp_dir import TempDirectory
|
|
11
|
+
from pip._internal.vcs import VersionControl, vcs
|
|
12
|
+
|
|
13
|
+
logger = logging.getLogger(__name__)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class Bazaar(VersionControl):
|
|
17
|
+
name = 'bzr'
|
|
18
|
+
dirname = '.bzr'
|
|
19
|
+
repo_name = 'branch'
|
|
20
|
+
schemes = (
|
|
21
|
+
'bzr', 'bzr+http', 'bzr+https', 'bzr+ssh', 'bzr+sftp', 'bzr+ftp',
|
|
22
|
+
'bzr+lp',
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
def __init__(self, url=None, *args, **kwargs):
|
|
26
|
+
super(Bazaar, self).__init__(url, *args, **kwargs)
|
|
27
|
+
# This is only needed for python <2.7.5
|
|
28
|
+
# Register lp but do not expose as a scheme to support bzr+lp.
|
|
29
|
+
if getattr(urllib_parse, 'uses_fragment', None):
|
|
30
|
+
urllib_parse.uses_fragment.extend(['lp'])
|
|
31
|
+
|
|
32
|
+
def get_base_rev_args(self, rev):
|
|
33
|
+
return ['-r', rev]
|
|
34
|
+
|
|
35
|
+
def export(self, location):
|
|
36
|
+
"""
|
|
37
|
+
Export the Bazaar repository at the url to the destination location
|
|
38
|
+
"""
|
|
39
|
+
# Remove the location to make sure Bazaar can export it correctly
|
|
40
|
+
if os.path.exists(location):
|
|
41
|
+
rmtree(location)
|
|
42
|
+
|
|
43
|
+
with TempDirectory(kind="export") as temp_dir:
|
|
44
|
+
self.unpack(temp_dir.path)
|
|
45
|
+
|
|
46
|
+
self.run_command(
|
|
47
|
+
['export', location],
|
|
48
|
+
cwd=temp_dir.path, show_stdout=False,
|
|
49
|
+
)
|
|
50
|
+
|
|
51
|
+
def switch(self, dest, url, rev_options):
|
|
52
|
+
self.run_command(['switch', url], cwd=dest)
|
|
53
|
+
|
|
54
|
+
def update(self, dest, rev_options):
|
|
55
|
+
cmd_args = ['pull', '-q'] + rev_options.to_args()
|
|
56
|
+
self.run_command(cmd_args, cwd=dest)
|
|
57
|
+
|
|
58
|
+
def obtain(self, dest):
|
|
59
|
+
url, rev = self.get_url_rev()
|
|
60
|
+
rev_options = self.make_rev_options(rev)
|
|
61
|
+
if self.check_destination(dest, url, rev_options):
|
|
62
|
+
rev_display = rev_options.to_display()
|
|
63
|
+
logger.info(
|
|
64
|
+
'Checking out %s%s to %s',
|
|
65
|
+
url,
|
|
66
|
+
rev_display,
|
|
67
|
+
display_path(dest),
|
|
68
|
+
)
|
|
69
|
+
cmd_args = ['branch', '-q'] + rev_options.to_args() + [url, dest]
|
|
70
|
+
self.run_command(cmd_args)
|
|
71
|
+
|
|
72
|
+
def get_url_rev(self):
|
|
73
|
+
# hotfix the URL scheme after removing bzr+ from bzr+ssh:// readd it
|
|
74
|
+
url, rev = super(Bazaar, self).get_url_rev()
|
|
75
|
+
if url.startswith('ssh://'):
|
|
76
|
+
url = 'bzr+' + url
|
|
77
|
+
return url, rev
|
|
78
|
+
|
|
79
|
+
def get_url(self, location):
|
|
80
|
+
urls = self.run_command(['info'], show_stdout=False, cwd=location)
|
|
81
|
+
for line in urls.splitlines():
|
|
82
|
+
line = line.strip()
|
|
83
|
+
for x in ('checkout of branch: ',
|
|
84
|
+
'parent branch: '):
|
|
85
|
+
if line.startswith(x):
|
|
86
|
+
repo = line.split(x)[1]
|
|
87
|
+
if self._is_local_repository(repo):
|
|
88
|
+
return path_to_url(repo)
|
|
89
|
+
return repo
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
def get_revision(self, location):
|
|
93
|
+
revision = self.run_command(
|
|
94
|
+
['revno'], show_stdout=False, cwd=location,
|
|
95
|
+
)
|
|
96
|
+
return revision.splitlines()[-1]
|
|
97
|
+
|
|
98
|
+
def get_src_requirement(self, dist, location):
|
|
99
|
+
repo = self.get_url(location)
|
|
100
|
+
if not repo:
|
|
101
|
+
return None
|
|
102
|
+
if not repo.lower().startswith('bzr:'):
|
|
103
|
+
repo = 'bzr+' + repo
|
|
104
|
+
egg_project_name = dist.egg_name().split('-', 1)[0]
|
|
105
|
+
current_rev = self.get_revision(location)
|
|
106
|
+
return '%s@%s#egg=%s' % (repo, current_rev, egg_project_name)
|
|
107
|
+
|
|
108
|
+
def is_commit_id_equal(self, dest, name):
|
|
109
|
+
"""Always assume the versions don't match"""
|
|
110
|
+
return False
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
vcs.register(Bazaar)
|