[BUG] Incorrect VSxxCOMNTOOLS environment variable calculation in find_vcvarsall
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.9k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
setuptools version
58.2.0
Python version
any
OS
Windows
Additional environment information
No response
Description
There is a bug in
https://github.com/pypa/setuptools/blob/3dd1af099fc1379935a975a2a5f1561870c9dc92/setuptools/_distutils/msvc9compiler.py#L232
"%f" will round its argument, e.g. if version==15.9 the above line will emit incorrect environment variable name
VS160COMNTOOLS
Expected behavior
Possible solution is
toolskey = "VS%0.f0COMNTOOLS" % int(version)
How to Reproduce
not applicable
Output
not applicable
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/_distutils/msvc9compiler.py at the referenced line in find_vcvarsall. Check how the current formatting calculates the VSxxCOMNTOOLS environment variable, especially for version 15.9, and compare it with the expected variable name in the issue. Done means the calculation no longer rounds the version into an incorrect environment variable name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100