Should the auto setup check for products ?

Open
#6 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
build-system

Research direction

Start by locating the auto setup script and its existing vswhere detection, then review how Visual Studio installations and C++ compiler support are currently checked. Test the behavior with a winget-installed Visual Studio instance. Done means the expected installation is detected reliably, or the issue is clarified into a concrete requirement.

Written by the indexing model from the issue text.

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:


        # 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.

Dominant language
Python
Stars
0
Forks
0
Avg merge
1d 17h
Merged PRs (30d)
5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ansys/python-usd-viewer

All issues in ansys/python-usd-viewer

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.