(index_url, env, extra_index_url)
| 567 | return target, _headers |
| 568 | |
| 569 | def _get_wheel_args(index_url, env, extra_index_url): |
| 570 | args = [ |
| 571 | sys.executable, |
| 572 | '-m', |
| 573 | 'pip', |
| 574 | 'wheel', |
| 575 | '-vvv', # --verbose x3 |
| 576 | '--no-deps', |
| 577 | '--no-cache-dir', |
| 578 | '--disable-pip-version-check', |
| 579 | ] |
| 580 | if index_url is not None: |
| 581 | args += ['--index-url', index_url] |
| 582 | if index_url != DEFAULT_INDEX: |
| 583 | hostname = urlparse(index_url).hostname |
| 584 | if hostname: |
| 585 | args += ['--trusted-host', hostname] |
| 586 | if extra_index_url is not None: |
| 587 | args += [ |
| 588 | '--extra-index-url', extra_index_url, '--trusted-host', |
| 589 | urlparse(extra_index_url).hostname |
| 590 | ] |
| 591 | if env is None: |
| 592 | pip_version = _get_pip_version() |
| 593 | else: |
| 594 | pip_version = dict(env)['pip_version'] |
| 595 | args[0] = dict(env)['python_executable'] |
| 596 | pip_major, pip_minor = pip_version.split('.')[0:2] |
| 597 | pip_major = int(pip_major) |
| 598 | pip_minor = int(pip_minor) |
| 599 | if pip_major >= 10: |
| 600 | args.append('--progress-bar=off') |
| 601 | if (20, 3) <= (pip_major, pip_minor) < (21, 1): |
| 602 | # See https://github.com/pypa/pip/issues/9139#issuecomment-735443177 |
| 603 | args.append('--use-deprecated=legacy-resolver') |
| 604 | return args |
| 605 | |
| 606 | def get(dist_name, |
| 607 | index_url=None, |
no test coverage detected
searching dependent graphs…