[FR] Autodetect Visual Studio 2022
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
What's the problem this feature will solve?
Current setuptools\msvc.py says:
Known supported compilers:
--------------------------
Microsoft Visual C++ 14.X:
Microsoft Visual C++ Build Tools 2015 (x86, x64, arm)
Microsoft Visual Studio Build Tools 2017 (x86, x64, arm, arm64)
Microsoft Visual Studio Build Tools 2019 (x86, x64, arm, arm64)
This may also support compilers shipped with compatible Visual Studio versions.
I see no good reason why Visual Studio 2022 is not among them? It could use the same mechanism as 2019 for detection.
Describe the solution you'd like
Not having to manually invoke vcvarsall.bat and do set DISTUTILS_USE_SDK=1 or edit other people's setup scripts to do that would be nice.
Alternative Solutions
No response
Additional context
Many AI projects need building some bits here and there (think torch extensions and the like), and right now they cannot build with only Visual Studio 2022 installed because it does not seem to be detected.
Code of Conduct
- I agree to follow the PSF Code of Conduct
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in setuptools/msvc.py and inspect the existing Visual Studio 2019 detection mechanism. Extend detection for Visual Studio 2022 so builds can find it without manually invoking vcvarsall.bat or setting DISTUTILS_USE_SDK=1; verify the existing compiler-detection behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100