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.
- package/package.json +1 -1
- 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-10.0.0.dist-info/LICENSE.txt +20 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-10.0.0.dist-info/METADATA +78 -0
- package/python3.4.2/lib/python3.4/site-packages/pip-10.0.0.dist-info/RECORD +294 -0
- package/python3.4.2/lib/python3.4/site-packages/{pip-1.5.6.dist-info → pip-10.0.0.dist-info}/WHEEL +6 -6
- package/python3.4.2/lib/python3.4/site-packages/pip-10.0.0.dist-info/entry_points.txt +5 -0
- 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
- 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
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/DESCRIPTION.rst +0 -71
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/METADATA +0 -98
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/RECORD +0 -373
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/entry_points.txt +0 -5
- package/python3.4.2/lib/python3.4/site-packages/pip-1.5.6.dist-info/metadata.json +0 -1
|
@@ -0,0 +1,378 @@
|
|
|
1
|
+
"""Prepares a distribution for installation
|
|
2
|
+
"""
|
|
3
|
+
|
|
4
|
+
import itertools
|
|
5
|
+
import logging
|
|
6
|
+
import os
|
|
7
|
+
import sys
|
|
8
|
+
from copy import copy
|
|
9
|
+
|
|
10
|
+
from pip._vendor import pkg_resources, requests
|
|
11
|
+
|
|
12
|
+
from pip._internal.build_env import NoOpBuildEnvironment
|
|
13
|
+
from pip._internal.compat import expanduser
|
|
14
|
+
from pip._internal.download import (
|
|
15
|
+
is_dir_url, is_file_url, is_vcs_url, unpack_url, url_to_path,
|
|
16
|
+
)
|
|
17
|
+
from pip._internal.exceptions import (
|
|
18
|
+
DirectoryUrlHashUnsupported, HashUnpinned, InstallationError,
|
|
19
|
+
PreviousBuildDirError, VcsHashUnsupported,
|
|
20
|
+
)
|
|
21
|
+
from pip._internal.index import FormatControl
|
|
22
|
+
from pip._internal.req.req_install import InstallRequirement
|
|
23
|
+
from pip._internal.utils.hashes import MissingHashes
|
|
24
|
+
from pip._internal.utils.logging import indent_log
|
|
25
|
+
from pip._internal.utils.misc import (
|
|
26
|
+
call_subprocess, display_path, normalize_path,
|
|
27
|
+
)
|
|
28
|
+
from pip._internal.utils.ui import open_spinner
|
|
29
|
+
from pip._internal.vcs import vcs
|
|
30
|
+
|
|
31
|
+
logger = logging.getLogger(__name__)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def make_abstract_dist(req):
|
|
35
|
+
"""Factory to make an abstract dist object.
|
|
36
|
+
|
|
37
|
+
Preconditions: Either an editable req with a source_dir, or satisfied_by or
|
|
38
|
+
a wheel link, or a non-editable req with a source_dir.
|
|
39
|
+
|
|
40
|
+
:return: A concrete DistAbstraction.
|
|
41
|
+
"""
|
|
42
|
+
if req.editable:
|
|
43
|
+
return IsSDist(req)
|
|
44
|
+
elif req.link and req.link.is_wheel:
|
|
45
|
+
return IsWheel(req)
|
|
46
|
+
else:
|
|
47
|
+
return IsSDist(req)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _install_build_reqs(finder, prefix, build_requirements):
|
|
51
|
+
# NOTE: What follows is not a very good thing.
|
|
52
|
+
# Eventually, this should move into the BuildEnvironment class and
|
|
53
|
+
# that should handle all the isolation and sub-process invocation.
|
|
54
|
+
finder = copy(finder)
|
|
55
|
+
finder.format_control = FormatControl(set(), set([":all:"]))
|
|
56
|
+
urls = [
|
|
57
|
+
finder.find_requirement(
|
|
58
|
+
InstallRequirement.from_line(r), upgrade=False).url
|
|
59
|
+
for r in build_requirements
|
|
60
|
+
]
|
|
61
|
+
args = [
|
|
62
|
+
sys.executable, '-m', 'pip', 'install', '--ignore-installed',
|
|
63
|
+
'--no-user', '--prefix', prefix,
|
|
64
|
+
] + list(urls)
|
|
65
|
+
|
|
66
|
+
with open_spinner("Installing build dependencies") as spinner:
|
|
67
|
+
call_subprocess(args, show_stdout=False, spinner=spinner)
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class DistAbstraction(object):
|
|
71
|
+
"""Abstracts out the wheel vs non-wheel Resolver.resolve() logic.
|
|
72
|
+
|
|
73
|
+
The requirements for anything installable are as follows:
|
|
74
|
+
- we must be able to determine the requirement name
|
|
75
|
+
(or we can't correctly handle the non-upgrade case).
|
|
76
|
+
- we must be able to generate a list of run-time dependencies
|
|
77
|
+
without installing any additional packages (or we would
|
|
78
|
+
have to either burn time by doing temporary isolated installs
|
|
79
|
+
or alternatively violate pips 'don't start installing unless
|
|
80
|
+
all requirements are available' rule - neither of which are
|
|
81
|
+
desirable).
|
|
82
|
+
- for packages with setup requirements, we must also be able
|
|
83
|
+
to determine their requirements without installing additional
|
|
84
|
+
packages (for the same reason as run-time dependencies)
|
|
85
|
+
- we must be able to create a Distribution object exposing the
|
|
86
|
+
above metadata.
|
|
87
|
+
"""
|
|
88
|
+
|
|
89
|
+
def __init__(self, req):
|
|
90
|
+
self.req = req
|
|
91
|
+
|
|
92
|
+
def dist(self, finder):
|
|
93
|
+
"""Return a setuptools Dist object."""
|
|
94
|
+
raise NotImplementedError(self.dist)
|
|
95
|
+
|
|
96
|
+
def prep_for_dist(self, finder):
|
|
97
|
+
"""Ensure that we can get a Dist for this requirement."""
|
|
98
|
+
raise NotImplementedError(self.dist)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class IsWheel(DistAbstraction):
|
|
102
|
+
|
|
103
|
+
def dist(self, finder):
|
|
104
|
+
return list(pkg_resources.find_distributions(
|
|
105
|
+
self.req.source_dir))[0]
|
|
106
|
+
|
|
107
|
+
def prep_for_dist(self, finder, build_isolation):
|
|
108
|
+
# FIXME:https://github.com/pypa/pip/issues/1112
|
|
109
|
+
pass
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class IsSDist(DistAbstraction):
|
|
113
|
+
|
|
114
|
+
def dist(self, finder):
|
|
115
|
+
dist = self.req.get_dist()
|
|
116
|
+
# FIXME: shouldn't be globally added.
|
|
117
|
+
if finder and dist.has_metadata('dependency_links.txt'):
|
|
118
|
+
finder.add_dependency_links(
|
|
119
|
+
dist.get_metadata_lines('dependency_links.txt')
|
|
120
|
+
)
|
|
121
|
+
return dist
|
|
122
|
+
|
|
123
|
+
def prep_for_dist(self, finder, build_isolation):
|
|
124
|
+
# Before calling "setup.py egg_info", we need to set-up the build
|
|
125
|
+
# environment.
|
|
126
|
+
build_requirements, isolate = self.req.get_pep_518_info()
|
|
127
|
+
should_isolate = build_isolation and isolate
|
|
128
|
+
|
|
129
|
+
minimum_requirements = ('setuptools', 'wheel')
|
|
130
|
+
missing_requirements = set(minimum_requirements) - set(
|
|
131
|
+
pkg_resources.Requirement(r).key
|
|
132
|
+
for r in build_requirements
|
|
133
|
+
)
|
|
134
|
+
if missing_requirements:
|
|
135
|
+
def format_reqs(rs):
|
|
136
|
+
return ' and '.join(map(repr, sorted(rs)))
|
|
137
|
+
logger.warning(
|
|
138
|
+
"Missing build time requirements in pyproject.toml for %s: "
|
|
139
|
+
"%s.", self.req, format_reqs(missing_requirements)
|
|
140
|
+
)
|
|
141
|
+
logger.warning(
|
|
142
|
+
"This version of pip does not implement PEP 517 so it cannot "
|
|
143
|
+
"build a wheel without %s.", format_reqs(minimum_requirements)
|
|
144
|
+
)
|
|
145
|
+
|
|
146
|
+
if should_isolate:
|
|
147
|
+
with self.req.build_env as prefix:
|
|
148
|
+
_install_build_reqs(finder, prefix, build_requirements)
|
|
149
|
+
else:
|
|
150
|
+
self.req.build_env = NoOpBuildEnvironment(no_clean=False)
|
|
151
|
+
|
|
152
|
+
self.req.run_egg_info()
|
|
153
|
+
self.req.assert_source_matches_version()
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
class Installed(DistAbstraction):
|
|
157
|
+
|
|
158
|
+
def dist(self, finder):
|
|
159
|
+
return self.req.satisfied_by
|
|
160
|
+
|
|
161
|
+
def prep_for_dist(self, finder):
|
|
162
|
+
pass
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
class RequirementPreparer(object):
|
|
166
|
+
"""Prepares a Requirement
|
|
167
|
+
"""
|
|
168
|
+
|
|
169
|
+
def __init__(self, build_dir, download_dir, src_dir, wheel_download_dir,
|
|
170
|
+
progress_bar, build_isolation):
|
|
171
|
+
super(RequirementPreparer, self).__init__()
|
|
172
|
+
|
|
173
|
+
self.src_dir = src_dir
|
|
174
|
+
self.build_dir = build_dir
|
|
175
|
+
|
|
176
|
+
# Where still packed archives should be written to. If None, they are
|
|
177
|
+
# not saved, and are deleted immediately after unpacking.
|
|
178
|
+
self.download_dir = download_dir
|
|
179
|
+
|
|
180
|
+
# Where still-packed .whl files should be written to. If None, they are
|
|
181
|
+
# written to the download_dir parameter. Separate to download_dir to
|
|
182
|
+
# permit only keeping wheel archives for pip wheel.
|
|
183
|
+
if wheel_download_dir:
|
|
184
|
+
wheel_download_dir = normalize_path(wheel_download_dir)
|
|
185
|
+
self.wheel_download_dir = wheel_download_dir
|
|
186
|
+
|
|
187
|
+
# NOTE
|
|
188
|
+
# download_dir and wheel_download_dir overlap semantically and may
|
|
189
|
+
# be combined if we're willing to have non-wheel archives present in
|
|
190
|
+
# the wheelhouse output by 'pip wheel'.
|
|
191
|
+
|
|
192
|
+
self.progress_bar = progress_bar
|
|
193
|
+
|
|
194
|
+
# Is build isolation allowed?
|
|
195
|
+
self.build_isolation = build_isolation
|
|
196
|
+
|
|
197
|
+
@property
|
|
198
|
+
def _download_should_save(self):
|
|
199
|
+
# TODO: Modify to reduce indentation needed
|
|
200
|
+
if self.download_dir:
|
|
201
|
+
self.download_dir = expanduser(self.download_dir)
|
|
202
|
+
if os.path.exists(self.download_dir):
|
|
203
|
+
return True
|
|
204
|
+
else:
|
|
205
|
+
logger.critical('Could not find download directory')
|
|
206
|
+
raise InstallationError(
|
|
207
|
+
"Could not find or access download directory '%s'"
|
|
208
|
+
% display_path(self.download_dir))
|
|
209
|
+
return False
|
|
210
|
+
|
|
211
|
+
def prepare_linked_requirement(self, req, session, finder,
|
|
212
|
+
upgrade_allowed, require_hashes):
|
|
213
|
+
"""Prepare a requirement that would be obtained from req.link
|
|
214
|
+
"""
|
|
215
|
+
# TODO: Breakup into smaller functions
|
|
216
|
+
if req.link and req.link.scheme == 'file':
|
|
217
|
+
path = url_to_path(req.link.url)
|
|
218
|
+
logger.info('Processing %s', display_path(path))
|
|
219
|
+
else:
|
|
220
|
+
logger.info('Collecting %s', req)
|
|
221
|
+
|
|
222
|
+
with indent_log():
|
|
223
|
+
# @@ if filesystem packages are not marked
|
|
224
|
+
# editable in a req, a non deterministic error
|
|
225
|
+
# occurs when the script attempts to unpack the
|
|
226
|
+
# build directory
|
|
227
|
+
req.ensure_has_source_dir(self.build_dir)
|
|
228
|
+
# If a checkout exists, it's unwise to keep going. version
|
|
229
|
+
# inconsistencies are logged later, but do not fail the
|
|
230
|
+
# installation.
|
|
231
|
+
# FIXME: this won't upgrade when there's an existing
|
|
232
|
+
# package unpacked in `req.source_dir`
|
|
233
|
+
# package unpacked in `req.source_dir`
|
|
234
|
+
if os.path.exists(os.path.join(req.source_dir, 'setup.py')):
|
|
235
|
+
raise PreviousBuildDirError(
|
|
236
|
+
"pip can't proceed with requirements '%s' due to a"
|
|
237
|
+
" pre-existing build directory (%s). This is "
|
|
238
|
+
"likely due to a previous installation that failed"
|
|
239
|
+
". pip is being responsible and not assuming it "
|
|
240
|
+
"can delete this. Please delete it and try again."
|
|
241
|
+
% (req, req.source_dir)
|
|
242
|
+
)
|
|
243
|
+
req.populate_link(finder, upgrade_allowed, require_hashes)
|
|
244
|
+
|
|
245
|
+
# We can't hit this spot and have populate_link return None.
|
|
246
|
+
# req.satisfied_by is None here (because we're
|
|
247
|
+
# guarded) and upgrade has no impact except when satisfied_by
|
|
248
|
+
# is not None.
|
|
249
|
+
# Then inside find_requirement existing_applicable -> False
|
|
250
|
+
# If no new versions are found, DistributionNotFound is raised,
|
|
251
|
+
# otherwise a result is guaranteed.
|
|
252
|
+
assert req.link
|
|
253
|
+
link = req.link
|
|
254
|
+
|
|
255
|
+
# Now that we have the real link, we can tell what kind of
|
|
256
|
+
# requirements we have and raise some more informative errors
|
|
257
|
+
# than otherwise. (For example, we can raise VcsHashUnsupported
|
|
258
|
+
# for a VCS URL rather than HashMissing.)
|
|
259
|
+
if require_hashes:
|
|
260
|
+
# We could check these first 2 conditions inside
|
|
261
|
+
# unpack_url and save repetition of conditions, but then
|
|
262
|
+
# we would report less-useful error messages for
|
|
263
|
+
# unhashable requirements, complaining that there's no
|
|
264
|
+
# hash provided.
|
|
265
|
+
if is_vcs_url(link):
|
|
266
|
+
raise VcsHashUnsupported()
|
|
267
|
+
elif is_file_url(link) and is_dir_url(link):
|
|
268
|
+
raise DirectoryUrlHashUnsupported()
|
|
269
|
+
if not req.original_link and not req.is_pinned:
|
|
270
|
+
# Unpinned packages are asking for trouble when a new
|
|
271
|
+
# version is uploaded. This isn't a security check, but
|
|
272
|
+
# it saves users a surprising hash mismatch in the
|
|
273
|
+
# future.
|
|
274
|
+
#
|
|
275
|
+
# file:/// URLs aren't pinnable, so don't complain
|
|
276
|
+
# about them not being pinned.
|
|
277
|
+
raise HashUnpinned()
|
|
278
|
+
|
|
279
|
+
hashes = req.hashes(trust_internet=not require_hashes)
|
|
280
|
+
if require_hashes and not hashes:
|
|
281
|
+
# Known-good hashes are missing for this requirement, so
|
|
282
|
+
# shim it with a facade object that will provoke hash
|
|
283
|
+
# computation and then raise a HashMissing exception
|
|
284
|
+
# showing the user what the hash should be.
|
|
285
|
+
hashes = MissingHashes()
|
|
286
|
+
|
|
287
|
+
try:
|
|
288
|
+
download_dir = self.download_dir
|
|
289
|
+
# We always delete unpacked sdists after pip ran.
|
|
290
|
+
autodelete_unpacked = True
|
|
291
|
+
if req.link.is_wheel and self.wheel_download_dir:
|
|
292
|
+
# when doing 'pip wheel` we download wheels to a
|
|
293
|
+
# dedicated dir.
|
|
294
|
+
download_dir = self.wheel_download_dir
|
|
295
|
+
if req.link.is_wheel:
|
|
296
|
+
if download_dir:
|
|
297
|
+
# When downloading, we only unpack wheels to get
|
|
298
|
+
# metadata.
|
|
299
|
+
autodelete_unpacked = True
|
|
300
|
+
else:
|
|
301
|
+
# When installing a wheel, we use the unpacked
|
|
302
|
+
# wheel.
|
|
303
|
+
autodelete_unpacked = False
|
|
304
|
+
unpack_url(
|
|
305
|
+
req.link, req.source_dir,
|
|
306
|
+
download_dir, autodelete_unpacked,
|
|
307
|
+
session=session, hashes=hashes,
|
|
308
|
+
progress_bar=self.progress_bar
|
|
309
|
+
)
|
|
310
|
+
except requests.HTTPError as exc:
|
|
311
|
+
logger.critical(
|
|
312
|
+
'Could not install requirement %s because of error %s',
|
|
313
|
+
req,
|
|
314
|
+
exc,
|
|
315
|
+
)
|
|
316
|
+
raise InstallationError(
|
|
317
|
+
'Could not install requirement %s because of HTTP '
|
|
318
|
+
'error %s for URL %s' %
|
|
319
|
+
(req, exc, req.link)
|
|
320
|
+
)
|
|
321
|
+
abstract_dist = make_abstract_dist(req)
|
|
322
|
+
abstract_dist.prep_for_dist(finder, self.build_isolation)
|
|
323
|
+
if self._download_should_save:
|
|
324
|
+
# Make a .zip of the source_dir we already created.
|
|
325
|
+
if req.link.scheme in vcs.all_schemes:
|
|
326
|
+
req.archive(self.download_dir)
|
|
327
|
+
return abstract_dist
|
|
328
|
+
|
|
329
|
+
def prepare_editable_requirement(self, req, require_hashes, use_user_site,
|
|
330
|
+
finder):
|
|
331
|
+
"""Prepare an editable requirement
|
|
332
|
+
"""
|
|
333
|
+
assert req.editable, "cannot prepare a non-editable req as editable"
|
|
334
|
+
|
|
335
|
+
logger.info('Obtaining %s', req)
|
|
336
|
+
|
|
337
|
+
with indent_log():
|
|
338
|
+
if require_hashes:
|
|
339
|
+
raise InstallationError(
|
|
340
|
+
'The editable requirement %s cannot be installed when '
|
|
341
|
+
'requiring hashes, because there is no single file to '
|
|
342
|
+
'hash.' % req
|
|
343
|
+
)
|
|
344
|
+
req.ensure_has_source_dir(self.src_dir)
|
|
345
|
+
req.update_editable(not self._download_should_save)
|
|
346
|
+
|
|
347
|
+
abstract_dist = make_abstract_dist(req)
|
|
348
|
+
abstract_dist.prep_for_dist(finder, self.build_isolation)
|
|
349
|
+
|
|
350
|
+
if self._download_should_save:
|
|
351
|
+
req.archive(self.download_dir)
|
|
352
|
+
req.check_if_exists(use_user_site)
|
|
353
|
+
|
|
354
|
+
return abstract_dist
|
|
355
|
+
|
|
356
|
+
def prepare_installed_requirement(self, req, require_hashes, skip_reason):
|
|
357
|
+
"""Prepare an already-installed requirement
|
|
358
|
+
"""
|
|
359
|
+
assert req.satisfied_by, "req should have been satisfied but isn't"
|
|
360
|
+
assert skip_reason is not None, (
|
|
361
|
+
"did not get skip reason skipped but req.satisfied_by "
|
|
362
|
+
"is set to %r" % (req.satisfied_by,)
|
|
363
|
+
)
|
|
364
|
+
logger.info(
|
|
365
|
+
'Requirement %s: %s (%s)',
|
|
366
|
+
skip_reason, req, req.satisfied_by.version
|
|
367
|
+
)
|
|
368
|
+
with indent_log():
|
|
369
|
+
if require_hashes:
|
|
370
|
+
logger.debug(
|
|
371
|
+
'Since it is already installed, we are trusting this '
|
|
372
|
+
'package without checking its hash. To ensure a '
|
|
373
|
+
'completely repeatable environment, install into an '
|
|
374
|
+
'empty virtualenv.'
|
|
375
|
+
)
|
|
376
|
+
abstract_dist = Installed(req)
|
|
377
|
+
|
|
378
|
+
return abstract_dist
|
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
"""Generate and work with PEP 425 Compatibility Tags."""
|
|
2
|
+
from __future__ import absolute_import
|
|
3
|
+
|
|
4
|
+
import distutils.util
|
|
5
|
+
import logging
|
|
6
|
+
import platform
|
|
7
|
+
import re
|
|
8
|
+
import sys
|
|
9
|
+
import sysconfig
|
|
10
|
+
import warnings
|
|
11
|
+
from collections import OrderedDict
|
|
12
|
+
|
|
13
|
+
import pip._internal.utils.glibc
|
|
14
|
+
|
|
15
|
+
logger = logging.getLogger(__name__)
|
|
16
|
+
|
|
17
|
+
_osx_arch_pat = re.compile(r'(.+)_(\d+)_(\d+)_(.+)')
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def get_config_var(var):
|
|
21
|
+
try:
|
|
22
|
+
return sysconfig.get_config_var(var)
|
|
23
|
+
except IOError as e: # Issue #1074
|
|
24
|
+
warnings.warn("{}".format(e), RuntimeWarning)
|
|
25
|
+
return None
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def get_abbr_impl():
|
|
29
|
+
"""Return abbreviated implementation name."""
|
|
30
|
+
if hasattr(sys, 'pypy_version_info'):
|
|
31
|
+
pyimpl = 'pp'
|
|
32
|
+
elif sys.platform.startswith('java'):
|
|
33
|
+
pyimpl = 'jy'
|
|
34
|
+
elif sys.platform == 'cli':
|
|
35
|
+
pyimpl = 'ip'
|
|
36
|
+
else:
|
|
37
|
+
pyimpl = 'cp'
|
|
38
|
+
return pyimpl
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def get_impl_ver():
|
|
42
|
+
"""Return implementation version."""
|
|
43
|
+
impl_ver = get_config_var("py_version_nodot")
|
|
44
|
+
if not impl_ver or get_abbr_impl() == 'pp':
|
|
45
|
+
impl_ver = ''.join(map(str, get_impl_version_info()))
|
|
46
|
+
return impl_ver
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def get_impl_version_info():
|
|
50
|
+
"""Return sys.version_info-like tuple for use in decrementing the minor
|
|
51
|
+
version."""
|
|
52
|
+
if get_abbr_impl() == 'pp':
|
|
53
|
+
# as per https://github.com/pypa/pip/issues/2882
|
|
54
|
+
return (sys.version_info[0], sys.pypy_version_info.major,
|
|
55
|
+
sys.pypy_version_info.minor)
|
|
56
|
+
else:
|
|
57
|
+
return sys.version_info[0], sys.version_info[1]
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
def get_impl_tag():
|
|
61
|
+
"""
|
|
62
|
+
Returns the Tag for this specific implementation.
|
|
63
|
+
"""
|
|
64
|
+
return "{}{}".format(get_abbr_impl(), get_impl_ver())
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
def get_flag(var, fallback, expected=True, warn=True):
|
|
68
|
+
"""Use a fallback method for determining SOABI flags if the needed config
|
|
69
|
+
var is unset or unavailable."""
|
|
70
|
+
val = get_config_var(var)
|
|
71
|
+
if val is None:
|
|
72
|
+
if warn:
|
|
73
|
+
logger.debug("Config variable '%s' is unset, Python ABI tag may "
|
|
74
|
+
"be incorrect", var)
|
|
75
|
+
return fallback()
|
|
76
|
+
return val == expected
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def get_abi_tag():
|
|
80
|
+
"""Return the ABI tag based on SOABI (if available) or emulate SOABI
|
|
81
|
+
(CPython 2, PyPy)."""
|
|
82
|
+
soabi = get_config_var('SOABI')
|
|
83
|
+
impl = get_abbr_impl()
|
|
84
|
+
if not soabi and impl in {'cp', 'pp'} and hasattr(sys, 'maxunicode'):
|
|
85
|
+
d = ''
|
|
86
|
+
m = ''
|
|
87
|
+
u = ''
|
|
88
|
+
if get_flag('Py_DEBUG',
|
|
89
|
+
lambda: hasattr(sys, 'gettotalrefcount'),
|
|
90
|
+
warn=(impl == 'cp')):
|
|
91
|
+
d = 'd'
|
|
92
|
+
if get_flag('WITH_PYMALLOC',
|
|
93
|
+
lambda: impl == 'cp',
|
|
94
|
+
warn=(impl == 'cp')):
|
|
95
|
+
m = 'm'
|
|
96
|
+
if get_flag('Py_UNICODE_SIZE',
|
|
97
|
+
lambda: sys.maxunicode == 0x10ffff,
|
|
98
|
+
expected=4,
|
|
99
|
+
warn=(impl == 'cp' and
|
|
100
|
+
sys.version_info < (3, 3))) \
|
|
101
|
+
and sys.version_info < (3, 3):
|
|
102
|
+
u = 'u'
|
|
103
|
+
abi = '%s%s%s%s%s' % (impl, get_impl_ver(), d, m, u)
|
|
104
|
+
elif soabi and soabi.startswith('cpython-'):
|
|
105
|
+
abi = 'cp' + soabi.split('-')[1]
|
|
106
|
+
elif soabi:
|
|
107
|
+
abi = soabi.replace('.', '_').replace('-', '_')
|
|
108
|
+
else:
|
|
109
|
+
abi = None
|
|
110
|
+
return abi
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
def _is_running_32bit():
|
|
114
|
+
return sys.maxsize == 2147483647
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
def get_platform():
|
|
118
|
+
"""Return our platform name 'win32', 'linux_x86_64'"""
|
|
119
|
+
if sys.platform == 'darwin':
|
|
120
|
+
# distutils.util.get_platform() returns the release based on the value
|
|
121
|
+
# of MACOSX_DEPLOYMENT_TARGET on which Python was built, which may
|
|
122
|
+
# be significantly older than the user's current machine.
|
|
123
|
+
release, _, machine = platform.mac_ver()
|
|
124
|
+
split_ver = release.split('.')
|
|
125
|
+
|
|
126
|
+
if machine == "x86_64" and _is_running_32bit():
|
|
127
|
+
machine = "i386"
|
|
128
|
+
elif machine == "ppc64" and _is_running_32bit():
|
|
129
|
+
machine = "ppc"
|
|
130
|
+
|
|
131
|
+
return 'macosx_{}_{}_{}'.format(split_ver[0], split_ver[1], machine)
|
|
132
|
+
|
|
133
|
+
# XXX remove distutils dependency
|
|
134
|
+
result = distutils.util.get_platform().replace('.', '_').replace('-', '_')
|
|
135
|
+
if result == "linux_x86_64" and _is_running_32bit():
|
|
136
|
+
# 32 bit Python program (running on a 64 bit Linux): pip should only
|
|
137
|
+
# install and run 32 bit compiled extensions in that case.
|
|
138
|
+
result = "linux_i686"
|
|
139
|
+
|
|
140
|
+
return result
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
def is_manylinux1_compatible():
|
|
144
|
+
# Only Linux, and only x86-64 / i686
|
|
145
|
+
if get_platform() not in {"linux_x86_64", "linux_i686"}:
|
|
146
|
+
return False
|
|
147
|
+
|
|
148
|
+
# Check for presence of _manylinux module
|
|
149
|
+
try:
|
|
150
|
+
import _manylinux
|
|
151
|
+
return bool(_manylinux.manylinux1_compatible)
|
|
152
|
+
except (ImportError, AttributeError):
|
|
153
|
+
# Fall through to heuristic check below
|
|
154
|
+
pass
|
|
155
|
+
|
|
156
|
+
# Check glibc version. CentOS 5 uses glibc 2.5.
|
|
157
|
+
return pip._internal.utils.glibc.have_compatible_glibc(2, 5)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
def get_darwin_arches(major, minor, machine):
|
|
161
|
+
"""Return a list of supported arches (including group arches) for
|
|
162
|
+
the given major, minor and machine architecture of an macOS machine.
|
|
163
|
+
"""
|
|
164
|
+
arches = []
|
|
165
|
+
|
|
166
|
+
def _supports_arch(major, minor, arch):
|
|
167
|
+
# Looking at the application support for macOS versions in the chart
|
|
168
|
+
# provided by https://en.wikipedia.org/wiki/OS_X#Versions it appears
|
|
169
|
+
# our timeline looks roughly like:
|
|
170
|
+
#
|
|
171
|
+
# 10.0 - Introduces ppc support.
|
|
172
|
+
# 10.4 - Introduces ppc64, i386, and x86_64 support, however the ppc64
|
|
173
|
+
# and x86_64 support is CLI only, and cannot be used for GUI
|
|
174
|
+
# applications.
|
|
175
|
+
# 10.5 - Extends ppc64 and x86_64 support to cover GUI applications.
|
|
176
|
+
# 10.6 - Drops support for ppc64
|
|
177
|
+
# 10.7 - Drops support for ppc
|
|
178
|
+
#
|
|
179
|
+
# Given that we do not know if we're installing a CLI or a GUI
|
|
180
|
+
# application, we must be conservative and assume it might be a GUI
|
|
181
|
+
# application and behave as if ppc64 and x86_64 support did not occur
|
|
182
|
+
# until 10.5.
|
|
183
|
+
#
|
|
184
|
+
# Note: The above information is taken from the "Application support"
|
|
185
|
+
# column in the chart not the "Processor support" since I believe
|
|
186
|
+
# that we care about what instruction sets an application can use
|
|
187
|
+
# not which processors the OS supports.
|
|
188
|
+
if arch == 'ppc':
|
|
189
|
+
return (major, minor) <= (10, 5)
|
|
190
|
+
if arch == 'ppc64':
|
|
191
|
+
return (major, minor) == (10, 5)
|
|
192
|
+
if arch == 'i386':
|
|
193
|
+
return (major, minor) >= (10, 4)
|
|
194
|
+
if arch == 'x86_64':
|
|
195
|
+
return (major, minor) >= (10, 5)
|
|
196
|
+
if arch in groups:
|
|
197
|
+
for garch in groups[arch]:
|
|
198
|
+
if _supports_arch(major, minor, garch):
|
|
199
|
+
return True
|
|
200
|
+
return False
|
|
201
|
+
|
|
202
|
+
groups = OrderedDict([
|
|
203
|
+
("fat", ("i386", "ppc")),
|
|
204
|
+
("intel", ("x86_64", "i386")),
|
|
205
|
+
("fat64", ("x86_64", "ppc64")),
|
|
206
|
+
("fat32", ("x86_64", "i386", "ppc")),
|
|
207
|
+
])
|
|
208
|
+
|
|
209
|
+
if _supports_arch(major, minor, machine):
|
|
210
|
+
arches.append(machine)
|
|
211
|
+
|
|
212
|
+
for garch in groups:
|
|
213
|
+
if machine in groups[garch] and _supports_arch(major, minor, garch):
|
|
214
|
+
arches.append(garch)
|
|
215
|
+
|
|
216
|
+
arches.append('universal')
|
|
217
|
+
|
|
218
|
+
return arches
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
def get_supported(versions=None, noarch=False, platform=None,
|
|
222
|
+
impl=None, abi=None):
|
|
223
|
+
"""Return a list of supported tags for each version specified in
|
|
224
|
+
`versions`.
|
|
225
|
+
|
|
226
|
+
:param versions: a list of string versions, of the form ["33", "32"],
|
|
227
|
+
or None. The first version will be assumed to support our ABI.
|
|
228
|
+
:param platform: specify the exact platform you want valid
|
|
229
|
+
tags for, or None. If None, use the local system platform.
|
|
230
|
+
:param impl: specify the exact implementation you want valid
|
|
231
|
+
tags for, or None. If None, use the local interpreter impl.
|
|
232
|
+
:param abi: specify the exact abi you want valid
|
|
233
|
+
tags for, or None. If None, use the local interpreter abi.
|
|
234
|
+
"""
|
|
235
|
+
supported = []
|
|
236
|
+
|
|
237
|
+
# Versions must be given with respect to the preference
|
|
238
|
+
if versions is None:
|
|
239
|
+
versions = []
|
|
240
|
+
version_info = get_impl_version_info()
|
|
241
|
+
major = version_info[:-1]
|
|
242
|
+
# Support all previous minor Python versions.
|
|
243
|
+
for minor in range(version_info[-1], -1, -1):
|
|
244
|
+
versions.append(''.join(map(str, major + (minor,))))
|
|
245
|
+
|
|
246
|
+
impl = impl or get_abbr_impl()
|
|
247
|
+
|
|
248
|
+
abis = []
|
|
249
|
+
|
|
250
|
+
abi = abi or get_abi_tag()
|
|
251
|
+
if abi:
|
|
252
|
+
abis[0:0] = [abi]
|
|
253
|
+
|
|
254
|
+
abi3s = set()
|
|
255
|
+
import imp
|
|
256
|
+
for suffix in imp.get_suffixes():
|
|
257
|
+
if suffix[0].startswith('.abi'):
|
|
258
|
+
abi3s.add(suffix[0].split('.', 2)[1])
|
|
259
|
+
|
|
260
|
+
abis.extend(sorted(list(abi3s)))
|
|
261
|
+
|
|
262
|
+
abis.append('none')
|
|
263
|
+
|
|
264
|
+
if not noarch:
|
|
265
|
+
arch = platform or get_platform()
|
|
266
|
+
if arch.startswith('macosx'):
|
|
267
|
+
# support macosx-10.6-intel on macosx-10.9-x86_64
|
|
268
|
+
match = _osx_arch_pat.match(arch)
|
|
269
|
+
if match:
|
|
270
|
+
name, major, minor, actual_arch = match.groups()
|
|
271
|
+
tpl = '{}_{}_%i_%s'.format(name, major)
|
|
272
|
+
arches = []
|
|
273
|
+
for m in reversed(range(int(minor) + 1)):
|
|
274
|
+
for a in get_darwin_arches(int(major), m, actual_arch):
|
|
275
|
+
arches.append(tpl % (m, a))
|
|
276
|
+
else:
|
|
277
|
+
# arch pattern didn't match (?!)
|
|
278
|
+
arches = [arch]
|
|
279
|
+
elif platform is None and is_manylinux1_compatible():
|
|
280
|
+
arches = [arch.replace('linux', 'manylinux1'), arch]
|
|
281
|
+
else:
|
|
282
|
+
arches = [arch]
|
|
283
|
+
|
|
284
|
+
# Current version, current API (built specifically for our Python):
|
|
285
|
+
for abi in abis:
|
|
286
|
+
for arch in arches:
|
|
287
|
+
supported.append(('%s%s' % (impl, versions[0]), abi, arch))
|
|
288
|
+
|
|
289
|
+
# abi3 modules compatible with older version of Python
|
|
290
|
+
for version in versions[1:]:
|
|
291
|
+
# abi3 was introduced in Python 3.2
|
|
292
|
+
if version in {'31', '30'}:
|
|
293
|
+
break
|
|
294
|
+
for abi in abi3s: # empty set if not Python 3
|
|
295
|
+
for arch in arches:
|
|
296
|
+
supported.append(("%s%s" % (impl, version), abi, arch))
|
|
297
|
+
|
|
298
|
+
# Has binaries, does not use the Python API:
|
|
299
|
+
for arch in arches:
|
|
300
|
+
supported.append(('py%s' % (versions[0][0]), 'none', arch))
|
|
301
|
+
|
|
302
|
+
# No abi / arch, but requires our implementation:
|
|
303
|
+
supported.append(('%s%s' % (impl, versions[0]), 'none', 'any'))
|
|
304
|
+
# Tagged specifically as being cross-version compatible
|
|
305
|
+
# (with just the major version specified)
|
|
306
|
+
supported.append(('%s%s' % (impl, versions[0][0]), 'none', 'any'))
|
|
307
|
+
|
|
308
|
+
# No abi / arch, generic Python
|
|
309
|
+
for i, version in enumerate(versions):
|
|
310
|
+
supported.append(('py%s' % (version,), 'none', 'any'))
|
|
311
|
+
if i == 0:
|
|
312
|
+
supported.append(('py%s' % (version[0]), 'none', 'any'))
|
|
313
|
+
|
|
314
|
+
return supported
|
|
315
|
+
|
|
316
|
+
|
|
317
|
+
implementation_tag = get_impl_tag()
|