|
1 | 1 | import os |
2 | 2 | import subprocess |
3 | 3 | from pathlib import Path |
| 4 | +from shutil import which |
4 | 5 | from sys import platform, executable |
5 | 6 | from typing import Sequence |
6 | 7 |
|
@@ -33,16 +34,17 @@ def baked_with_development_dependencies(cookies): |
33 | 34 | if platform.startswith("win") and os.environ.get('CI', False): |
34 | 35 | # Creating virtualenv does not work on Windows CI, |
35 | 36 | # falling back to using current Python |
36 | | - bin_dir = str(Path(executable).parent) + '\\' |
| 37 | + pip = Path(which('pip3')) |
| 38 | + bin_dir = str(pip.parent) + '\\' |
37 | 39 | print(bin_dir) |
38 | 40 | print(list(Path(bin_dir).iterdir())) |
39 | 41 | else: |
40 | 42 | env_output = run(['python3', '-m', 'venv', 'env'], result.project) |
41 | 43 | assert env_output.returncode == 0 |
42 | 44 | bin_dir = 'env/Scripts/' if platform.startswith("win") else 'env/bin/' |
43 | | - latest_pip_output = run([f'{bin_dir}pip', 'install', '--upgrade', 'pip', 'setuptools'], result.project) |
| 45 | + latest_pip_output = run([f'{bin_dir}pip3', 'install', '--upgrade', 'pip', 'setuptools'], result.project) |
44 | 46 | assert latest_pip_output.returncode == 0 |
45 | | - pip_output = run([f'{bin_dir}pip', 'install', '--editable', '.[dev]'], result.project) |
| 47 | + pip_output = run([f'{bin_dir}pip3', 'install', '--editable', '.[dev]'], result.project) |
46 | 48 | assert pip_output.returncode == 0 |
47 | 49 | return result.project, bin_dir |
48 | 50 |
|
|
0 commit comments