Skip to content

Commit dd7ca45

Browse files
committed
wip
1 parent 014ebfb commit dd7ca45

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ jobs:
6161
shell: powershell
6262
run: |
6363
pip install '.[dev]'
64-
pytest ./test
64+
pytest -s ./test

autopxd/__init__.py

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,23 @@ def _find_cl():
5656
os.path.join(program_files, r"Microsoft Visual Studio\Installer\vswhere.exe"),
5757
"-prerelease",
5858
"-latest",
59-
"-products",
60-
"*",
59+
"-requires",
60+
# "Microsoft.Component.MSBuild",
61+
f"Microsoft.VisualStudio.Component.VC.Tools.{host_platform.lower()}.{build_platform}",
62+
# "-products",
63+
# "Microsoft.VisualStudio.Product.BuildTools",
64+
# "-property",
65+
# "installationPath",
6166
"-format",
6267
"json",
6368
"-utf8",
64-
"-find",
65-
rf"**\bin\Host{host_platform}\{build_platform}\cl.exe",
69+
# "-find",
70+
# rf"**\bin\Host{host_platform}\{build_platform}\cl.exe",
6671
]
6772
try:
68-
return json.loads(subprocess.check_output(cmd, encoding="utf-8"))[-1]
73+
ret = subprocess.check_output(cmd, encoding="utf-8")
74+
print("vswhere output: ", ret, flush=True)
75+
return json.loads(ret)[-1]
6976
except (OSError, subprocess.CalledProcessError, IndexError) as ex:
7077
raise RuntimeError("No suitable compiler available") from ex
7178

0 commit comments

Comments
 (0)