ansys / ansys/python-usd-viewer

Should the auto setup check for products ?

Open
#6 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
0
Forks
0
Avg merge
1d 16h
Merged PRs (30d)
7

Description

This is mainly an open question and would probably be better as a discussion than an issue. Should the auto setup script check for installation using products that are expected to contain C++ compiler support ?

For example, I used `winget` to install visual studio and the auto setup script is not working. With a tiny modification:
```python

# Products that include C++ compiler support
vs_products = [
"Microsoft.VisualStudio.Product.BuildTools",
"Microsoft.VisualStudio.Product.Community",
"Microsoft.VisualStudio.Product.Professional",
"Microsoft.VisualStudio.Product.Enterprise",
]

vs_found = False
for vswhere_path in vswhere_paths:
if Path(vswhere_path).exists():
try:
# Search for any product that includes C++ build tools
result = subprocess.run(
[vswhere_path, "-latest", "-products"] + vs_products + ["-property", "installationPath"],
capture_output=True,
text=True,
check=True,
)
vs_path = result.stdout.strip()
if vs_path:
vs_found = True
break
except subprocess.CalledProcessError:
continue
```
The script no longer fails. I'm not sure that the `winget` installation is enough thugh. I'll follow the error message advices to install visual studio.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.