cli-ih 0.6.3.1__py3-none-any.whl → 0.7.0__py3-none-any.whl
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.
- cli_ih/__init__.py +1 -0
- cli_ih/asyncClient.py +73 -10
- cli_ih/client.py +63 -18
- cli_ih/utils.py +51 -0
- {cli_ih-0.6.3.1.dist-info → cli_ih-0.7.0.dist-info}/METADATA +1 -1
- cli_ih-0.7.0.dist-info/RECORD +9 -0
- {cli_ih-0.6.3.1.dist-info → cli_ih-0.7.0.dist-info}/top_level.txt +0 -1
- cli_ih-0.6.3.1.dist-info/RECORD +0 -425
- venv/Lib/site-packages/__editable___cli_ih_0_6_3_1_finder.py +0 -85
- venv/Lib/site-packages/pip/__init__.py +0 -13
- venv/Lib/site-packages/pip/__main__.py +0 -24
- venv/Lib/site-packages/pip/__pip-runner__.py +0 -50
- venv/Lib/site-packages/pip/_internal/__init__.py +0 -18
- venv/Lib/site-packages/pip/_internal/build_env.py +0 -349
- venv/Lib/site-packages/pip/_internal/cache.py +0 -291
- venv/Lib/site-packages/pip/_internal/cli/__init__.py +0 -3
- venv/Lib/site-packages/pip/_internal/cli/autocompletion.py +0 -184
- venv/Lib/site-packages/pip/_internal/cli/base_command.py +0 -244
- venv/Lib/site-packages/pip/_internal/cli/cmdoptions.py +0 -1138
- venv/Lib/site-packages/pip/_internal/cli/command_context.py +0 -28
- venv/Lib/site-packages/pip/_internal/cli/index_command.py +0 -175
- venv/Lib/site-packages/pip/_internal/cli/main.py +0 -80
- venv/Lib/site-packages/pip/_internal/cli/main_parser.py +0 -134
- venv/Lib/site-packages/pip/_internal/cli/parser.py +0 -298
- venv/Lib/site-packages/pip/_internal/cli/progress_bars.py +0 -151
- venv/Lib/site-packages/pip/_internal/cli/req_command.py +0 -351
- venv/Lib/site-packages/pip/_internal/cli/spinners.py +0 -235
- venv/Lib/site-packages/pip/_internal/cli/status_codes.py +0 -6
- venv/Lib/site-packages/pip/_internal/commands/__init__.py +0 -139
- venv/Lib/site-packages/pip/_internal/commands/cache.py +0 -231
- venv/Lib/site-packages/pip/_internal/commands/check.py +0 -66
- venv/Lib/site-packages/pip/_internal/commands/completion.py +0 -135
- venv/Lib/site-packages/pip/_internal/commands/configuration.py +0 -288
- venv/Lib/site-packages/pip/_internal/commands/debug.py +0 -203
- venv/Lib/site-packages/pip/_internal/commands/download.py +0 -145
- venv/Lib/site-packages/pip/_internal/commands/freeze.py +0 -107
- venv/Lib/site-packages/pip/_internal/commands/hash.py +0 -58
- venv/Lib/site-packages/pip/_internal/commands/help.py +0 -40
- venv/Lib/site-packages/pip/_internal/commands/index.py +0 -159
- venv/Lib/site-packages/pip/_internal/commands/inspect.py +0 -92
- venv/Lib/site-packages/pip/_internal/commands/install.py +0 -798
- venv/Lib/site-packages/pip/_internal/commands/list.py +0 -400
- venv/Lib/site-packages/pip/_internal/commands/lock.py +0 -170
- venv/Lib/site-packages/pip/_internal/commands/search.py +0 -178
- venv/Lib/site-packages/pip/_internal/commands/show.py +0 -231
- venv/Lib/site-packages/pip/_internal/commands/uninstall.py +0 -113
- venv/Lib/site-packages/pip/_internal/commands/wheel.py +0 -181
- venv/Lib/site-packages/pip/_internal/configuration.py +0 -397
- venv/Lib/site-packages/pip/_internal/distributions/__init__.py +0 -21
- venv/Lib/site-packages/pip/_internal/distributions/base.py +0 -55
- venv/Lib/site-packages/pip/_internal/distributions/installed.py +0 -33
- venv/Lib/site-packages/pip/_internal/distributions/sdist.py +0 -165
- venv/Lib/site-packages/pip/_internal/distributions/wheel.py +0 -44
- venv/Lib/site-packages/pip/_internal/exceptions.py +0 -881
- venv/Lib/site-packages/pip/_internal/index/__init__.py +0 -1
- venv/Lib/site-packages/pip/_internal/index/collector.py +0 -489
- venv/Lib/site-packages/pip/_internal/index/package_finder.py +0 -1059
- venv/Lib/site-packages/pip/_internal/index/sources.py +0 -287
- venv/Lib/site-packages/pip/_internal/locations/__init__.py +0 -441
- venv/Lib/site-packages/pip/_internal/locations/_distutils.py +0 -173
- venv/Lib/site-packages/pip/_internal/locations/_sysconfig.py +0 -215
- venv/Lib/site-packages/pip/_internal/locations/base.py +0 -82
- venv/Lib/site-packages/pip/_internal/main.py +0 -12
- venv/Lib/site-packages/pip/_internal/metadata/__init__.py +0 -164
- venv/Lib/site-packages/pip/_internal/metadata/_json.py +0 -87
- venv/Lib/site-packages/pip/_internal/metadata/base.py +0 -685
- venv/Lib/site-packages/pip/_internal/metadata/importlib/__init__.py +0 -6
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_compat.py +0 -87
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_dists.py +0 -223
- venv/Lib/site-packages/pip/_internal/metadata/importlib/_envs.py +0 -143
- venv/Lib/site-packages/pip/_internal/metadata/pkg_resources.py +0 -298
- venv/Lib/site-packages/pip/_internal/models/__init__.py +0 -1
- venv/Lib/site-packages/pip/_internal/models/candidate.py +0 -25
- venv/Lib/site-packages/pip/_internal/models/direct_url.py +0 -227
- venv/Lib/site-packages/pip/_internal/models/format_control.py +0 -78
- venv/Lib/site-packages/pip/_internal/models/index.py +0 -28
- venv/Lib/site-packages/pip/_internal/models/installation_report.py +0 -57
- venv/Lib/site-packages/pip/_internal/models/link.py +0 -613
- venv/Lib/site-packages/pip/_internal/models/pylock.py +0 -188
- venv/Lib/site-packages/pip/_internal/models/scheme.py +0 -25
- venv/Lib/site-packages/pip/_internal/models/search_scope.py +0 -126
- venv/Lib/site-packages/pip/_internal/models/selection_prefs.py +0 -53
- venv/Lib/site-packages/pip/_internal/models/target_python.py +0 -122
- venv/Lib/site-packages/pip/_internal/models/wheel.py +0 -141
- venv/Lib/site-packages/pip/_internal/network/__init__.py +0 -1
- venv/Lib/site-packages/pip/_internal/network/auth.py +0 -564
- venv/Lib/site-packages/pip/_internal/network/cache.py +0 -133
- venv/Lib/site-packages/pip/_internal/network/download.py +0 -342
- venv/Lib/site-packages/pip/_internal/network/lazy_wheel.py +0 -213
- venv/Lib/site-packages/pip/_internal/network/session.py +0 -528
- venv/Lib/site-packages/pip/_internal/network/utils.py +0 -98
- venv/Lib/site-packages/pip/_internal/network/xmlrpc.py +0 -61
- venv/Lib/site-packages/pip/_internal/operations/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/operations/build/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/operations/build/build_tracker.py +0 -140
- venv/Lib/site-packages/pip/_internal/operations/build/metadata.py +0 -38
- venv/Lib/site-packages/pip/_internal/operations/build/metadata_editable.py +0 -41
- venv/Lib/site-packages/pip/_internal/operations/build/metadata_legacy.py +0 -73
- venv/Lib/site-packages/pip/_internal/operations/build/wheel.py +0 -38
- venv/Lib/site-packages/pip/_internal/operations/build/wheel_editable.py +0 -47
- venv/Lib/site-packages/pip/_internal/operations/build/wheel_legacy.py +0 -119
- venv/Lib/site-packages/pip/_internal/operations/check.py +0 -175
- venv/Lib/site-packages/pip/_internal/operations/freeze.py +0 -259
- venv/Lib/site-packages/pip/_internal/operations/install/__init__.py +0 -1
- venv/Lib/site-packages/pip/_internal/operations/install/editable_legacy.py +0 -48
- venv/Lib/site-packages/pip/_internal/operations/install/wheel.py +0 -746
- venv/Lib/site-packages/pip/_internal/operations/prepare.py +0 -742
- venv/Lib/site-packages/pip/_internal/pyproject.py +0 -182
- venv/Lib/site-packages/pip/_internal/req/__init__.py +0 -105
- venv/Lib/site-packages/pip/_internal/req/constructors.py +0 -562
- venv/Lib/site-packages/pip/_internal/req/req_dependency_group.py +0 -75
- venv/Lib/site-packages/pip/_internal/req/req_file.py +0 -620
- venv/Lib/site-packages/pip/_internal/req/req_install.py +0 -937
- venv/Lib/site-packages/pip/_internal/req/req_set.py +0 -81
- venv/Lib/site-packages/pip/_internal/req/req_uninstall.py +0 -639
- venv/Lib/site-packages/pip/_internal/resolution/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/base.py +0 -20
- venv/Lib/site-packages/pip/_internal/resolution/legacy/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/legacy/resolver.py +0 -598
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/base.py +0 -142
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/candidates.py +0 -582
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/factory.py +0 -814
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py +0 -166
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/provider.py +0 -276
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/reporter.py +0 -85
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/requirements.py +0 -247
- venv/Lib/site-packages/pip/_internal/resolution/resolvelib/resolver.py +0 -336
- venv/Lib/site-packages/pip/_internal/self_outdated_check.py +0 -254
- venv/Lib/site-packages/pip/_internal/utils/__init__.py +0 -0
- venv/Lib/site-packages/pip/_internal/utils/_jaraco_text.py +0 -109
- venv/Lib/site-packages/pip/_internal/utils/_log.py +0 -38
- venv/Lib/site-packages/pip/_internal/utils/appdirs.py +0 -52
- venv/Lib/site-packages/pip/_internal/utils/compat.py +0 -85
- venv/Lib/site-packages/pip/_internal/utils/compatibility_tags.py +0 -201
- venv/Lib/site-packages/pip/_internal/utils/datetime.py +0 -10
- venv/Lib/site-packages/pip/_internal/utils/deprecation.py +0 -126
- venv/Lib/site-packages/pip/_internal/utils/direct_url_helpers.py +0 -87
- venv/Lib/site-packages/pip/_internal/utils/egg_link.py +0 -81
- venv/Lib/site-packages/pip/_internal/utils/entrypoints.py +0 -88
- venv/Lib/site-packages/pip/_internal/utils/filesystem.py +0 -152
- venv/Lib/site-packages/pip/_internal/utils/filetypes.py +0 -24
- venv/Lib/site-packages/pip/_internal/utils/glibc.py +0 -102
- venv/Lib/site-packages/pip/_internal/utils/hashes.py +0 -150
- venv/Lib/site-packages/pip/_internal/utils/logging.py +0 -364
- venv/Lib/site-packages/pip/_internal/utils/misc.py +0 -765
- venv/Lib/site-packages/pip/_internal/utils/packaging.py +0 -44
- venv/Lib/site-packages/pip/_internal/utils/retry.py +0 -45
- venv/Lib/site-packages/pip/_internal/utils/setuptools_build.py +0 -149
- venv/Lib/site-packages/pip/_internal/utils/subprocess.py +0 -248
- venv/Lib/site-packages/pip/_internal/utils/temp_dir.py +0 -294
- venv/Lib/site-packages/pip/_internal/utils/unpacking.py +0 -337
- venv/Lib/site-packages/pip/_internal/utils/urls.py +0 -55
- venv/Lib/site-packages/pip/_internal/utils/virtualenv.py +0 -105
- venv/Lib/site-packages/pip/_internal/utils/wheel.py +0 -132
- venv/Lib/site-packages/pip/_internal/vcs/__init__.py +0 -15
- venv/Lib/site-packages/pip/_internal/vcs/bazaar.py +0 -130
- venv/Lib/site-packages/pip/_internal/vcs/git.py +0 -571
- venv/Lib/site-packages/pip/_internal/vcs/mercurial.py +0 -186
- venv/Lib/site-packages/pip/_internal/vcs/subversion.py +0 -335
- venv/Lib/site-packages/pip/_internal/vcs/versioncontrol.py +0 -693
- venv/Lib/site-packages/pip/_internal/wheel_builder.py +0 -334
- venv/Lib/site-packages/pip/_vendor/__init__.py +0 -117
- venv/Lib/site-packages/pip/_vendor/cachecontrol/__init__.py +0 -29
- venv/Lib/site-packages/pip/_vendor/cachecontrol/_cmd.py +0 -70
- venv/Lib/site-packages/pip/_vendor/cachecontrol/adapter.py +0 -168
- venv/Lib/site-packages/pip/_vendor/cachecontrol/cache.py +0 -75
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/__init__.py +0 -8
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/file_cache.py +0 -145
- venv/Lib/site-packages/pip/_vendor/cachecontrol/caches/redis_cache.py +0 -48
- venv/Lib/site-packages/pip/_vendor/cachecontrol/controller.py +0 -511
- venv/Lib/site-packages/pip/_vendor/cachecontrol/filewrapper.py +0 -119
- venv/Lib/site-packages/pip/_vendor/cachecontrol/heuristics.py +0 -157
- venv/Lib/site-packages/pip/_vendor/cachecontrol/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/cachecontrol/serialize.py +0 -146
- venv/Lib/site-packages/pip/_vendor/cachecontrol/wrapper.py +0 -43
- venv/Lib/site-packages/pip/_vendor/certifi/__init__.py +0 -4
- venv/Lib/site-packages/pip/_vendor/certifi/__main__.py +0 -12
- venv/Lib/site-packages/pip/_vendor/certifi/core.py +0 -83
- venv/Lib/site-packages/pip/_vendor/certifi/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/dependency_groups/__init__.py +0 -13
- venv/Lib/site-packages/pip/_vendor/dependency_groups/__main__.py +0 -65
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_implementation.py +0 -209
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_lint_dependency_groups.py +0 -59
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_pip_wrapper.py +0 -62
- venv/Lib/site-packages/pip/_vendor/dependency_groups/_toml_compat.py +0 -9
- venv/Lib/site-packages/pip/_vendor/dependency_groups/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/distlib/__init__.py +0 -33
- venv/Lib/site-packages/pip/_vendor/distlib/compat.py +0 -1137
- venv/Lib/site-packages/pip/_vendor/distlib/resources.py +0 -358
- venv/Lib/site-packages/pip/_vendor/distlib/scripts.py +0 -447
- venv/Lib/site-packages/pip/_vendor/distlib/util.py +0 -1984
- venv/Lib/site-packages/pip/_vendor/distro/__init__.py +0 -54
- venv/Lib/site-packages/pip/_vendor/distro/__main__.py +0 -4
- venv/Lib/site-packages/pip/_vendor/distro/distro.py +0 -1403
- venv/Lib/site-packages/pip/_vendor/distro/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/idna/__init__.py +0 -45
- venv/Lib/site-packages/pip/_vendor/idna/codec.py +0 -122
- venv/Lib/site-packages/pip/_vendor/idna/compat.py +0 -15
- venv/Lib/site-packages/pip/_vendor/idna/core.py +0 -437
- venv/Lib/site-packages/pip/_vendor/idna/idnadata.py +0 -4243
- venv/Lib/site-packages/pip/_vendor/idna/intranges.py +0 -57
- venv/Lib/site-packages/pip/_vendor/idna/package_data.py +0 -1
- venv/Lib/site-packages/pip/_vendor/idna/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/idna/uts46data.py +0 -8681
- venv/Lib/site-packages/pip/_vendor/msgpack/__init__.py +0 -55
- venv/Lib/site-packages/pip/_vendor/msgpack/exceptions.py +0 -48
- venv/Lib/site-packages/pip/_vendor/msgpack/ext.py +0 -170
- venv/Lib/site-packages/pip/_vendor/msgpack/fallback.py +0 -929
- venv/Lib/site-packages/pip/_vendor/packaging/__init__.py +0 -15
- venv/Lib/site-packages/pip/_vendor/packaging/_elffile.py +0 -109
- venv/Lib/site-packages/pip/_vendor/packaging/_manylinux.py +0 -262
- venv/Lib/site-packages/pip/_vendor/packaging/_musllinux.py +0 -85
- venv/Lib/site-packages/pip/_vendor/packaging/_parser.py +0 -353
- venv/Lib/site-packages/pip/_vendor/packaging/_structures.py +0 -61
- venv/Lib/site-packages/pip/_vendor/packaging/_tokenizer.py +0 -195
- venv/Lib/site-packages/pip/_vendor/packaging/licenses/__init__.py +0 -145
- venv/Lib/site-packages/pip/_vendor/packaging/licenses/_spdx.py +0 -759
- venv/Lib/site-packages/pip/_vendor/packaging/markers.py +0 -362
- venv/Lib/site-packages/pip/_vendor/packaging/metadata.py +0 -862
- venv/Lib/site-packages/pip/_vendor/packaging/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/packaging/requirements.py +0 -91
- venv/Lib/site-packages/pip/_vendor/packaging/specifiers.py +0 -1019
- venv/Lib/site-packages/pip/_vendor/packaging/tags.py +0 -656
- venv/Lib/site-packages/pip/_vendor/packaging/utils.py +0 -163
- venv/Lib/site-packages/pip/_vendor/packaging/version.py +0 -582
- venv/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py +0 -3676
- venv/Lib/site-packages/pip/_vendor/platformdirs/__init__.py +0 -631
- venv/Lib/site-packages/pip/_vendor/platformdirs/__main__.py +0 -55
- venv/Lib/site-packages/pip/_vendor/platformdirs/android.py +0 -249
- venv/Lib/site-packages/pip/_vendor/platformdirs/api.py +0 -299
- venv/Lib/site-packages/pip/_vendor/platformdirs/macos.py +0 -144
- venv/Lib/site-packages/pip/_vendor/platformdirs/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/platformdirs/unix.py +0 -272
- venv/Lib/site-packages/pip/_vendor/platformdirs/version.py +0 -21
- venv/Lib/site-packages/pip/_vendor/platformdirs/windows.py +0 -272
- venv/Lib/site-packages/pip/_vendor/pygments/__init__.py +0 -82
- venv/Lib/site-packages/pip/_vendor/pygments/__main__.py +0 -17
- venv/Lib/site-packages/pip/_vendor/pygments/console.py +0 -70
- venv/Lib/site-packages/pip/_vendor/pygments/filter.py +0 -70
- venv/Lib/site-packages/pip/_vendor/pygments/filters/__init__.py +0 -940
- venv/Lib/site-packages/pip/_vendor/pygments/formatter.py +0 -129
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/__init__.py +0 -157
- venv/Lib/site-packages/pip/_vendor/pygments/formatters/_mapping.py +0 -23
- venv/Lib/site-packages/pip/_vendor/pygments/lexer.py +0 -963
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/__init__.py +0 -362
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/_mapping.py +0 -602
- venv/Lib/site-packages/pip/_vendor/pygments/lexers/python.py +0 -1201
- venv/Lib/site-packages/pip/_vendor/pygments/modeline.py +0 -43
- venv/Lib/site-packages/pip/_vendor/pygments/plugin.py +0 -72
- venv/Lib/site-packages/pip/_vendor/pygments/regexopt.py +0 -91
- venv/Lib/site-packages/pip/_vendor/pygments/scanner.py +0 -104
- venv/Lib/site-packages/pip/_vendor/pygments/sphinxext.py +0 -247
- venv/Lib/site-packages/pip/_vendor/pygments/style.py +0 -203
- venv/Lib/site-packages/pip/_vendor/pygments/styles/__init__.py +0 -61
- venv/Lib/site-packages/pip/_vendor/pygments/styles/_mapping.py +0 -54
- venv/Lib/site-packages/pip/_vendor/pygments/token.py +0 -214
- venv/Lib/site-packages/pip/_vendor/pygments/unistring.py +0 -153
- venv/Lib/site-packages/pip/_vendor/pygments/util.py +0 -324
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/__init__.py +0 -31
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_impl.py +0 -410
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/__init__.py +0 -21
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py +0 -389
- venv/Lib/site-packages/pip/_vendor/pyproject_hooks/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/requests/__init__.py +0 -179
- venv/Lib/site-packages/pip/_vendor/requests/__version__.py +0 -14
- venv/Lib/site-packages/pip/_vendor/requests/_internal_utils.py +0 -50
- venv/Lib/site-packages/pip/_vendor/requests/adapters.py +0 -719
- venv/Lib/site-packages/pip/_vendor/requests/api.py +0 -157
- venv/Lib/site-packages/pip/_vendor/requests/auth.py +0 -314
- venv/Lib/site-packages/pip/_vendor/requests/certs.py +0 -17
- venv/Lib/site-packages/pip/_vendor/requests/compat.py +0 -90
- venv/Lib/site-packages/pip/_vendor/requests/cookies.py +0 -561
- venv/Lib/site-packages/pip/_vendor/requests/exceptions.py +0 -151
- venv/Lib/site-packages/pip/_vendor/requests/help.py +0 -127
- venv/Lib/site-packages/pip/_vendor/requests/hooks.py +0 -33
- venv/Lib/site-packages/pip/_vendor/requests/models.py +0 -1039
- venv/Lib/site-packages/pip/_vendor/requests/packages.py +0 -25
- venv/Lib/site-packages/pip/_vendor/requests/sessions.py +0 -831
- venv/Lib/site-packages/pip/_vendor/requests/status_codes.py +0 -128
- venv/Lib/site-packages/pip/_vendor/requests/structures.py +0 -99
- venv/Lib/site-packages/pip/_vendor/requests/utils.py +0 -1086
- venv/Lib/site-packages/pip/_vendor/resolvelib/__init__.py +0 -27
- venv/Lib/site-packages/pip/_vendor/resolvelib/providers.py +0 -196
- venv/Lib/site-packages/pip/_vendor/resolvelib/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/resolvelib/reporters.py +0 -55
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/__init__.py +0 -27
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/abstract.py +0 -47
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/criterion.py +0 -48
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/exceptions.py +0 -57
- venv/Lib/site-packages/pip/_vendor/resolvelib/resolvers/resolution.py +0 -622
- venv/Lib/site-packages/pip/_vendor/resolvelib/structs.py +0 -209
- venv/Lib/site-packages/pip/_vendor/rich/__init__.py +0 -177
- venv/Lib/site-packages/pip/_vendor/rich/__main__.py +0 -245
- venv/Lib/site-packages/pip/_vendor/rich/_cell_widths.py +0 -454
- venv/Lib/site-packages/pip/_vendor/rich/_emoji_codes.py +0 -3610
- venv/Lib/site-packages/pip/_vendor/rich/_emoji_replace.py +0 -32
- venv/Lib/site-packages/pip/_vendor/rich/_export_format.py +0 -76
- venv/Lib/site-packages/pip/_vendor/rich/_extension.py +0 -10
- venv/Lib/site-packages/pip/_vendor/rich/_fileno.py +0 -24
- venv/Lib/site-packages/pip/_vendor/rich/_inspect.py +0 -268
- venv/Lib/site-packages/pip/_vendor/rich/_log_render.py +0 -94
- venv/Lib/site-packages/pip/_vendor/rich/_loop.py +0 -43
- venv/Lib/site-packages/pip/_vendor/rich/_null_file.py +0 -69
- venv/Lib/site-packages/pip/_vendor/rich/_palettes.py +0 -309
- venv/Lib/site-packages/pip/_vendor/rich/_pick.py +0 -17
- venv/Lib/site-packages/pip/_vendor/rich/_ratio.py +0 -153
- venv/Lib/site-packages/pip/_vendor/rich/_spinners.py +0 -482
- venv/Lib/site-packages/pip/_vendor/rich/_stack.py +0 -16
- venv/Lib/site-packages/pip/_vendor/rich/_timer.py +0 -19
- venv/Lib/site-packages/pip/_vendor/rich/_win32_console.py +0 -661
- venv/Lib/site-packages/pip/_vendor/rich/_windows.py +0 -71
- venv/Lib/site-packages/pip/_vendor/rich/_windows_renderer.py +0 -56
- venv/Lib/site-packages/pip/_vendor/rich/_wrap.py +0 -93
- venv/Lib/site-packages/pip/_vendor/rich/abc.py +0 -33
- venv/Lib/site-packages/pip/_vendor/rich/align.py +0 -306
- venv/Lib/site-packages/pip/_vendor/rich/ansi.py +0 -241
- venv/Lib/site-packages/pip/_vendor/rich/bar.py +0 -93
- venv/Lib/site-packages/pip/_vendor/rich/box.py +0 -474
- venv/Lib/site-packages/pip/_vendor/rich/cells.py +0 -174
- venv/Lib/site-packages/pip/_vendor/rich/color.py +0 -621
- venv/Lib/site-packages/pip/_vendor/rich/color_triplet.py +0 -38
- venv/Lib/site-packages/pip/_vendor/rich/columns.py +0 -187
- venv/Lib/site-packages/pip/_vendor/rich/console.py +0 -2680
- venv/Lib/site-packages/pip/_vendor/rich/constrain.py +0 -37
- venv/Lib/site-packages/pip/_vendor/rich/containers.py +0 -167
- venv/Lib/site-packages/pip/_vendor/rich/control.py +0 -219
- venv/Lib/site-packages/pip/_vendor/rich/default_styles.py +0 -193
- venv/Lib/site-packages/pip/_vendor/rich/diagnose.py +0 -39
- venv/Lib/site-packages/pip/_vendor/rich/emoji.py +0 -91
- venv/Lib/site-packages/pip/_vendor/rich/errors.py +0 -34
- venv/Lib/site-packages/pip/_vendor/rich/file_proxy.py +0 -57
- venv/Lib/site-packages/pip/_vendor/rich/filesize.py +0 -88
- venv/Lib/site-packages/pip/_vendor/rich/highlighter.py +0 -232
- venv/Lib/site-packages/pip/_vendor/rich/json.py +0 -139
- venv/Lib/site-packages/pip/_vendor/rich/jupyter.py +0 -101
- venv/Lib/site-packages/pip/_vendor/rich/layout.py +0 -442
- venv/Lib/site-packages/pip/_vendor/rich/live.py +0 -400
- venv/Lib/site-packages/pip/_vendor/rich/live_render.py +0 -106
- venv/Lib/site-packages/pip/_vendor/rich/logging.py +0 -297
- venv/Lib/site-packages/pip/_vendor/rich/markup.py +0 -251
- venv/Lib/site-packages/pip/_vendor/rich/measure.py +0 -151
- venv/Lib/site-packages/pip/_vendor/rich/padding.py +0 -141
- venv/Lib/site-packages/pip/_vendor/rich/pager.py +0 -34
- venv/Lib/site-packages/pip/_vendor/rich/palette.py +0 -100
- venv/Lib/site-packages/pip/_vendor/rich/panel.py +0 -317
- venv/Lib/site-packages/pip/_vendor/rich/pretty.py +0 -1016
- venv/Lib/site-packages/pip/_vendor/rich/progress.py +0 -1715
- venv/Lib/site-packages/pip/_vendor/rich/progress_bar.py +0 -223
- venv/Lib/site-packages/pip/_vendor/rich/prompt.py +0 -400
- venv/Lib/site-packages/pip/_vendor/rich/protocol.py +0 -42
- venv/Lib/site-packages/pip/_vendor/rich/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/rich/region.py +0 -10
- venv/Lib/site-packages/pip/_vendor/rich/repr.py +0 -149
- venv/Lib/site-packages/pip/_vendor/rich/rule.py +0 -130
- venv/Lib/site-packages/pip/_vendor/rich/scope.py +0 -86
- venv/Lib/site-packages/pip/_vendor/rich/screen.py +0 -54
- venv/Lib/site-packages/pip/_vendor/rich/segment.py +0 -752
- venv/Lib/site-packages/pip/_vendor/rich/spinner.py +0 -132
- venv/Lib/site-packages/pip/_vendor/rich/status.py +0 -131
- venv/Lib/site-packages/pip/_vendor/rich/style.py +0 -796
- venv/Lib/site-packages/pip/_vendor/rich/styled.py +0 -42
- venv/Lib/site-packages/pip/_vendor/rich/syntax.py +0 -985
- venv/Lib/site-packages/pip/_vendor/rich/table.py +0 -1006
- venv/Lib/site-packages/pip/_vendor/rich/terminal_theme.py +0 -153
- venv/Lib/site-packages/pip/_vendor/rich/text.py +0 -1361
- venv/Lib/site-packages/pip/_vendor/rich/theme.py +0 -115
- venv/Lib/site-packages/pip/_vendor/rich/themes.py +0 -5
- venv/Lib/site-packages/pip/_vendor/rich/traceback.py +0 -899
- venv/Lib/site-packages/pip/_vendor/rich/tree.py +0 -257
- venv/Lib/site-packages/pip/_vendor/tomli/__init__.py +0 -8
- venv/Lib/site-packages/pip/_vendor/tomli/_parser.py +0 -770
- venv/Lib/site-packages/pip/_vendor/tomli/_re.py +0 -112
- venv/Lib/site-packages/pip/_vendor/tomli/_types.py +0 -10
- venv/Lib/site-packages/pip/_vendor/tomli/py.typed +0 -1
- venv/Lib/site-packages/pip/_vendor/tomli_w/__init__.py +0 -4
- venv/Lib/site-packages/pip/_vendor/tomli_w/_writer.py +0 -229
- venv/Lib/site-packages/pip/_vendor/tomli_w/py.typed +0 -1
- venv/Lib/site-packages/pip/_vendor/truststore/__init__.py +0 -36
- venv/Lib/site-packages/pip/_vendor/truststore/_api.py +0 -333
- venv/Lib/site-packages/pip/_vendor/truststore/_macos.py +0 -571
- venv/Lib/site-packages/pip/_vendor/truststore/_openssl.py +0 -66
- venv/Lib/site-packages/pip/_vendor/truststore/_ssl_constants.py +0 -31
- venv/Lib/site-packages/pip/_vendor/truststore/_windows.py +0 -567
- venv/Lib/site-packages/pip/_vendor/truststore/py.typed +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/__init__.py +0 -102
- venv/Lib/site-packages/pip/_vendor/urllib3/_collections.py +0 -355
- venv/Lib/site-packages/pip/_vendor/urllib3/_version.py +0 -2
- venv/Lib/site-packages/pip/_vendor/urllib3/connection.py +0 -572
- venv/Lib/site-packages/pip/_vendor/urllib3/connectionpool.py +0 -1140
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_appengine_environ.py +0 -36
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/bindings.py +0 -519
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/_securetransport/low_level.py +0 -397
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/appengine.py +0 -314
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/ntlmpool.py +0 -130
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/pyopenssl.py +0 -518
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/securetransport.py +0 -920
- venv/Lib/site-packages/pip/_vendor/urllib3/contrib/socks.py +0 -216
- venv/Lib/site-packages/pip/_vendor/urllib3/exceptions.py +0 -323
- venv/Lib/site-packages/pip/_vendor/urllib3/fields.py +0 -274
- venv/Lib/site-packages/pip/_vendor/urllib3/filepost.py +0 -98
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/__init__.py +0 -0
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/makefile.py +0 -51
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/backports/weakref_finalize.py +0 -155
- venv/Lib/site-packages/pip/_vendor/urllib3/packages/six.py +0 -1076
- venv/Lib/site-packages/pip/_vendor/urllib3/poolmanager.py +0 -540
- venv/Lib/site-packages/pip/_vendor/urllib3/request.py +0 -191
- venv/Lib/site-packages/pip/_vendor/urllib3/response.py +0 -879
- venv/Lib/site-packages/pip/_vendor/urllib3/util/__init__.py +0 -49
- venv/Lib/site-packages/pip/_vendor/urllib3/util/connection.py +0 -149
- venv/Lib/site-packages/pip/_vendor/urllib3/util/proxy.py +0 -57
- venv/Lib/site-packages/pip/_vendor/urllib3/util/queue.py +0 -22
- venv/Lib/site-packages/pip/_vendor/urllib3/util/request.py +0 -137
- venv/Lib/site-packages/pip/_vendor/urllib3/util/response.py +0 -107
- venv/Lib/site-packages/pip/_vendor/urllib3/util/retry.py +0 -622
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_.py +0 -504
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssl_match_hostname.py +0 -159
- venv/Lib/site-packages/pip/_vendor/urllib3/util/ssltransport.py +0 -221
- venv/Lib/site-packages/pip/_vendor/urllib3/util/timeout.py +0 -271
- venv/Lib/site-packages/pip/_vendor/urllib3/util/url.py +0 -435
- venv/Lib/site-packages/pip/_vendor/urllib3/util/wait.py +0 -152
- venv/Lib/site-packages/pip/py.typed +0 -4
- {cli_ih-0.6.3.1.dist-info → cli_ih-0.7.0.dist-info}/WHEEL +0 -0
|
@@ -1,441 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import functools
|
|
4
|
-
import logging
|
|
5
|
-
import os
|
|
6
|
-
import pathlib
|
|
7
|
-
import sys
|
|
8
|
-
import sysconfig
|
|
9
|
-
from typing import Any
|
|
10
|
-
|
|
11
|
-
from pip._internal.models.scheme import SCHEME_KEYS, Scheme
|
|
12
|
-
from pip._internal.utils.compat import WINDOWS
|
|
13
|
-
from pip._internal.utils.deprecation import deprecated
|
|
14
|
-
from pip._internal.utils.virtualenv import running_under_virtualenv
|
|
15
|
-
|
|
16
|
-
from . import _sysconfig
|
|
17
|
-
from .base import (
|
|
18
|
-
USER_CACHE_DIR,
|
|
19
|
-
get_major_minor_version,
|
|
20
|
-
get_src_prefix,
|
|
21
|
-
is_osx_framework,
|
|
22
|
-
site_packages,
|
|
23
|
-
user_site,
|
|
24
|
-
)
|
|
25
|
-
|
|
26
|
-
__all__ = [
|
|
27
|
-
"USER_CACHE_DIR",
|
|
28
|
-
"get_bin_prefix",
|
|
29
|
-
"get_bin_user",
|
|
30
|
-
"get_major_minor_version",
|
|
31
|
-
"get_platlib",
|
|
32
|
-
"get_purelib",
|
|
33
|
-
"get_scheme",
|
|
34
|
-
"get_src_prefix",
|
|
35
|
-
"site_packages",
|
|
36
|
-
"user_site",
|
|
37
|
-
]
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
logger = logging.getLogger(__name__)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
_PLATLIBDIR: str = getattr(sys, "platlibdir", "lib")
|
|
44
|
-
|
|
45
|
-
_USE_SYSCONFIG_DEFAULT = sys.version_info >= (3, 10)
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
def _should_use_sysconfig() -> bool:
|
|
49
|
-
"""This function determines the value of _USE_SYSCONFIG.
|
|
50
|
-
|
|
51
|
-
By default, pip uses sysconfig on Python 3.10+.
|
|
52
|
-
But Python distributors can override this decision by setting:
|
|
53
|
-
sysconfig._PIP_USE_SYSCONFIG = True / False
|
|
54
|
-
Rationale in https://github.com/pypa/pip/issues/10647
|
|
55
|
-
|
|
56
|
-
This is a function for testability, but should be constant during any one
|
|
57
|
-
run.
|
|
58
|
-
"""
|
|
59
|
-
return bool(getattr(sysconfig, "_PIP_USE_SYSCONFIG", _USE_SYSCONFIG_DEFAULT))
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
_USE_SYSCONFIG = _should_use_sysconfig()
|
|
63
|
-
|
|
64
|
-
if not _USE_SYSCONFIG:
|
|
65
|
-
# Import distutils lazily to avoid deprecation warnings,
|
|
66
|
-
# but import it soon enough that it is in memory and available during
|
|
67
|
-
# a pip reinstall.
|
|
68
|
-
from . import _distutils
|
|
69
|
-
|
|
70
|
-
# Be noisy about incompatibilities if this platforms "should" be using
|
|
71
|
-
# sysconfig, but is explicitly opting out and using distutils instead.
|
|
72
|
-
if _USE_SYSCONFIG_DEFAULT and not _USE_SYSCONFIG:
|
|
73
|
-
_MISMATCH_LEVEL = logging.WARNING
|
|
74
|
-
else:
|
|
75
|
-
_MISMATCH_LEVEL = logging.DEBUG
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
def _looks_like_bpo_44860() -> bool:
|
|
79
|
-
"""The resolution to bpo-44860 will change this incorrect platlib.
|
|
80
|
-
|
|
81
|
-
See <https://bugs.python.org/issue44860>.
|
|
82
|
-
"""
|
|
83
|
-
from distutils.command.install import INSTALL_SCHEMES
|
|
84
|
-
|
|
85
|
-
try:
|
|
86
|
-
unix_user_platlib = INSTALL_SCHEMES["unix_user"]["platlib"]
|
|
87
|
-
except KeyError:
|
|
88
|
-
return False
|
|
89
|
-
return unix_user_platlib == "$usersite"
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
def _looks_like_red_hat_patched_platlib_purelib(scheme: dict[str, str]) -> bool:
|
|
93
|
-
platlib = scheme["platlib"]
|
|
94
|
-
if "/$platlibdir/" in platlib:
|
|
95
|
-
platlib = platlib.replace("/$platlibdir/", f"/{_PLATLIBDIR}/")
|
|
96
|
-
if "/lib64/" not in platlib:
|
|
97
|
-
return False
|
|
98
|
-
unpatched = platlib.replace("/lib64/", "/lib/")
|
|
99
|
-
return unpatched.replace("$platbase/", "$base/") == scheme["purelib"]
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
@functools.cache
|
|
103
|
-
def _looks_like_red_hat_lib() -> bool:
|
|
104
|
-
"""Red Hat patches platlib in unix_prefix and unix_home, but not purelib.
|
|
105
|
-
|
|
106
|
-
This is the only way I can see to tell a Red Hat-patched Python.
|
|
107
|
-
"""
|
|
108
|
-
from distutils.command.install import INSTALL_SCHEMES
|
|
109
|
-
|
|
110
|
-
return all(
|
|
111
|
-
k in INSTALL_SCHEMES
|
|
112
|
-
and _looks_like_red_hat_patched_platlib_purelib(INSTALL_SCHEMES[k])
|
|
113
|
-
for k in ("unix_prefix", "unix_home")
|
|
114
|
-
)
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
@functools.cache
|
|
118
|
-
def _looks_like_debian_scheme() -> bool:
|
|
119
|
-
"""Debian adds two additional schemes."""
|
|
120
|
-
from distutils.command.install import INSTALL_SCHEMES
|
|
121
|
-
|
|
122
|
-
return "deb_system" in INSTALL_SCHEMES and "unix_local" in INSTALL_SCHEMES
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
@functools.cache
|
|
126
|
-
def _looks_like_red_hat_scheme() -> bool:
|
|
127
|
-
"""Red Hat patches ``sys.prefix`` and ``sys.exec_prefix``.
|
|
128
|
-
|
|
129
|
-
Red Hat's ``00251-change-user-install-location.patch`` changes the install
|
|
130
|
-
command's ``prefix`` and ``exec_prefix`` to append ``"/local"``. This is
|
|
131
|
-
(fortunately?) done quite unconditionally, so we create a default command
|
|
132
|
-
object without any configuration to detect this.
|
|
133
|
-
"""
|
|
134
|
-
from distutils.command.install import install
|
|
135
|
-
from distutils.dist import Distribution
|
|
136
|
-
|
|
137
|
-
cmd: Any = install(Distribution())
|
|
138
|
-
cmd.finalize_options()
|
|
139
|
-
return (
|
|
140
|
-
cmd.exec_prefix == f"{os.path.normpath(sys.exec_prefix)}/local"
|
|
141
|
-
and cmd.prefix == f"{os.path.normpath(sys.prefix)}/local"
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
@functools.cache
|
|
146
|
-
def _looks_like_slackware_scheme() -> bool:
|
|
147
|
-
"""Slackware patches sysconfig but fails to patch distutils and site.
|
|
148
|
-
|
|
149
|
-
Slackware changes sysconfig's user scheme to use ``"lib64"`` for the lib
|
|
150
|
-
path, but does not do the same to the site module.
|
|
151
|
-
"""
|
|
152
|
-
if user_site is None: # User-site not available.
|
|
153
|
-
return False
|
|
154
|
-
try:
|
|
155
|
-
paths = sysconfig.get_paths(scheme="posix_user", expand=False)
|
|
156
|
-
except KeyError: # User-site not available.
|
|
157
|
-
return False
|
|
158
|
-
return "/lib64/" in paths["purelib"] and "/lib64/" not in user_site
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
@functools.cache
|
|
162
|
-
def _looks_like_msys2_mingw_scheme() -> bool:
|
|
163
|
-
"""MSYS2 patches distutils and sysconfig to use a UNIX-like scheme.
|
|
164
|
-
|
|
165
|
-
However, MSYS2 incorrectly patches sysconfig ``nt`` scheme. The fix is
|
|
166
|
-
likely going to be included in their 3.10 release, so we ignore the warning.
|
|
167
|
-
See msys2/MINGW-packages#9319.
|
|
168
|
-
|
|
169
|
-
MSYS2 MINGW's patch uses lowercase ``"lib"`` instead of the usual uppercase,
|
|
170
|
-
and is missing the final ``"site-packages"``.
|
|
171
|
-
"""
|
|
172
|
-
paths = sysconfig.get_paths("nt", expand=False)
|
|
173
|
-
return all(
|
|
174
|
-
"Lib" not in p and "lib" in p and not p.endswith("site-packages")
|
|
175
|
-
for p in (paths[key] for key in ("platlib", "purelib"))
|
|
176
|
-
)
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
@functools.cache
|
|
180
|
-
def _warn_mismatched(old: pathlib.Path, new: pathlib.Path, *, key: str) -> None:
|
|
181
|
-
issue_url = "https://github.com/pypa/pip/issues/10151"
|
|
182
|
-
message = (
|
|
183
|
-
"Value for %s does not match. Please report this to <%s>"
|
|
184
|
-
"\ndistutils: %s"
|
|
185
|
-
"\nsysconfig: %s"
|
|
186
|
-
)
|
|
187
|
-
logger.log(_MISMATCH_LEVEL, message, key, issue_url, old, new)
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
def _warn_if_mismatch(old: pathlib.Path, new: pathlib.Path, *, key: str) -> bool:
|
|
191
|
-
if old == new:
|
|
192
|
-
return False
|
|
193
|
-
_warn_mismatched(old, new, key=key)
|
|
194
|
-
return True
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
@functools.cache
|
|
198
|
-
def _log_context(
|
|
199
|
-
*,
|
|
200
|
-
user: bool = False,
|
|
201
|
-
home: str | None = None,
|
|
202
|
-
root: str | None = None,
|
|
203
|
-
prefix: str | None = None,
|
|
204
|
-
) -> None:
|
|
205
|
-
parts = [
|
|
206
|
-
"Additional context:",
|
|
207
|
-
"user = %r",
|
|
208
|
-
"home = %r",
|
|
209
|
-
"root = %r",
|
|
210
|
-
"prefix = %r",
|
|
211
|
-
]
|
|
212
|
-
|
|
213
|
-
logger.log(_MISMATCH_LEVEL, "\n".join(parts), user, home, root, prefix)
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
def get_scheme(
|
|
217
|
-
dist_name: str,
|
|
218
|
-
user: bool = False,
|
|
219
|
-
home: str | None = None,
|
|
220
|
-
root: str | None = None,
|
|
221
|
-
isolated: bool = False,
|
|
222
|
-
prefix: str | None = None,
|
|
223
|
-
) -> Scheme:
|
|
224
|
-
new = _sysconfig.get_scheme(
|
|
225
|
-
dist_name,
|
|
226
|
-
user=user,
|
|
227
|
-
home=home,
|
|
228
|
-
root=root,
|
|
229
|
-
isolated=isolated,
|
|
230
|
-
prefix=prefix,
|
|
231
|
-
)
|
|
232
|
-
if _USE_SYSCONFIG:
|
|
233
|
-
return new
|
|
234
|
-
|
|
235
|
-
old = _distutils.get_scheme(
|
|
236
|
-
dist_name,
|
|
237
|
-
user=user,
|
|
238
|
-
home=home,
|
|
239
|
-
root=root,
|
|
240
|
-
isolated=isolated,
|
|
241
|
-
prefix=prefix,
|
|
242
|
-
)
|
|
243
|
-
|
|
244
|
-
warning_contexts = []
|
|
245
|
-
for k in SCHEME_KEYS:
|
|
246
|
-
old_v = pathlib.Path(getattr(old, k))
|
|
247
|
-
new_v = pathlib.Path(getattr(new, k))
|
|
248
|
-
|
|
249
|
-
if old_v == new_v:
|
|
250
|
-
continue
|
|
251
|
-
|
|
252
|
-
# distutils incorrectly put PyPy packages under ``site-packages/python``
|
|
253
|
-
# in the ``posix_home`` scheme, but PyPy devs said they expect the
|
|
254
|
-
# directory name to be ``pypy`` instead. So we treat this as a bug fix
|
|
255
|
-
# and not warn about it. See bpo-43307 and python/cpython#24628.
|
|
256
|
-
skip_pypy_special_case = (
|
|
257
|
-
sys.implementation.name == "pypy"
|
|
258
|
-
and home is not None
|
|
259
|
-
and k in ("platlib", "purelib")
|
|
260
|
-
and old_v.parent == new_v.parent
|
|
261
|
-
and old_v.name.startswith("python")
|
|
262
|
-
and new_v.name.startswith("pypy")
|
|
263
|
-
)
|
|
264
|
-
if skip_pypy_special_case:
|
|
265
|
-
continue
|
|
266
|
-
|
|
267
|
-
# sysconfig's ``osx_framework_user`` does not include ``pythonX.Y`` in
|
|
268
|
-
# the ``include`` value, but distutils's ``headers`` does. We'll let
|
|
269
|
-
# CPython decide whether this is a bug or feature. See bpo-43948.
|
|
270
|
-
skip_osx_framework_user_special_case = (
|
|
271
|
-
user
|
|
272
|
-
and is_osx_framework()
|
|
273
|
-
and k == "headers"
|
|
274
|
-
and old_v.parent.parent == new_v.parent
|
|
275
|
-
and old_v.parent.name.startswith("python")
|
|
276
|
-
)
|
|
277
|
-
if skip_osx_framework_user_special_case:
|
|
278
|
-
continue
|
|
279
|
-
|
|
280
|
-
# On Red Hat and derived Linux distributions, distutils is patched to
|
|
281
|
-
# use "lib64" instead of "lib" for platlib.
|
|
282
|
-
if k == "platlib" and _looks_like_red_hat_lib():
|
|
283
|
-
continue
|
|
284
|
-
|
|
285
|
-
# On Python 3.9+, sysconfig's posix_user scheme sets platlib against
|
|
286
|
-
# sys.platlibdir, but distutils's unix_user incorrectly continues
|
|
287
|
-
# using the same $usersite for both platlib and purelib. This creates a
|
|
288
|
-
# mismatch when sys.platlibdir is not "lib".
|
|
289
|
-
skip_bpo_44860 = (
|
|
290
|
-
user
|
|
291
|
-
and k == "platlib"
|
|
292
|
-
and not WINDOWS
|
|
293
|
-
and _PLATLIBDIR != "lib"
|
|
294
|
-
and _looks_like_bpo_44860()
|
|
295
|
-
)
|
|
296
|
-
if skip_bpo_44860:
|
|
297
|
-
continue
|
|
298
|
-
|
|
299
|
-
# Slackware incorrectly patches posix_user to use lib64 instead of lib,
|
|
300
|
-
# but not usersite to match the location.
|
|
301
|
-
skip_slackware_user_scheme = (
|
|
302
|
-
user
|
|
303
|
-
and k in ("platlib", "purelib")
|
|
304
|
-
and not WINDOWS
|
|
305
|
-
and _looks_like_slackware_scheme()
|
|
306
|
-
)
|
|
307
|
-
if skip_slackware_user_scheme:
|
|
308
|
-
continue
|
|
309
|
-
|
|
310
|
-
# Both Debian and Red Hat patch Python to place the system site under
|
|
311
|
-
# /usr/local instead of /usr. Debian also places lib in dist-packages
|
|
312
|
-
# instead of site-packages, but the /usr/local check should cover it.
|
|
313
|
-
skip_linux_system_special_case = (
|
|
314
|
-
not (user or home or prefix or running_under_virtualenv())
|
|
315
|
-
and old_v.parts[1:3] == ("usr", "local")
|
|
316
|
-
and len(new_v.parts) > 1
|
|
317
|
-
and new_v.parts[1] == "usr"
|
|
318
|
-
and (len(new_v.parts) < 3 or new_v.parts[2] != "local")
|
|
319
|
-
and (_looks_like_red_hat_scheme() or _looks_like_debian_scheme())
|
|
320
|
-
)
|
|
321
|
-
if skip_linux_system_special_case:
|
|
322
|
-
continue
|
|
323
|
-
|
|
324
|
-
# MSYS2 MINGW's sysconfig patch does not include the "site-packages"
|
|
325
|
-
# part of the path. This is incorrect and will be fixed in MSYS.
|
|
326
|
-
skip_msys2_mingw_bug = (
|
|
327
|
-
WINDOWS and k in ("platlib", "purelib") and _looks_like_msys2_mingw_scheme()
|
|
328
|
-
)
|
|
329
|
-
if skip_msys2_mingw_bug:
|
|
330
|
-
continue
|
|
331
|
-
|
|
332
|
-
# CPython's POSIX install script invokes pip (via ensurepip) against the
|
|
333
|
-
# interpreter located in the source tree, not the install site. This
|
|
334
|
-
# triggers special logic in sysconfig that's not present in distutils.
|
|
335
|
-
# https://github.com/python/cpython/blob/8c21941ddaf/Lib/sysconfig.py#L178-L194
|
|
336
|
-
skip_cpython_build = (
|
|
337
|
-
sysconfig.is_python_build(check_home=True)
|
|
338
|
-
and not WINDOWS
|
|
339
|
-
and k in ("headers", "include", "platinclude")
|
|
340
|
-
)
|
|
341
|
-
if skip_cpython_build:
|
|
342
|
-
continue
|
|
343
|
-
|
|
344
|
-
warning_contexts.append((old_v, new_v, f"scheme.{k}"))
|
|
345
|
-
|
|
346
|
-
if not warning_contexts:
|
|
347
|
-
return old
|
|
348
|
-
|
|
349
|
-
# Check if this path mismatch is caused by distutils config files. Those
|
|
350
|
-
# files will no longer work once we switch to sysconfig, so this raises a
|
|
351
|
-
# deprecation message for them.
|
|
352
|
-
default_old = _distutils.distutils_scheme(
|
|
353
|
-
dist_name,
|
|
354
|
-
user,
|
|
355
|
-
home,
|
|
356
|
-
root,
|
|
357
|
-
isolated,
|
|
358
|
-
prefix,
|
|
359
|
-
ignore_config_files=True,
|
|
360
|
-
)
|
|
361
|
-
if any(default_old[k] != getattr(old, k) for k in SCHEME_KEYS):
|
|
362
|
-
deprecated(
|
|
363
|
-
reason=(
|
|
364
|
-
"Configuring installation scheme with distutils config files "
|
|
365
|
-
"is deprecated and will no longer work in the near future. If you "
|
|
366
|
-
"are using a Homebrew or Linuxbrew Python, please see discussion "
|
|
367
|
-
"at https://github.com/Homebrew/homebrew-core/issues/76621"
|
|
368
|
-
),
|
|
369
|
-
replacement=None,
|
|
370
|
-
gone_in=None,
|
|
371
|
-
)
|
|
372
|
-
return old
|
|
373
|
-
|
|
374
|
-
# Post warnings about this mismatch so user can report them back.
|
|
375
|
-
for old_v, new_v, key in warning_contexts:
|
|
376
|
-
_warn_mismatched(old_v, new_v, key=key)
|
|
377
|
-
_log_context(user=user, home=home, root=root, prefix=prefix)
|
|
378
|
-
|
|
379
|
-
return old
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
def get_bin_prefix() -> str:
|
|
383
|
-
new = _sysconfig.get_bin_prefix()
|
|
384
|
-
if _USE_SYSCONFIG:
|
|
385
|
-
return new
|
|
386
|
-
|
|
387
|
-
old = _distutils.get_bin_prefix()
|
|
388
|
-
if _warn_if_mismatch(pathlib.Path(old), pathlib.Path(new), key="bin_prefix"):
|
|
389
|
-
_log_context()
|
|
390
|
-
return old
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
def get_bin_user() -> str:
|
|
394
|
-
return _sysconfig.get_scheme("", user=True).scripts
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
def _looks_like_deb_system_dist_packages(value: str) -> bool:
|
|
398
|
-
"""Check if the value is Debian's APT-controlled dist-packages.
|
|
399
|
-
|
|
400
|
-
Debian's ``distutils.sysconfig.get_python_lib()`` implementation returns the
|
|
401
|
-
default package path controlled by APT, but does not patch ``sysconfig`` to
|
|
402
|
-
do the same. This is similar to the bug worked around in ``get_scheme()``,
|
|
403
|
-
but here the default is ``deb_system`` instead of ``unix_local``. Ultimately
|
|
404
|
-
we can't do anything about this Debian bug, and this detection allows us to
|
|
405
|
-
skip the warning when needed.
|
|
406
|
-
"""
|
|
407
|
-
if not _looks_like_debian_scheme():
|
|
408
|
-
return False
|
|
409
|
-
if value == "/usr/lib/python3/dist-packages":
|
|
410
|
-
return True
|
|
411
|
-
return False
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
def get_purelib() -> str:
|
|
415
|
-
"""Return the default pure-Python lib location."""
|
|
416
|
-
new = _sysconfig.get_purelib()
|
|
417
|
-
if _USE_SYSCONFIG:
|
|
418
|
-
return new
|
|
419
|
-
|
|
420
|
-
old = _distutils.get_purelib()
|
|
421
|
-
if _looks_like_deb_system_dist_packages(old):
|
|
422
|
-
return old
|
|
423
|
-
if _warn_if_mismatch(pathlib.Path(old), pathlib.Path(new), key="purelib"):
|
|
424
|
-
_log_context()
|
|
425
|
-
return old
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
def get_platlib() -> str:
|
|
429
|
-
"""Return the default platform-shared lib location."""
|
|
430
|
-
new = _sysconfig.get_platlib()
|
|
431
|
-
if _USE_SYSCONFIG:
|
|
432
|
-
return new
|
|
433
|
-
|
|
434
|
-
from . import _distutils
|
|
435
|
-
|
|
436
|
-
old = _distutils.get_platlib()
|
|
437
|
-
if _looks_like_deb_system_dist_packages(old):
|
|
438
|
-
return old
|
|
439
|
-
if _warn_if_mismatch(pathlib.Path(old), pathlib.Path(new), key="platlib"):
|
|
440
|
-
_log_context()
|
|
441
|
-
return old
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"""Locations where we look for configs, install stuff, etc"""
|
|
2
|
-
|
|
3
|
-
# The following comment should be removed at some point in the future.
|
|
4
|
-
# mypy: strict-optional=False
|
|
5
|
-
|
|
6
|
-
# If pip's going to use distutils, it should not be using the copy that setuptools
|
|
7
|
-
# might have injected into the environment. This is done by removing the injected
|
|
8
|
-
# shim, if it's injected.
|
|
9
|
-
#
|
|
10
|
-
# See https://github.com/pypa/pip/issues/8761 for the original discussion and
|
|
11
|
-
# rationale for why this is done within pip.
|
|
12
|
-
from __future__ import annotations
|
|
13
|
-
|
|
14
|
-
try:
|
|
15
|
-
__import__("_distutils_hack").remove_shim()
|
|
16
|
-
except (ImportError, AttributeError):
|
|
17
|
-
pass
|
|
18
|
-
|
|
19
|
-
import logging
|
|
20
|
-
import os
|
|
21
|
-
import sys
|
|
22
|
-
from distutils.cmd import Command as DistutilsCommand
|
|
23
|
-
from distutils.command.install import SCHEME_KEYS
|
|
24
|
-
from distutils.command.install import install as distutils_install_command
|
|
25
|
-
from distutils.sysconfig import get_python_lib
|
|
26
|
-
|
|
27
|
-
from pip._internal.models.scheme import Scheme
|
|
28
|
-
from pip._internal.utils.compat import WINDOWS
|
|
29
|
-
from pip._internal.utils.virtualenv import running_under_virtualenv
|
|
30
|
-
|
|
31
|
-
from .base import get_major_minor_version
|
|
32
|
-
|
|
33
|
-
logger = logging.getLogger(__name__)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
def distutils_scheme(
|
|
37
|
-
dist_name: str,
|
|
38
|
-
user: bool = False,
|
|
39
|
-
home: str | None = None,
|
|
40
|
-
root: str | None = None,
|
|
41
|
-
isolated: bool = False,
|
|
42
|
-
prefix: str | None = None,
|
|
43
|
-
*,
|
|
44
|
-
ignore_config_files: bool = False,
|
|
45
|
-
) -> dict[str, str]:
|
|
46
|
-
"""
|
|
47
|
-
Return a distutils install scheme
|
|
48
|
-
"""
|
|
49
|
-
from distutils.dist import Distribution
|
|
50
|
-
|
|
51
|
-
dist_args: dict[str, str | list[str]] = {"name": dist_name}
|
|
52
|
-
if isolated:
|
|
53
|
-
dist_args["script_args"] = ["--no-user-cfg"]
|
|
54
|
-
|
|
55
|
-
d = Distribution(dist_args)
|
|
56
|
-
if not ignore_config_files:
|
|
57
|
-
try:
|
|
58
|
-
d.parse_config_files()
|
|
59
|
-
except UnicodeDecodeError:
|
|
60
|
-
paths = d.find_config_files()
|
|
61
|
-
logger.warning(
|
|
62
|
-
"Ignore distutils configs in %s due to encoding errors.",
|
|
63
|
-
", ".join(os.path.basename(p) for p in paths),
|
|
64
|
-
)
|
|
65
|
-
obj: DistutilsCommand | None = None
|
|
66
|
-
obj = d.get_command_obj("install", create=True)
|
|
67
|
-
assert obj is not None
|
|
68
|
-
i: distutils_install_command = obj
|
|
69
|
-
# NOTE: setting user or home has the side-effect of creating the home dir
|
|
70
|
-
# or user base for installations during finalize_options()
|
|
71
|
-
# ideally, we'd prefer a scheme class that has no side-effects.
|
|
72
|
-
assert not (user and prefix), f"user={user} prefix={prefix}"
|
|
73
|
-
assert not (home and prefix), f"home={home} prefix={prefix}"
|
|
74
|
-
i.user = user or i.user
|
|
75
|
-
if user or home:
|
|
76
|
-
i.prefix = ""
|
|
77
|
-
i.prefix = prefix or i.prefix
|
|
78
|
-
i.home = home or i.home
|
|
79
|
-
i.root = root or i.root
|
|
80
|
-
i.finalize_options()
|
|
81
|
-
|
|
82
|
-
scheme: dict[str, str] = {}
|
|
83
|
-
for key in SCHEME_KEYS:
|
|
84
|
-
scheme[key] = getattr(i, "install_" + key)
|
|
85
|
-
|
|
86
|
-
# install_lib specified in setup.cfg should install *everything*
|
|
87
|
-
# into there (i.e. it takes precedence over both purelib and
|
|
88
|
-
# platlib). Note, i.install_lib is *always* set after
|
|
89
|
-
# finalize_options(); we only want to override here if the user
|
|
90
|
-
# has explicitly requested it hence going back to the config
|
|
91
|
-
if "install_lib" in d.get_option_dict("install"):
|
|
92
|
-
scheme.update({"purelib": i.install_lib, "platlib": i.install_lib})
|
|
93
|
-
|
|
94
|
-
if running_under_virtualenv():
|
|
95
|
-
if home:
|
|
96
|
-
prefix = home
|
|
97
|
-
elif user:
|
|
98
|
-
prefix = i.install_userbase
|
|
99
|
-
else:
|
|
100
|
-
prefix = i.prefix
|
|
101
|
-
scheme["headers"] = os.path.join(
|
|
102
|
-
prefix,
|
|
103
|
-
"include",
|
|
104
|
-
"site",
|
|
105
|
-
f"python{get_major_minor_version()}",
|
|
106
|
-
dist_name,
|
|
107
|
-
)
|
|
108
|
-
|
|
109
|
-
if root is not None:
|
|
110
|
-
path_no_drive = os.path.splitdrive(os.path.abspath(scheme["headers"]))[1]
|
|
111
|
-
scheme["headers"] = os.path.join(root, path_no_drive[1:])
|
|
112
|
-
|
|
113
|
-
return scheme
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
def get_scheme(
|
|
117
|
-
dist_name: str,
|
|
118
|
-
user: bool = False,
|
|
119
|
-
home: str | None = None,
|
|
120
|
-
root: str | None = None,
|
|
121
|
-
isolated: bool = False,
|
|
122
|
-
prefix: str | None = None,
|
|
123
|
-
) -> Scheme:
|
|
124
|
-
"""
|
|
125
|
-
Get the "scheme" corresponding to the input parameters. The distutils
|
|
126
|
-
documentation provides the context for the available schemes:
|
|
127
|
-
https://docs.python.org/3/install/index.html#alternate-installation
|
|
128
|
-
|
|
129
|
-
:param dist_name: the name of the package to retrieve the scheme for, used
|
|
130
|
-
in the headers scheme path
|
|
131
|
-
:param user: indicates to use the "user" scheme
|
|
132
|
-
:param home: indicates to use the "home" scheme and provides the base
|
|
133
|
-
directory for the same
|
|
134
|
-
:param root: root under which other directories are re-based
|
|
135
|
-
:param isolated: equivalent to --no-user-cfg, i.e. do not consider
|
|
136
|
-
~/.pydistutils.cfg (posix) or ~/pydistutils.cfg (non-posix) for
|
|
137
|
-
scheme paths
|
|
138
|
-
:param prefix: indicates to use the "prefix" scheme and provides the
|
|
139
|
-
base directory for the same
|
|
140
|
-
"""
|
|
141
|
-
scheme = distutils_scheme(dist_name, user, home, root, isolated, prefix)
|
|
142
|
-
return Scheme(
|
|
143
|
-
platlib=scheme["platlib"],
|
|
144
|
-
purelib=scheme["purelib"],
|
|
145
|
-
headers=scheme["headers"],
|
|
146
|
-
scripts=scheme["scripts"],
|
|
147
|
-
data=scheme["data"],
|
|
148
|
-
)
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
def get_bin_prefix() -> str:
|
|
152
|
-
# XXX: In old virtualenv versions, sys.prefix can contain '..' components,
|
|
153
|
-
# so we need to call normpath to eliminate them.
|
|
154
|
-
prefix = os.path.normpath(sys.prefix)
|
|
155
|
-
if WINDOWS:
|
|
156
|
-
bin_py = os.path.join(prefix, "Scripts")
|
|
157
|
-
# buildout uses 'bin' on Windows too?
|
|
158
|
-
if not os.path.exists(bin_py):
|
|
159
|
-
bin_py = os.path.join(prefix, "bin")
|
|
160
|
-
return bin_py
|
|
161
|
-
# Forcing to use /usr/local/bin for standard macOS framework installs
|
|
162
|
-
# Also log to ~/Library/Logs/ for use with the Console.app log viewer
|
|
163
|
-
if sys.platform[:6] == "darwin" and prefix[:16] == "/System/Library/":
|
|
164
|
-
return "/usr/local/bin"
|
|
165
|
-
return os.path.join(prefix, "bin")
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
def get_purelib() -> str:
|
|
169
|
-
return get_python_lib(plat_specific=False)
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
def get_platlib() -> str:
|
|
173
|
-
return get_python_lib(plat_specific=True)
|