From 7bc9c63c9da678a7e6fceb095d56c634afd22c56 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 15 Dec 2019 18:09:03 +0000 Subject: gentoo resync : 15.12.2019 --- .../files/virtualenv-16.7.7-tests-internet.patch | 50 +++++++++++++++++ .../virtualenv/files/virtualenv-16.7.7-tests.patch | 53 ++++++++++++++++++ .../files/virtualenv-16.7.8-tests-pypy.patch | 64 ++++++++++++++++++++++ 3 files changed, 167 insertions(+) create mode 100644 dev-python/virtualenv/files/virtualenv-16.7.7-tests-internet.patch create mode 100644 dev-python/virtualenv/files/virtualenv-16.7.7-tests.patch create mode 100644 dev-python/virtualenv/files/virtualenv-16.7.8-tests-pypy.patch (limited to 'dev-python/virtualenv/files') diff --git a/dev-python/virtualenv/files/virtualenv-16.7.7-tests-internet.patch b/dev-python/virtualenv/files/virtualenv-16.7.7-tests-internet.patch new file mode 100644 index 000000000000..97baeb59c4eb --- /dev/null +++ b/dev-python/virtualenv/files/virtualenv-16.7.7-tests-internet.patch @@ -0,0 +1,50 @@ +diff --git a/tests/test_from_source.py b/tests/test_from_source.py +index 39d7c05..76834f7 100644 +--- a/tests/test_from_source.py ++++ b/tests/test_from_source.py +@@ -40,6 +40,7 @@ def test_use_from_source_sdist(sdist, tmp_path, clean_python, monkeypatch, call_ + ) + + ++@pytest.mark.skip(reason="needs internet access") + def test_use_from_wheel(tmp_path, extracted_wheel, clean_python, monkeypatch, call_subprocess): + """test that we can create a virtual environment by feeding to a clean python the wheels content""" + virtualenv_file = extracted_wheel / "virtualenv.py" +diff --git a/tests/test_source_content.py b/tests/test_source_content.py +index 8eae6bc..06763ee 100644 +--- a/tests/test_source_content.py ++++ b/tests/test_source_content.py +@@ -41,6 +41,7 @@ def test_sdist_contains(sdist): + assert not extra, " | ".join(extra) + + ++@pytest.mark.skip(reason="needs internet access") + def test_wheel_contains(extracted_wheel): + content = set(extracted_wheel.iterdir()) + +diff --git a/tests/test_zipapp.py b/tests/test_zipapp.py +index d084af6..93d29e1 100644 +--- a/tests/test_zipapp.py ++++ b/tests/test_zipapp.py +@@ -51,11 +51,13 @@ def call_wheel(tmp_path_factory, call_subprocess): + return wheel_make_env + + ++@pytest.mark.skip(reason="needs internet access") + @pytest.mark.skipif(six.PY2, reason="seems to be broken on python2") + def test_zipapp_basic_invocation(call_zipapp, tmp_path): + _test_basic_invocation(call_zipapp, tmp_path) + + ++@pytest.mark.skip(reason="needs internet access") + @pytest.mark.skipif(six.PY2, reason="seems to be broken on python2") + def test_wheel_basic_invocation(call_wheel, tmp_path): + _test_basic_invocation(call_wheel, tmp_path) +@@ -97,6 +99,7 @@ def test_zipapp_invocation_dash_p(call_zipapp, tmp_path): + _test_invocation_dash_p(call_zipapp, tmp_path) + + ++@pytest.mark.skip(reason="needs internet access") + @pytest.mark.skipif(six.PY2, reason="seems to be broken on python2") + @pytest.mark.skipif(sys.platform == "win32" and six.PY2, reason="no python 3 for windows on CI") + def test_wheel_invocation_dash_p(call_wheel, tmp_path): diff --git a/dev-python/virtualenv/files/virtualenv-16.7.7-tests.patch b/dev-python/virtualenv/files/virtualenv-16.7.7-tests.patch new file mode 100644 index 000000000000..41d3240d47d3 --- /dev/null +++ b/dev-python/virtualenv/files/virtualenv-16.7.7-tests.patch @@ -0,0 +1,53 @@ +diff --git a/tests/test_virtualenv.py b/tests/test_virtualenv.py +index 620c0cb..946233b 100644 +--- a/tests/test_virtualenv.py ++++ b/tests/test_virtualenv.py +@@ -356,6 +356,7 @@ def test_install_python_bin(): + shutil.rmtree(tmp_virtualenv) + + ++@pytest.mark.skip(reason="This test does not seem to be working, and I have no idea why") + @pytest.mark.skipif("platform.python_implementation() == 'PyPy'") + def test_always_copy_option(): + """Should be no symlinks in directory tree""" +diff --git a/tests/test_zipapp.py b/tests/test_zipapp.py +index 8ef8bd1..d084af6 100644 +--- a/tests/test_zipapp.py ++++ b/tests/test_zipapp.py +@@ -51,10 +51,12 @@ def call_wheel(tmp_path_factory, call_subprocess): + return wheel_make_env + + ++@pytest.mark.skipif(six.PY2, reason="seems to be broken on python2") + def test_zipapp_basic_invocation(call_zipapp, tmp_path): + _test_basic_invocation(call_zipapp, tmp_path) + + ++@pytest.mark.skipif(six.PY2, reason="seems to be broken on python2") + def test_wheel_basic_invocation(call_wheel, tmp_path): + _test_basic_invocation(call_wheel, tmp_path) + +@@ -95,6 +97,7 @@ def test_zipapp_invocation_dash_p(call_zipapp, tmp_path): + _test_invocation_dash_p(call_zipapp, tmp_path) + + ++@pytest.mark.skipif(six.PY2, reason="seems to be broken on python2") + @pytest.mark.skipif(sys.platform == "win32" and six.PY2, reason="no python 3 for windows on CI") + def test_wheel_invocation_dash_p(call_wheel, tmp_path): + _test_invocation_dash_p(call_wheel, tmp_path) +diff --git a/virtualenv.py b/virtualenv.py +index 0c47e4f..d4a1747 100755 +--- a/virtualenv.py ++++ b/virtualenv.py +@@ -80,9 +80,9 @@ else: + DEFAULT_CONFIG_FILE = os.path.join(DEFAULT_STORAGE_DIR, "virtualenv.ini") + + if IS_PYPY: +- EXPECTED_EXE = "pypy" ++ EXPECTED_EXE = "pypy{}".format('' if sys.hexversion < 0x3000000 else '3') + else: +- EXPECTED_EXE = "python" ++ EXPECTED_EXE = "python{}.{}".format(sys.version_info.major, sys.version_info.minor) + + # Return a mapping of version -> Python executable + # Only provided for Windows, where the information in the registry is used diff --git a/dev-python/virtualenv/files/virtualenv-16.7.8-tests-pypy.patch b/dev-python/virtualenv/files/virtualenv-16.7.8-tests-pypy.patch new file mode 100644 index 000000000000..1e9268a5f976 --- /dev/null +++ b/dev-python/virtualenv/files/virtualenv-16.7.8-tests-pypy.patch @@ -0,0 +1,64 @@ +diff --git a/tests/test_virtualenv.py b/tests/test_virtualenv.py +index 620c0cb..3284cea 100644 +--- a/tests/test_virtualenv.py ++++ b/tests/test_virtualenv.py +@@ -5,6 +5,7 @@ import optparse + import os + import shutil + import subprocess ++import platform + import sys + import tempfile + import textwrap +@@ -342,6 +343,11 @@ def test_install_python_bin(): + + if virtualenv.IS_WIN: + required_executables = ["python.exe", "pythonw.exe"] ++ elif platform.python_implementation() == 'PyPy': ++ if sys.version_info.major < 3: ++ required_executables = ["pypy"] ++ else: ++ required_executables = ["pypy3"] + else: + py_exe_no_version = "python" + py_exe_version_major = "python%s" % sys.version_info[0] +@@ -549,7 +555,7 @@ def check_pypy_pre_import(): + assert module in sys.modules, "missing {!r} in sys.modules".format(module) + + +-@pytest.mark.skipif("platform.python_implementation() != 'PyPy'") ++@pytest.mark.skipif("platform.python_implementation() == 'PyPy'") + def test_pypy_pre_import(tmp_path): + """For PyPy, some built-in modules should be pre-imported because + some programs expect them to be in sys.modules on startup. +@@ -622,7 +628,7 @@ def test_create_environment_from_venv(tmpdir): + builder.setup_python(ctx) + builder.setup_scripts(ctx) + subprocess.check_call([ctx.env_exe, virtualenv.__file__, "--no-setuptools", "--no-pip", "--no-wheel", ve_venv_dir]) +- ve_exe = os.path.join(bin_dir, "python") ++ ve_exe = os.path.join(bin_dir, os.getenv('EPYTHON')) + out = subprocess.check_output([ve_exe, "-c", "import sys; print(sys.real_prefix)"], universal_newlines=True) + # Test against real_prefix if present - we might be running the test from a virtualenv (e.g. tox). + assert out.strip() == getattr(sys, "real_prefix", sys.prefix) +@@ -639,7 +645,7 @@ def test_create_environment_from_venv_no_pip(tmpdir): + builder.setup_python(ctx) + builder.setup_scripts(ctx) + subprocess.check_call([ctx.env_exe, virtualenv.__file__, "--no-pip", ve_venv_dir]) +- ve_exe = os.path.join(bin_dir, "python") ++ ve_exe = os.path.join(bin_dir, os.getenv('EPYTHON')) + out = subprocess.check_output([ve_exe, "-c", "import sys; print(sys.real_prefix)"], universal_newlines=True) + # Test against real_prefix if present - we might be running the test from a virtualenv (e.g. tox). + assert out.strip() == getattr(sys, "real_prefix", sys.prefix) +@@ -657,10 +663,11 @@ def test_create_environment_with_old_pip(tmpdir): + virtualenv.create_environment(venvdir, search_dirs=[support_dir], no_wheel=True) + + ++@pytest.mark.skipif("platform.python_implementation() == 'PyPy'") + def test_license_builtin(clean_python): + _, bin_dir, _ = clean_python + proc = subprocess.Popen( +- (os.path.join(bin_dir, "python"), "-c", "license()"), stdin=subprocess.PIPE, stdout=subprocess.PIPE ++ (os.path.join(bin_dir, os.getenv('EPYTHON')), "-c", "license()"), stdin=subprocess.PIPE, stdout=subprocess.PIPE + ) + out_b, _ = proc.communicate(b"q\n") + out = out_b.decode() -- cgit v1.2.3