mirror of https://github.com/pypa/pip
Compare commits
10 Commits
4e2152884f
...
46380786c5
Author | SHA1 | Date |
---|---|---|
Josh Cannon | 46380786c5 | |
Tzu-ping Chung | a15dd75d98 | |
Tzu-ping Chung | d8ab6dc6c1 | |
Qiming Xu | fe10d368f6 | |
Qiming Xu | 28250baffb | |
Qiming Xu | 88ac529219 | |
Joshua | 0e4d9b9d6c | |
Tzu-ping Chung | 7a16f19683 | |
Joshua | a9fa7eb1ca | |
Joshua | 05bd8702f6 |
|
@ -45,8 +45,8 @@ When looking at the items to be installed, pip checks what type of item
|
|||
each is, in the following order:
|
||||
|
||||
1. Project or archive URL.
|
||||
2. Local directory (which must contain a ``setup.py``, or pip will report
|
||||
an error).
|
||||
2. Local directory (which must contain a ``pyproject.toml`` or ``setup.py``,
|
||||
otherwise pip will report an error).
|
||||
3. Local file (a sdist or wheel format archive, following the naming
|
||||
conventions for those formats).
|
||||
4. A requirement, as specified in :pep:`440`.
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix resolution to respect ``--python-version`` when checking ``Requires-Python``.
|
|
@ -0,0 +1 @@
|
|||
Fix outdated pip install argument description in documentation.
|
|
@ -370,6 +370,7 @@ class InstallCommand(RequirementCommand):
|
|||
force_reinstall=options.force_reinstall,
|
||||
upgrade_strategy=upgrade_strategy,
|
||||
use_pep517=options.use_pep517,
|
||||
py_version_info=options.python_version,
|
||||
)
|
||||
|
||||
self.trace_basic_info(finder)
|
||||
|
|
|
@ -376,7 +376,10 @@ def _common_wheel_editable_install(
|
|||
tmpdir_factory: pytest.TempPathFactory, common_wheels: Path, package: str
|
||||
) -> Path:
|
||||
wheel_candidates = list(common_wheels.glob(f"{package}-*.whl"))
|
||||
assert len(wheel_candidates) == 1, wheel_candidates
|
||||
assert len(wheel_candidates) == 1, (
|
||||
f"Missing wheels in {common_wheels}, expected 1 got '{wheel_candidates}'."
|
||||
" Are you running the tests via nox? See https://pip.pypa.io/en/latest/development/getting-started/#running-tests"
|
||||
)
|
||||
install_dir = tmpdir_factory.mktemp(package) / "install"
|
||||
lib_install_dir = install_dir / "lib"
|
||||
bin_install_dir = install_dir / "bin"
|
||||
|
|
|
@ -416,6 +416,30 @@ def test_new_resolver_requires_python_error(script: PipTestEnvironment) -> None:
|
|||
assert message in result.stderr, str(result)
|
||||
|
||||
|
||||
def test_new_resolver_requires_python_ok_with_python_version_flag(
|
||||
script: PipTestEnvironment,
|
||||
) -> None:
|
||||
create_basic_wheel_for_package(
|
||||
script,
|
||||
"base",
|
||||
"0.1.0",
|
||||
requires_python="<3",
|
||||
)
|
||||
result = script.pip(
|
||||
"install",
|
||||
"--no-cache-dir",
|
||||
"--no-index",
|
||||
"--find-links",
|
||||
script.scratch_path,
|
||||
"--dry-run",
|
||||
"--python-version=2",
|
||||
"--only-binary=:all:",
|
||||
"base",
|
||||
)
|
||||
|
||||
assert not result.stderr, str(result)
|
||||
|
||||
|
||||
def test_new_resolver_installed(script: PipTestEnvironment) -> None:
|
||||
create_basic_wheel_for_package(
|
||||
script,
|
||||
|
|
Loading…
Reference in New Issue