Skip to content

Commit

Permalink
Add runtime dependency on setuptools for cpp_extensions (pytorch#127921)
Browse files Browse the repository at this point in the history
As per title since this was removed from the builtin python binary in 3.12 and we use it `torch.utils.cpp_extension.*`.

Pull Request resolved: pytorch#127921
Approved by: https://github.com/Skylion007
  • Loading branch information
albanD authored and pytorchmergebot committed Jun 5, 2024
1 parent 2fd7566 commit 8bcebc8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1137,6 +1137,9 @@ def main():
'mkl>=2021.1.1,<=2021.4.0; platform_system == "Windows"',
]

if sys.version_info >= (3, 12, 0):
install_requires.append("setuptools")

if BUILD_PYTHON_ONLY:
install_requires.append(LIBTORCH_PKG_NAME)

Expand Down

0 comments on commit 8bcebc8

Please sign in to comment.