2013-05-28 23:58:08 +02:00
|
|
|
"""'pip wheel' tests"""
|
2012-10-17 00:57:10 +02:00
|
|
|
import os
|
2019-06-26 11:44:43 +02:00
|
|
|
import re
|
2020-03-19 23:21:56 +01:00
|
|
|
import sys
|
2022-06-07 11:52:38 +02:00
|
|
|
from pathlib import Path
|
2012-10-17 01:39:56 +02:00
|
|
|
|
2017-05-16 12:16:30 +02:00
|
|
|
import pytest
|
2017-06-13 14:17:00 +02:00
|
|
|
|
2020-10-25 15:26:28 +01:00
|
|
|
from pip._internal.cli.status_codes import ERROR
|
2020-03-06 18:30:16 +01:00
|
|
|
from tests.lib import pyversion # noqa: F401
|
2021-09-13 00:31:12 +02:00
|
|
|
from tests.lib import PipTestEnvironment, TestData
|
2013-05-28 23:58:08 +02:00
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def add_files_to_dist_directory(folder: Path) -> None:
|
2019-07-12 10:00:18 +02:00
|
|
|
(folder / "dist").mkdir(parents=True)
|
2019-07-02 07:00:32 +02:00
|
|
|
(folder / "dist" / "a_name-0.0.1.tar.gz").write_text("hello")
|
2019-02-04 07:21:19 +01:00
|
|
|
# Not adding a wheel file since that confuses setuptools' backend.
|
2019-07-02 07:00:32 +02:00
|
|
|
# (folder / 'dist' / 'a_name-0.0.1-py2.py3-none-any.whl').write_text(
|
|
|
|
# "hello"
|
|
|
|
# )
|
2019-02-04 06:07:48 +01:00
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_wheel_exit_status_code_when_no_requirements(
|
|
|
|
script: PipTestEnvironment,
|
|
|
|
) -> None:
|
2017-01-06 23:21:46 +01:00
|
|
|
"""
|
|
|
|
Test wheel exit status code when no requirements specified
|
|
|
|
"""
|
|
|
|
result = script.pip("wheel", expect_error=True)
|
|
|
|
assert "You must give at least one requirement to wheel" in result.stderr
|
|
|
|
assert result.returncode == ERROR
|
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_wheel_exit_status_code_when_blank_requirements_file(
|
|
|
|
script: PipTestEnvironment,
|
|
|
|
) -> None:
|
2017-01-06 23:21:46 +01:00
|
|
|
"""
|
|
|
|
Test wheel exit status code when blank requirements file specified
|
|
|
|
"""
|
2019-07-02 07:00:32 +02:00
|
|
|
script.scratch_path.joinpath("blank.txt").write_text("\n")
|
2017-01-06 23:21:46 +01:00
|
|
|
script.pip("wheel", "-r", "blank.txt")
|
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_success(script: PipTestEnvironment, data: TestData) -> None:
|
2013-05-28 23:58:08 +02:00
|
|
|
"""
|
|
|
|
Test 'pip wheel' success.
|
|
|
|
"""
|
2014-01-28 15:17:51 +01:00
|
|
|
result = script.pip(
|
2018-10-08 18:09:53 +02:00
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"-f",
|
|
|
|
data.find_links,
|
2017-05-14 00:23:17 +02:00
|
|
|
"simple==3.0",
|
2014-01-28 15:17:51 +01:00
|
|
|
)
|
2021-02-13 07:27:17 +01:00
|
|
|
wheel_file_name = f"simple-3.0-py{pyversion[0]}-none-any.whl"
|
2016-01-19 22:42:22 +01:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2019-06-26 11:44:43 +02:00
|
|
|
assert re.search(
|
|
|
|
r"Created wheel for simple: "
|
2020-02-29 20:53:59 +01:00
|
|
|
r"filename={filename} size=\d+ sha256=[A-Fa-f0-9]{{64}}".format(
|
|
|
|
filename=re.escape(wheel_file_name)
|
|
|
|
),
|
|
|
|
result.stdout,
|
2021-08-13 15:23:45 +02:00
|
|
|
)
|
2019-06-26 11:44:43 +02:00
|
|
|
assert re.search(r"^\s+Stored in directory: ", result.stdout, re.M)
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|
2013-05-28 23:58:08 +02:00
|
|
|
assert "Successfully built simple" in result.stdout, result.stdout
|
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_build_cache(script: PipTestEnvironment, data: TestData) -> None:
|
2019-11-02 19:07:30 +01:00
|
|
|
"""
|
|
|
|
Test 'pip wheel' builds and caches.
|
|
|
|
"""
|
|
|
|
result = script.pip(
|
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"-f",
|
|
|
|
data.find_links,
|
|
|
|
"simple==3.0",
|
|
|
|
)
|
2021-02-13 07:27:17 +01:00
|
|
|
wheel_file_name = f"simple-3.0-py{pyversion[0]}-none-any.whl"
|
2019-11-02 19:07:30 +01:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|
2019-11-02 19:07:30 +01:00
|
|
|
assert "Successfully built simple" in result.stdout, result.stdout
|
|
|
|
# remove target file
|
|
|
|
(script.scratch_path / wheel_file_name).unlink()
|
|
|
|
# pip wheel again and test that no build occurs since
|
|
|
|
# we get the wheel from cache
|
|
|
|
result = script.pip(
|
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"-f",
|
|
|
|
data.find_links,
|
|
|
|
"simple==3.0",
|
|
|
|
)
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|
2019-11-02 19:07:30 +01:00
|
|
|
assert "Successfully built simple" not in result.stdout, result.stdout
|
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_basic_pip_wheel_downloads_wheels(
|
|
|
|
script: PipTestEnvironment, data: TestData
|
|
|
|
) -> None:
|
2014-02-01 20:41:55 +01:00
|
|
|
"""
|
|
|
|
Test 'pip wheel' downloads wheels
|
|
|
|
"""
|
|
|
|
result = script.pip(
|
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"-f",
|
|
|
|
data.find_links,
|
|
|
|
"simple.dist",
|
|
|
|
)
|
|
|
|
wheel_file_name = "simple.dist-0.1-py2.py3-none-any.whl"
|
2016-01-19 22:42:22 +01:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|
2014-02-01 20:41:55 +01:00
|
|
|
assert "Saved" in result.stdout, result.stdout
|
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_build_relative_cachedir(
|
|
|
|
script: PipTestEnvironment, data: TestData
|
|
|
|
) -> None:
|
2019-12-14 12:45:04 +01:00
|
|
|
"""
|
|
|
|
Test 'pip wheel' builds and caches with a non-absolute cache directory.
|
|
|
|
"""
|
|
|
|
result = script.pip(
|
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"-f",
|
|
|
|
data.find_links,
|
|
|
|
"--cache-dir",
|
|
|
|
"./cache",
|
|
|
|
"simple==3.0",
|
|
|
|
)
|
|
|
|
assert result.returncode == 0
|
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_builds_when_no_binary_set(
|
|
|
|
script: PipTestEnvironment, data: TestData
|
|
|
|
) -> None:
|
2019-07-02 07:00:32 +02:00
|
|
|
data.packages.joinpath("simple-3.0-py2.py3-none-any.whl").touch()
|
2016-10-28 13:58:01 +02:00
|
|
|
# Check that the wheel package is ignored
|
2015-04-17 05:03:34 +02:00
|
|
|
res = script.pip(
|
2017-05-14 00:23:17 +02:00
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"--no-binary",
|
|
|
|
":all:",
|
2018-10-08 18:09:53 +02:00
|
|
|
"-f",
|
|
|
|
data.find_links,
|
2016-10-28 13:58:01 +02:00
|
|
|
"simple==3.0",
|
|
|
|
)
|
2018-08-28 12:31:33 +02:00
|
|
|
assert "Building wheel for simple" in str(res), str(res)
|
2015-04-17 05:03:34 +02:00
|
|
|
|
|
|
|
|
2019-12-15 13:55:48 +01:00
|
|
|
@pytest.mark.skipif("sys.platform == 'win32'")
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_readonly_cache(
|
|
|
|
script: PipTestEnvironment, data: TestData, tmpdir: Path
|
|
|
|
) -> None:
|
2019-12-15 12:51:14 +01:00
|
|
|
cache_dir = tmpdir / "cache"
|
|
|
|
cache_dir.mkdir()
|
|
|
|
os.chmod(cache_dir, 0o400) # read-only cache
|
|
|
|
# Check that the wheel package is ignored
|
|
|
|
res = script.pip(
|
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"-f",
|
|
|
|
data.find_links,
|
|
|
|
"--cache-dir",
|
|
|
|
cache_dir,
|
|
|
|
"simple==3.0",
|
|
|
|
allow_stderr_warning=True,
|
|
|
|
)
|
|
|
|
assert res.returncode == 0
|
2019-12-15 13:55:48 +01:00
|
|
|
assert "The cache has been disabled." in str(res), str(res)
|
2019-12-15 12:51:14 +01:00
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_builds_editable_deps(
|
|
|
|
script: PipTestEnvironment, data: TestData
|
|
|
|
) -> None:
|
2014-05-03 19:02:23 +02:00
|
|
|
"""
|
|
|
|
Test 'pip wheel' finds and builds dependencies of editables
|
|
|
|
"""
|
|
|
|
editable_path = os.path.join(data.src, "requires_simple")
|
|
|
|
result = script.pip(
|
2018-10-08 18:09:53 +02:00
|
|
|
"wheel", "--no-index", "-f", data.find_links, "-e", editable_path
|
2014-05-03 19:02:23 +02:00
|
|
|
)
|
2021-02-13 07:27:17 +01:00
|
|
|
wheel_file_name = f"simple-1.0-py{pyversion[0]}-none-any.whl"
|
2016-01-19 22:42:22 +01:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|
2016-05-26 12:41:01 +02:00
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_builds_editable(script: PipTestEnvironment, data: TestData) -> None:
|
2016-05-26 12:41:01 +02:00
|
|
|
"""
|
|
|
|
Test 'pip wheel' builds an editable package
|
|
|
|
"""
|
|
|
|
editable_path = os.path.join(data.src, "simplewheel-1.0")
|
|
|
|
result = script.pip(
|
2018-10-08 18:09:53 +02:00
|
|
|
"wheel", "--no-index", "-f", data.find_links, "-e", editable_path
|
2016-05-26 12:41:01 +02:00
|
|
|
)
|
2021-02-13 07:27:17 +01:00
|
|
|
wheel_file_name = f"simplewheel-1.0-py{pyversion[0]}-none-any.whl"
|
2016-05-26 12:41:01 +02:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|
2014-05-03 19:02:23 +02:00
|
|
|
|
|
|
|
|
2020-12-14 14:56:07 +01:00
|
|
|
@pytest.mark.network
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_git_editable_keeps_clone(
|
|
|
|
script: PipTestEnvironment, tmpdir: Path
|
|
|
|
) -> None:
|
2020-12-14 14:56:07 +01:00
|
|
|
"""
|
|
|
|
Test that `pip wheel -e giturl` preserves a git clone in src.
|
|
|
|
"""
|
|
|
|
script.pip(
|
|
|
|
"wheel",
|
|
|
|
"--no-deps",
|
|
|
|
"-e",
|
|
|
|
"git+https://github.com/pypa/pip-test-package#egg=pip-test-package",
|
|
|
|
"--src",
|
|
|
|
tmpdir / "src",
|
|
|
|
"--wheel-dir",
|
|
|
|
tmpdir,
|
|
|
|
)
|
|
|
|
assert (tmpdir / "src" / "pip-test-package").exists()
|
|
|
|
assert (tmpdir / "src" / "pip-test-package" / ".git").exists()
|
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_builds_editable_does_not_create_zip(
|
|
|
|
script: PipTestEnvironment, data: TestData, tmpdir: Path
|
|
|
|
) -> None:
|
2020-11-12 12:34:37 +01:00
|
|
|
"""
|
|
|
|
Test 'pip wheel' of editables does not create zip files
|
|
|
|
(regression test for issue #9122)
|
|
|
|
"""
|
|
|
|
wheel_dir = tmpdir / "wheel_dir"
|
|
|
|
wheel_dir.mkdir()
|
|
|
|
editable_path = os.path.join(data.src, "simplewheel-1.0")
|
|
|
|
script.pip("wheel", "--no-deps", "-e", editable_path, "-w", wheel_dir)
|
|
|
|
wheels = os.listdir(wheel_dir)
|
|
|
|
assert len(wheels) == 1
|
|
|
|
assert wheels[0].endswith(".whl")
|
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_fail(script: PipTestEnvironment, data: TestData) -> None:
|
2013-05-28 23:58:08 +02:00
|
|
|
"""
|
|
|
|
Test 'pip wheel' failure.
|
|
|
|
"""
|
2014-01-28 15:17:51 +01:00
|
|
|
result = script.pip(
|
2018-10-08 18:09:53 +02:00
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"-f",
|
|
|
|
data.find_links,
|
2017-05-14 00:23:17 +02:00
|
|
|
"wheelbroken==0.1",
|
2014-04-28 16:46:29 +02:00
|
|
|
expect_error=True,
|
2014-01-28 15:17:51 +01:00
|
|
|
)
|
2021-02-13 07:27:17 +01:00
|
|
|
wheel_file_name = f"wheelbroken-0.1-py{pyversion[0]}-none-any.whl"
|
2016-01-19 22:42:22 +01:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_not_create(wheel_file_path)
|
2019-03-25 06:34:42 +01:00
|
|
|
assert "FakeError" in result.stderr, result.stderr
|
2013-05-28 23:58:08 +02:00
|
|
|
assert "Failed to build wheelbroken" in result.stdout, result.stdout
|
2014-04-28 15:28:31 +02:00
|
|
|
assert result.returncode != 0
|
2013-05-28 23:58:08 +02:00
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_source_deps(script: PipTestEnvironment, data: TestData) -> None:
|
2013-06-07 04:11:43 +02:00
|
|
|
"""
|
2015-04-20 03:27:27 +02:00
|
|
|
Test 'pip wheel' finds and builds source archive dependencies
|
2014-01-28 15:17:51 +01:00
|
|
|
of wheels
|
2013-06-07 04:11:43 +02:00
|
|
|
"""
|
|
|
|
# 'requires_source' is a wheel that depends on the 'source' project
|
2014-01-28 15:17:51 +01:00
|
|
|
result = script.pip(
|
2018-10-08 18:09:53 +02:00
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"-f",
|
|
|
|
data.find_links,
|
2017-05-14 00:23:17 +02:00
|
|
|
"requires_source",
|
2014-01-28 15:17:51 +01:00
|
|
|
)
|
2021-02-13 07:27:17 +01:00
|
|
|
wheel_file_name = f"source-1.0-py{pyversion[0]}-none-any.whl"
|
2016-01-19 22:42:22 +01:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|
2013-06-07 04:11:43 +02:00
|
|
|
assert "Successfully built source" in result.stdout, result.stdout
|
2013-08-22 22:17:01 +02:00
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_wheel_package_with_latin1_setup(
|
|
|
|
script: PipTestEnvironment, data: TestData
|
|
|
|
) -> None:
|
2015-11-26 22:36:47 +01:00
|
|
|
"""Create a wheel from a package with latin-1 encoded setup.py."""
|
|
|
|
|
2019-07-02 07:00:32 +02:00
|
|
|
pkg_to_wheel = data.packages.joinpath("SetupPyLatin1")
|
2015-11-26 22:36:47 +01:00
|
|
|
result = script.pip("wheel", pkg_to_wheel)
|
|
|
|
assert "Successfully built SetupPyUTF8" in result.stdout
|
2016-12-02 17:37:55 +01:00
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_with_pep518_build_reqs(
|
|
|
|
script: PipTestEnvironment, data: TestData, common_wheels: Path
|
|
|
|
) -> None:
|
2018-04-18 09:52:25 +02:00
|
|
|
result = script.pip(
|
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"-f",
|
|
|
|
data.find_links,
|
|
|
|
"-f",
|
|
|
|
common_wheels,
|
|
|
|
"pep518==3.0",
|
|
|
|
)
|
2021-02-13 07:27:17 +01:00
|
|
|
wheel_file_name = f"pep518-3.0-py{pyversion[0]}-none-any.whl"
|
2016-12-02 17:37:55 +01:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|
2016-12-09 15:05:17 +01:00
|
|
|
assert "Successfully built pep518" in result.stdout, result.stdout
|
2016-12-02 17:37:55 +01:00
|
|
|
assert "Installing build dependencies" in result.stdout, result.stdout
|
2018-03-04 12:40:09 +01:00
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_with_pep518_build_reqs_no_isolation(
|
|
|
|
script: PipTestEnvironment, data: TestData
|
|
|
|
) -> None:
|
2018-10-08 18:09:53 +02:00
|
|
|
script.pip_install_local("simplewheel==2.0")
|
2018-03-04 12:40:09 +01:00
|
|
|
result = script.pip(
|
2018-04-18 09:52:25 +02:00
|
|
|
"wheel",
|
|
|
|
"--no-index",
|
|
|
|
"-f",
|
|
|
|
data.find_links,
|
|
|
|
"--no-build-isolation",
|
|
|
|
"pep518==3.0",
|
2018-03-04 12:40:09 +01:00
|
|
|
)
|
2021-02-13 07:27:17 +01:00
|
|
|
wheel_file_name = f"pep518-3.0-py{pyversion[0]}-none-any.whl"
|
2018-03-04 12:40:09 +01:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|
2018-03-04 12:40:09 +01:00
|
|
|
assert "Successfully built pep518" in result.stdout, result.stdout
|
|
|
|
assert "Installing build dependencies" not in result.stdout, result.stdout
|
2018-03-25 19:22:18 +02:00
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_with_user_set_in_config(
|
|
|
|
script: PipTestEnvironment, data: TestData, common_wheels: Path
|
|
|
|
) -> None:
|
2018-03-25 19:22:18 +02:00
|
|
|
config_file = script.scratch_path / "pip.conf"
|
|
|
|
script.environ["PIP_CONFIG_FILE"] = str(config_file)
|
2019-07-02 07:00:32 +02:00
|
|
|
config_file.write_text("[install]\nuser = true")
|
2018-03-25 19:22:18 +02:00
|
|
|
result = script.pip(
|
|
|
|
"wheel", data.src / "withpyproject", "--no-index", "-f", common_wheels
|
|
|
|
)
|
|
|
|
assert "Successfully built withpyproject" in result.stdout, result.stdout
|
2019-02-04 06:07:48 +01:00
|
|
|
|
|
|
|
|
2020-03-19 23:21:56 +01:00
|
|
|
@pytest.mark.skipif(
|
|
|
|
sys.platform.startswith("win"),
|
|
|
|
reason="The empty extension module does not work on Win",
|
|
|
|
)
|
2023-03-27 12:33:11 +02:00
|
|
|
@pytest.mark.xfail(
|
|
|
|
condition=sys.platform == "darwin" and sys.version_info < (3, 9),
|
|
|
|
reason=(
|
|
|
|
"Unexplained 'no module named platform' in "
|
|
|
|
"https://github.com/pypa/wheel/blob"
|
|
|
|
"/c87e6ed82b58b41b258a3e8c852af8bc1817bb00"
|
|
|
|
"/src/wheel/vendored/packaging/tags.py#L396-L411"
|
|
|
|
),
|
|
|
|
)
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pip_wheel_ext_module_with_tmpdir_inside(
|
|
|
|
script: PipTestEnvironment, data: TestData, common_wheels: Path
|
|
|
|
) -> None:
|
2020-03-19 17:57:53 +01:00
|
|
|
tmpdir = data.src / "extension/tmp"
|
|
|
|
tmpdir.mkdir()
|
|
|
|
script.environ["TMPDIR"] = str(tmpdir)
|
2020-03-19 23:21:56 +01:00
|
|
|
|
|
|
|
# To avoid a test dependency on a C compiler, we set the env vars to "noop"
|
|
|
|
# The .c source is empty anyway
|
2020-12-26 01:48:47 +01:00
|
|
|
script.environ["CC"] = script.environ["LDSHARED"] = "true"
|
2020-03-19 23:21:56 +01:00
|
|
|
|
2020-03-19 17:57:53 +01:00
|
|
|
result = script.pip(
|
|
|
|
"wheel", data.src / "extension", "--no-index", "-f", common_wheels
|
|
|
|
)
|
|
|
|
assert "Successfully built extension" in result.stdout, result.stdout
|
|
|
|
|
|
|
|
|
Mark 3 tests as network tests
________________ test_constraints_local_editable_install_pep518 ________________
...
----------------------------- Captured stdout call -----------------------------
Script result: python -m pip download setuptools wheel -d /tmp/pytest-of-mockbuild/pytest-0/test_constraints_local_editabl0/data/packages
return code: 1
-- stderr: --------------------
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba7fdeb160>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba7fdeb0b8>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba7fdeb4e0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba7fdeb6d8>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fba7fdeb860>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
Could not find a version that satisfies the requirement setuptools (from versions: )
No matching distribution found for setuptools
_____________ test_pep517_wheels_are_not_confused_with_other_files _____________
...
-- stdout: --------------------
Processing /tmp/pytest-of-mockbuild/pytest-0/test_pep517_wheels_are_not_con0/data/src/withpyproject
Installing build dependencies: started
Installing build dependencies: finished with status 'error'
Complete output from command /tmp/pytest-of-mockbuild/pytest-0/test_pep517_wheels_are_not_con0/workspace/venv/bin/python /builddir/build/BUILDROOT/python-pip-19.0.2-1.fc30.x86_64/usr/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pytest-of-mockbuild/pytest-0/test_pep517_wheels_are_not_con0/workspace/tmp/pip-build-env-3un7dqu3/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel:
Collecting setuptools
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb7cf5a8898>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb7cf5b9588>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb7cf5b9470>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb7cf5b9278>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7fb7cf5b9208>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/setuptools/
Could not find a version that satisfies the requirement setuptools (from versions: )
No matching distribution found for setuptools
________________________ test_upgrade_argparse_shadowed ________________________
...
----------------------------- Captured stdout call -----------------------------
Script result: python -m pip install argparse==1.3
return code: 1
-- stderr: --------------------
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff07d6db240>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/argparse/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff07d6db358>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/argparse/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff07d6db400>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/argparse/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff07d6db518>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/argparse/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7ff07d6c7710>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/argparse/
Could not find a version that satisfies the requirement argparse==1.3 (from versions: )
No matching distribution found for argparse==1.3
2019-02-13 12:18:34 +01:00
|
|
|
@pytest.mark.network
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_pep517_wheels_are_not_confused_with_other_files(
|
|
|
|
script: PipTestEnvironment, data: TestData
|
|
|
|
) -> None:
|
2019-02-04 06:07:48 +01:00
|
|
|
"""Check correct wheels are copied. (#6196)"""
|
|
|
|
pkg_to_wheel = data.src / "withpyproject"
|
|
|
|
add_files_to_dist_directory(pkg_to_wheel)
|
|
|
|
|
|
|
|
result = script.pip("wheel", pkg_to_wheel, "-w", script.scratch_path)
|
|
|
|
assert "Installing build dependencies" in result.stdout, result.stdout
|
|
|
|
|
2021-02-13 07:27:17 +01:00
|
|
|
wheel_file_name = f"withpyproject-0.0.1-py{pyversion[0]}-none-any.whl"
|
2019-02-04 06:07:48 +01:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|
2019-02-04 06:07:48 +01:00
|
|
|
|
|
|
|
|
2021-09-13 00:31:12 +02:00
|
|
|
def test_legacy_wheels_are_not_confused_with_other_files(
|
|
|
|
script: PipTestEnvironment, data: TestData
|
|
|
|
) -> None:
|
2019-02-04 06:07:48 +01:00
|
|
|
"""Check correct wheels are copied. (#6196)"""
|
|
|
|
pkg_to_wheel = data.src / "simplewheel-1.0"
|
|
|
|
add_files_to_dist_directory(pkg_to_wheel)
|
|
|
|
|
|
|
|
result = script.pip("wheel", pkg_to_wheel, "-w", script.scratch_path)
|
|
|
|
assert "Installing build dependencies" not in result.stdout, result.stdout
|
|
|
|
|
2021-02-13 07:27:17 +01:00
|
|
|
wheel_file_name = f"simplewheel-1.0-py{pyversion[0]}-none-any.whl"
|
2019-02-04 06:07:48 +01:00
|
|
|
wheel_file_path = script.scratch / wheel_file_name
|
2020-05-30 20:14:43 +02:00
|
|
|
result.did_create(wheel_file_path)
|