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
|
2013-05-28 23:58:08 +02:00
|
|
|
from os.path import exists
|
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
|
2013-05-28 23:58:08 +02:00
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
@pytest.fixture(autouse=True)
|
|
|
|
def auto_with_wheel(with_wheel):
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
2019-02-04 06:07:48 +01:00
|
|
|
def add_files_to_dist_directory(folder):
|
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
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_wheel_exit_status_code_when_no_requirements(script):
|
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
|
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_wheel_exit_status_code_when_blank_requirements_file(script):
|
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')
|
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_pip_wheel_success(script, data):
|
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
|
|
|
)
|
2020-02-29 20:53:59 +01:00
|
|
|
wheel_file_name = 'simple-3.0-py{pyversion[0]}-none-any.whl' \
|
|
|
|
.format(**globals())
|
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)
|
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
|
|
|
|
|
|
|
|
|
2019-11-02 19:07:30 +01:00
|
|
|
def test_pip_wheel_build_cache(script, data):
|
|
|
|
"""
|
|
|
|
Test 'pip wheel' builds and caches.
|
|
|
|
"""
|
|
|
|
result = script.pip(
|
|
|
|
'wheel', '--no-index', '-f', data.find_links,
|
|
|
|
'simple==3.0',
|
|
|
|
)
|
2020-03-06 18:30:16 +01:00
|
|
|
wheel_file_name = 'simple-3.0-py{pyversion[0]}-none-any.whl' \
|
|
|
|
.format(**globals())
|
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
|
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_basic_pip_wheel_downloads_wheels(script, data):
|
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
|
|
|
|
|
|
|
|
|
2019-12-14 12:45:04 +01:00
|
|
|
def test_pip_wheel_build_relative_cachedir(script, data):
|
|
|
|
"""
|
|
|
|
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
|
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_pip_wheel_builds_when_no_binary_set(script, data):
|
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'")
|
2019-12-15 12:51:14 +01:00
|
|
|
def test_pip_wheel_readonly_cache(script, data, tmpdir):
|
|
|
|
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
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_pip_wheel_builds_editable_deps(script, data):
|
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,
|
2017-05-14 00:23:17 +02:00
|
|
|
'-e', editable_path
|
2014-05-03 19:02:23 +02:00
|
|
|
)
|
2020-03-06 18:30:16 +01:00
|
|
|
wheel_file_name = 'simple-1.0-py{pyversion[0]}-none-any.whl' \
|
|
|
|
.format(**globals())
|
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
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_pip_wheel_builds_editable(script, data):
|
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,
|
2017-05-14 00:23:17 +02:00
|
|
|
'-e', editable_path
|
2016-05-26 12:41:01 +02:00
|
|
|
)
|
2020-03-06 18:30:16 +01:00
|
|
|
wheel_file_name = 'simplewheel-1.0-py{pyversion[0]}-none-any.whl' \
|
|
|
|
.format(**globals())
|
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-11-12 12:34:37 +01:00
|
|
|
def test_pip_wheel_builds_editable_does_not_create_zip(script, data, tmpdir):
|
|
|
|
"""
|
|
|
|
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")
|
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_pip_wheel_fail(script, data):
|
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
|
|
|
)
|
2020-03-06 18:30:16 +01:00
|
|
|
wheel_file_name = 'wheelbroken-0.1-py{pyversion[0]}-none-any.whl' \
|
|
|
|
.format(**globals())
|
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
|
|
|
|
|
|
|
|
2020-10-25 20:06:14 +01:00
|
|
|
@pytest.mark.xfail(
|
|
|
|
reason="The --build option was removed"
|
|
|
|
)
|
2020-06-04 17:05:54 +02:00
|
|
|
def test_no_clean_option_blocks_cleaning_after_wheel(
|
|
|
|
script,
|
|
|
|
data,
|
2020-10-30 01:28:02 +01:00
|
|
|
resolver_variant,
|
2020-06-04 17:05:54 +02:00
|
|
|
):
|
2013-05-28 23:58:08 +02:00
|
|
|
"""
|
|
|
|
Test --no-clean option blocks cleaning after wheel build
|
|
|
|
"""
|
2014-11-12 01:19:32 +01:00
|
|
|
build = script.venv_path / 'build'
|
2014-01-28 15:17:51 +01:00
|
|
|
result = script.pip(
|
2014-11-12 01:19:32 +01:00
|
|
|
'wheel', '--no-clean', '--no-index', '--build', build,
|
2020-02-29 20:53:59 +01:00
|
|
|
'--find-links={data.find_links}'.format(**locals()),
|
2017-05-14 00:23:17 +02:00
|
|
|
'simple',
|
2017-04-26 14:38:13 +02:00
|
|
|
expect_temp=True,
|
2020-06-01 12:28:18 +02:00
|
|
|
# TODO: allow_stderr_warning is used for the --build deprecation,
|
|
|
|
# remove it when removing support for --build
|
|
|
|
allow_stderr_warning=True,
|
2014-01-28 15:17:51 +01:00
|
|
|
)
|
2020-06-04 17:05:54 +02:00
|
|
|
|
2020-10-30 01:28:02 +01:00
|
|
|
if resolver_variant == "legacy":
|
2020-06-04 17:05:54 +02:00
|
|
|
build = build / 'simple'
|
|
|
|
message = "build/simple should still exist {}".format(result)
|
|
|
|
assert exists(build), message
|
2013-06-07 04:11:43 +02:00
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_pip_wheel_source_deps(script, data):
|
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
|
|
|
)
|
2020-03-06 18:30:16 +01:00
|
|
|
wheel_file_name = 'source-1.0-py{pyversion[0]}-none-any.whl' \
|
|
|
|
.format(**globals())
|
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
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_wheel_package_with_latin1_setup(script, data):
|
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
|
|
|
|
|
|
|
|
2018-04-18 09:52:25 +02:00
|
|
|
def test_pip_wheel_with_pep518_build_reqs(script, data, common_wheels):
|
|
|
|
result = script.pip('wheel', '--no-index', '-f', data.find_links,
|
|
|
|
'-f', common_wheels, 'pep518==3.0',)
|
2020-03-06 18:30:16 +01:00
|
|
|
wheel_file_name = 'pep518-3.0-py{pyversion[0]}-none-any.whl' \
|
|
|
|
.format(**globals())
|
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
|
|
|
|
|
|
|
|
2018-10-08 18:09:53 +02:00
|
|
|
def test_pip_wheel_with_pep518_build_reqs_no_isolation(script, data):
|
|
|
|
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
|
|
|
)
|
2020-03-06 18:30:16 +01:00
|
|
|
wheel_file_name = 'pep518-3.0-py{pyversion[0]}-none-any.whl' \
|
|
|
|
.format(**globals())
|
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
|
|
|
|
|
|
|
|
2018-05-31 08:12:10 +02:00
|
|
|
def test_pip_wheel_with_user_set_in_config(script, data, common_wheels):
|
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',
|
2018-05-31 08:12:10 +02:00
|
|
|
'--no-index', '-f', common_wheels
|
2018-03-25 19:22:18 +02:00
|
|
|
)
|
|
|
|
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')
|
2020-03-19 17:57:53 +01:00
|
|
|
def test_pip_wheel_ext_module_with_tmpdir_inside(script, data, common_wheels):
|
|
|
|
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
|
|
|
|
script.environ['CC'] = script.environ['LDSHARED'] = str('true')
|
|
|
|
|
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
|
2019-02-04 06:07:48 +01:00
|
|
|
def test_pep517_wheels_are_not_confused_with_other_files(script, tmpdir, data):
|
|
|
|
"""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
|
|
|
|
|
2020-03-06 18:30:16 +01:00
|
|
|
wheel_file_name = 'withpyproject-0.0.1-py{pyversion[0]}-none-any.whl' \
|
|
|
|
.format(**globals())
|
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
|
|
|
|
|
|
|
|
|
|
|
def test_legacy_wheels_are_not_confused_with_other_files(script, tmpdir, data):
|
|
|
|
"""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
|
|
|
|
|
2020-03-06 18:30:16 +01:00
|
|
|
wheel_file_name = 'simplewheel-1.0-py{pyversion[0]}-none-any.whl' \
|
|
|
|
.format(**globals())
|
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)
|