Skip to content

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

Closed
zklaus wants to merge 2 commits intogh/zklaus/8/basefrom
gh/zklaus/8/head
Closed

Add dist_info to non-building setup.py commands#156709
zklaus wants to merge 2 commits intogh/zklaus/8/basefrom
gh/zklaus/8/head

Conversation

@zklaus
Copy link
Copy Markdown
Collaborator

@zklaus zklaus commented Jun 24, 2025

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.

Stack from ghstack (oldest at bottom):

[ghstack-poisoned]
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Jun 24, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/156709

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (1 Unrelated Failure)

As of commit 497a24f with merge base d9577df (image):

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@Skylion007 Skylion007 added oncall: releng In support of CI and Release Engineering release notes: releng release notes category and removed topic: not user facing topic category labels Jun 24, 2025
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"]:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slight nit:
This command is private and reserved for internal use of setuptools,
users should rely on setuptools.build_meta APIs.

Still though, looks harmless enough.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pytorchbot merge

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

slight nit: This command is private and reserved for internal use of setuptools, users should rely on setuptools.build_meta APIs.

Still though, looks harmless enough.

This is true, but also exactly how I came across it: When doing something like pip install -C---build-option=--cmake-only , immediately a full build is kicked off. This happens because setuptools calls first dist_info and then build, but passes the build options only to build. One can discuss whether that's a problem in between pip and setuptools, but ultimately it makes sense to me that dist_info doesn't do a build, right?

@zklaus
Copy link
Copy Markdown
Collaborator Author

zklaus commented Jun 25, 2025

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Jun 25, 2025
@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge failed

Reason: 1 mandatory check(s) failed. The first few are:

Dig deeper by viewing the failures on hud

Details for Dev Infra team Raised by workflow job

Failing merge rule: Core Maintainers

[ghstack-poisoned]
@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Jun 25, 2025
zklaus added a commit to zklaus/pytorch that referenced this pull request Jun 25, 2025
@XuehaiPan
Copy link
Copy Markdown
Collaborator

@pytorchbot merge

@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged oncall: releng In support of CI and Release Engineering open source release notes: releng release notes category topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants