Skip to content

Commit 98f5001

Browse files
AA-Turnervstinner
authored andcommitted
00460: pythongh-132415: Update vendored setuptools in Lib/test/wheeldata
(cherry picked from commit c9f3f5b) (actual changes in .whl files removed to make this patch smaller) pythongh-127906: Add missing sys import to test_cppext (cherry picked from commit 9cba148) Co-Authored-By: Victor Stinner <vstinner@python.org>
1 parent ad5eef9 commit 98f5001

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

Lib/test/support/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2308,7 +2308,7 @@ def _findwheel(pkgname):
23082308
# Context manager that creates a virtual environment, install setuptools in it,
23092309
# and returns the paths to the venv directory and the python executable
23102310
@contextlib.contextmanager
2311-
def setup_venv_with_pip_setuptools_wheel(venv_dir):
2311+
def setup_venv_with_pip_setuptools(venv_dir):
23122312
import subprocess
23132313
from .os_helper import temp_cwd
23142314

@@ -2331,8 +2331,7 @@ def setup_venv_with_pip_setuptools_wheel(venv_dir):
23312331

23322332
cmd = (python, '-X', 'dev',
23332333
'-m', 'pip', 'install',
2334-
_findwheel('setuptools'),
2335-
_findwheel('wheel'))
2334+
_findwheel('setuptools'))
23362335
if verbose:
23372336
print()
23382337
print('Run:', ' '.join(cmd))

Lib/test/test_cext/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def check_build(self, extension_name, std=None, limited=False):
5353
self.skipTest('Py_LIMITED_API is incompatible with Py_TRACE_REFS')
5454

5555
venv_dir = 'env'
56-
with support.setup_venv_with_pip_setuptools_wheel(venv_dir) as python_exe:
56+
with support.setup_venv_with_pip_setuptools(venv_dir) as python_exe:
5757
self._check_build(extension_name, python_exe,
5858
std=std, limited=limited)
5959

Lib/test/test_cppext/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def check_build(self, extension_name, std=None, limited=False):
5151
self.skipTest('Py_LIMITED_API is incompatible with Py_TRACE_REFS')
5252

5353
venv_dir = 'env'
54-
with support.setup_venv_with_pip_setuptools_wheel(venv_dir) as python_exe:
54+
with support.setup_venv_with_pip_setuptools(venv_dir) as python_exe:
5555
self._check_build(extension_name, python_exe,
5656
std=std, limited=limited)
5757

Lib/test/test_cppext/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import os
44
import platform
55
import shlex
6+
import sys
67
import sysconfig
78
from test import support
89

Lib/test/test_peg_generator/test_c_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def setUpClass(cls):
9999
cls.addClassCleanup(shutil.rmtree, cls.library_dir)
100100

101101
with contextlib.ExitStack() as stack:
102-
python_exe = stack.enter_context(support.setup_venv_with_pip_setuptools_wheel("venv"))
102+
python_exe = stack.enter_context(support.setup_venv_with_pip_setuptools("venv"))
103103
sitepackages = subprocess.check_output(
104104
[python_exe, "-c", "import sysconfig; print(sysconfig.get_path('platlib'))"],
105105
text=True,

0 commit comments

Comments
 (0)