[Feature Request] Public interface for _msvccompiler._get_vc_env
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 59
- Forks
- 94
- PR merge metrics
- No merged PRs in 30d
Description
pytorch's repository is using an import of setuptools / distutil.
https://github.com/pytorch/pytorch/blob/main/tools/build_pytorch_libs.py#L17-L25
def _get_vc_env(vc_arch: str) -> dict[str, str]:
try:
from setuptools import distutils # type: ignore[import]
return distutils._msvccompiler._get_vc_env(vc_arch) # type: ignore[no-any-return]
except AttributeError:
from setuptools._distutils import _msvccompiler # type: ignore[import]
return _msvccompiler._get_vc_env(vc_arch) # type: ignore[no-any-return]
However, its location/implementation is being changed and causing the errors as follows:
AttributeError: module 'distutils._msvccompiler' has no attribute '_get_vc_env'
Example issues:
https://github.com/pypa/setuptools/issues/4874
https://github.com/pytorch/pytorch/issues/148877
https://github.com/pytorch/pytorch/issues/141319
Could you please open a reliable public interface for _get_vc_env , so pytorch 's repository could be updated to use that import for the future versions?
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 by reviewing the _get_vc_env call in pytorch's tools/build_pytorch_libs.py and the reported AttributeError cases. Trace where _msvccompiler currently provides this functionality and determine the stable public interface needed for future callers. Done means callers can access the Visual C++ environment without relying on the private attribute.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100