@@ -23,17 +23,28 @@ def run_stubtest(typeshed_dir: Path) -> int:
23
23
combined_allowlist = f"{ sys .platform } -py{ sys .version_info .major } { sys .version_info .minor } .txt"
24
24
with tempfile .TemporaryDirectory () as tmp :
25
25
venv_dir = Path (tmp )
26
+ print ("Setting up an isolated virtual environment..." , file = sys .stderr )
26
27
try :
27
28
pip_exe , python_exe = make_venv (venv_dir )
28
29
except Exception :
29
30
print_error ("fail" )
30
31
raise
31
32
32
33
# Install the same mypy version as in "requirements-tests.txt"
33
- subprocess .run ([pip_exe , "install" , get_mypy_req ()], check = True )
34
+ try :
35
+ install_command = [pip_exe , "install" , get_mypy_req ()]
36
+ subprocess .run (install_command , check = True , text = True , capture_output = True )
37
+ except subprocess .CalledProcessError as e :
38
+ print (e .stderr , file = sys .stderr )
39
+ raise
34
40
35
41
# Uninstall setuptools from the venv so we can test stdlib's distutils
36
- subprocess .run ([pip_exe , "uninstall" , "-y" , "setuptools" ], check = True )
42
+ try :
43
+ uninstall_command = [pip_exe , "uninstall" , "-y" , "setuptools" ]
44
+ subprocess .run (uninstall_command , check = True , text = True , capture_output = True )
45
+ except subprocess .CalledProcessError as e :
46
+ print (e .stderr , file = sys .stderr )
47
+ raise
37
48
38
49
cmd = [
39
50
python_exe ,
0 commit comments