-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Improve MANIFEST.in for source distribution #157814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/157814
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 Cancelled JobsAs of commit 6461738 with merge base 3a7db34 ( CANCELLED JOBS - The following jobs were cancelled. Please retry:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Will need to add a test for the SDist: $ uv pip install -v torch-*.tar.gz
DEBUG uv 0.8.3 (Homebrew 2025-07-24)
DEBUG Searching for default Python interpreter in virtual environments
DEBUG Found `cpython-3.13.5-macos-aarch64-none` at `/Users/PanXuehai/Projects/pytorch/dist/venv/bin/python3` (active virtual environment)
Using Python 3.13.5 environment at: venv
DEBUG Acquired lock for `venv`
DEBUG At least one requirement is not satisfied: file:///Users/PanXuehai/Projects/pytorch/dist/torch-2.9.0a0+gite955d76.tar.gz
...
DEBUG adding 'torchgen/selective_build/selector.py'
DEBUG adding 'torchgen/static_runtime/__init__.py'
DEBUG adding 'torchgen/static_runtime/config.py'
DEBUG adding 'torchgen/static_runtime/gen_static_runtime_ops.py'
DEBUG adding 'torchgen/static_runtime/generator.py'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/METADATA'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/WHEEL'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/entry_points.txt'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/top_level.txt'
DEBUG adding 'torch-2.9.0a0+gitunknown.dist-info/RECORD'
DEBUG removing build/bdist.macosx-15.0-arm64/wheel
DEBUG Released lock at `/var/folders/9r/g38s_wqs3kg0cy0n0mcdq92h0000gn/T/uv-setuptools-b139a3b1e08b9b31.lock`
DEBUG Released lock at `/Users/PanXuehai/.cache/uv/sdists-v9/path/da64d06ad13a9430/.lock`
× Failed to build `torch @ file:///Users/PanXuehai/Projects/pytorch/dist/torch-2.9.0a0+gite955d76.tar.gz`
╰─▶ Package metadata version `2.9.0a0+gitunknown` does not match given version `2.9.0a0+gite955d76`
DEBUG Released lock at `/Users/PanXuehai/Projects/pytorch/dist/venv/.lock` |
Good catch about the version number. This happens because the version is (should be) fixed at the time of building the sdist, but is recalculated by setup.py when building the wheel from the sdist, now with the git information missing. The solution is to take the version information from the sdist at wheel-build time, which I implemented in #160315. |
|
Thanks, @XuehaiPan! I have addressed your comments and also updated the manifest with some small changes that happened more recently. |
|
@pytorchbot merge |
Merge failedReason: Approvers from one of the following sets are needed:
|
atalman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
Starting merge as part of PR stack under #157815 |
1 similar comment
|
Starting merge as part of PR stack under #157815 |
The version finding logic triggered from `setup.py` generally tries to take the git information into account. This is fine for most situations where we are building from a checkout, but it creates a problem in the case of sdists, as here the version is determined at the time of sdist creation, taking the git information into account, but then later recalculated when building wheels or installing from the sdist, now with the git information missing. The solution is to take the version information directly from the sdist, which this PR adds by means of parsing the `PKG-INFO` which marks an unpacked sdist. Pull Request resolved: #160315 Approved by: https://github.com/atalman ghstack dependencies: #157814
…157815) This adds the actual creation of a standards compliant sdist along with its upload to s3 to the create release workflow. Pull Request resolved: #157815 Approved by: https://github.com/malfet, https://github.com/atalman ghstack dependencies: #157814, #160315
The version finding logic triggered from `setup.py` generally tries to take the git information into account. This is fine for most situations where we are building from a checkout, but it creates a problem in the case of sdists, as here the version is determined at the time of sdist creation, taking the git information into account, but then later recalculated when building wheels or installing from the sdist, now with the git information missing. The solution is to take the version information directly from the sdist, which this PR adds by means of parsing the `PKG-INFO` which marks an unpacked sdist. Pull Request resolved: #160315 Approved by: https://github.com/atalman ghstack dependencies: #157814
…157815) This adds the actual creation of a standards compliant sdist along with its upload to s3 to the create release workflow. Pull Request resolved: #157815 Approved by: https://github.com/malfet, https://github.com/atalman ghstack dependencies: #157814, #160315
Stack from ghstack (oldest at bottom):
cc @seemethere @malfet @atalman