Add dist_info to non-building setup.py commands (#156709)

This adds the `dist_info` command to the list of non-building commands of `setup.py`, which avoids the current situation where simple metadata generation with any packaging tool already triggers a build.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/156709
Approved by: https://github.com/Skylion007
This commit is contained in:
Klaus Zimmermann
2025-06-25 14:24:12 +02:00
committed by PyTorch MergeBot
parent 455dfd2589
commit bbf1a6feac

View File

@ -374,7 +374,7 @@ for i, arg in enumerate(sys.argv):
break
if arg == "-q" or arg == "--quiet":
VERBOSE_SCRIPT = False
if arg in ["clean", "egg_info", "sdist"]:
if arg in ["clean", "dist_info", "egg_info", "sdist"]:
RUN_BUILD_DEPS = False
filtered_args.append(arg)
sys.argv = filtered_args