Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/190192
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 758efc2 with merge base bfe58eb ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: 51f8c7c Pull-Request: #190192
| # strings) to inject CUDA/ROCm/XPU pip package dependencies into the wheel. | ||
| provider = { path = "tools/metadata", module = "dependencies" } | ||
|
|
||
| [tool.scikit-build.sdist] |
There was a problem hiding this comment.
We generate some files with CMake (like various headers), should we add cmake=True key here? Also useful for any external_fetched repos by cmake? Might inflate the sdist wheel size so please check.
There was a problem hiding this comment.
Actually not sure how to make sure generated files are included or shoils they be, there is sdist.include = ["generated/foo.h"] but I dont see a way to force it run specific targets.
There was a problem hiding this comment.
I'd prefer to keep cmake=False (the default) here. An sdist should ship sources, not build products -- and we've verified it's complete as-is: the test plan builds a working wheel from this sdist on a clean machine, so every CMake-generated file (codegen from native_functions.yaml, version.h, etc.) is regenerated at wheel-build time from sources the sdist already contains. Turning on cmake=True would run a full configure at sdist time (minutes, toolchain-dependent, and it'd bake environment-specific results into a portable artifact), and as you note risks inflating size. CMake-fetched externals are intentionally out of scope for the same reason we exclude third_party/nccl -- they're downloaded at build time, and snapshotting a fetch into the sdist would pin them incorrectly. And you're right that there's no clean way to force specific targets to run for sdist collection, which is another reason to keep this to sources.
There was a problem hiding this comment.
Pull request overview
This PR adjusts PyTorch’s source distribution (sdist) contents under the scikit-build-core backend to ensure git-tracked third-party sources are not silently dropped due to gitignore-based collection, and removes the now-inert MANIFEST.in.
Changes:
- Add
[tool.scikit-build.sdist]include/exclude rules to force-include otherwise-gitignored-but-tracked vendored sources while pruning CI/plumbing paths. - Remove
MANIFEST.in, whose behavior is replaced by the scikit-build-core configuration.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| pyproject.toml | Adds scikit-build-core sdist include/exclude rules to restore vendored sources otherwise dropped by gitignore semantics. |
| MANIFEST.in | Removes the legacy setuptools sdist manifest file. |
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: 61603b4 Pull-Request: #190192
|
Does this properly handle submodule? Do we have tests that try to build the sdist? The explicit inclusion option using manifest.in feels like it would be the minimal change first, unless |
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: 4c5c2e6 Pull-Request: #190192
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: 0c86caf Pull-Request: #190192
Good questions: Submodules -- yes, handled. The comparison baseline throughout was sdist build test -- verified manually, not yet automated. The commit's test plan (a) diffs the sdist filelist against Why not MANIFEST.in -- it genuinely is dead here: scikit-build-core's native backend doesn't read it at all (it's a setuptools/distutils mechanism, and we switched backends in #180247), which is why this PR removes it. So |
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: 8f2805e Pull-Request: #190192
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: f723613 Pull-Request: #190192
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: 7bdc6da Pull-Request: #190192
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: a30f9ff Pull-Request: #190192
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: 1c34e92 Pull-Request: #190192
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: 322b0c1 Pull-Request: #190192
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: b8e7c83 Pull-Request: #190192
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) ghstack-source-id: 55b51a7 Pull-Request: #190192
albanD
left a comment
There was a problem hiding this comment.
Sounds fair as an update.
We should have a follow up clarifying what we expect users to do with these sdist and test it.
|
@pytorchbot merge |
Merge startedYour 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 |
Merge failedReason: 2 jobs have failed, first few of them are: trunk / win-vs2022-cpu-py3 / test (default, 2, 4, windows.4xlarge.nonephemeral), trunk / win-vs2022-cpu-py3 / test (default, 4, 4, windows.4xlarge.nonephemeral) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge |
Merge startedYour 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 |
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: #190192 Approved by: https://github.com/albanD, https://github.com/atalman ghstack dependencies: #180248
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (pytorch#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: pytorch#190192 Approved by: https://github.com/albanD, https://github.com/atalman ghstack dependencies: pytorch#180248
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (pytorch#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: pytorch#190192 Approved by: https://github.com/albanD, https://github.com/atalman ghstack dependencies: pytorch#180248
scikit-build-core collects sdist contents by walking the tree with gitignore semantics rather than from git tracking. Several vendored trees commit files that their own .gitignore matches (XNNPACK's generated microkernels under gen/, all oneDNN C++ sources via ideep's "*.cpp" pattern, protobuf's checked-in *.pb.cc, clog under qnnpack's deps/), and PyTorch's top-level .gitignore patterns (bare "gen", "*.pb.h") also match tracked third-party files. The walk therefore silently dropped ~11,500 tracked files, leaving an sdist that cannot build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources. The legacy setup.py sdist never hit this because MANIFEST.in grafts copy from disk regardless of gitignore. Fix: re-include the affected roots via [tool.scikit-build.sdist]. In scikit-build-core's collector, include matches take precedence over every exclude source (user excludes, built-ins, gitignore), so a separate sdist.exclude list cannot trim a blanket include; entries that must not ship despite the blanket include are negated inside the include list and then caught by an exclude source (see the comment in pyproject.toml for the exact mechanics). The natural alternative -- collecting the file list from git tracking -- does not exist in scikit-build-core today; worth proposing upstream, at which point this block can go away. Deliberately excluded (1323 tracked files, matching the legacy MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin, vendored .github dirs) and unneeded vendored language bindings (flatbuffers java/kotlin, ittapi rust). The latter were pruned by MANIFEST.in (pytorch#157814) to work around invalid symlinks in those trees; under scikit-build-core the default sdist.resolve-symlinks="all" would instead silently duplicate the link targets into the sdist. With these prunes the sdist contains no symlink members at all; the handful of remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...) dereference to a few KB of duplicated content. MANIFEST.in itself is removed: scikit-build-core's native backend never reads it, so it has been inert since the backend switch and its sdist role is fully replaced by the configuration added here. ## Test plan - [x] sdist file list matches `git ls-files --recurse-submodules` exactly, up to (a) the 1323 deliberately excluded files above and (b) 4 unicode-quoting artifacts of the listing comparison itself, with zero .git pointers, bytecode, third_party/nccl content, or symlink members: ``` uv build --sdist --out-dir dist git ls-files --recurse-submodules | sort > /tmp/git-files.txt tar tzf dist/torch-*.tar.gz | sed 's|^[^/]*/||' | grep -v '/$' | sort > /tmp/sdist-files.txt comm -23 /tmp/git-files.txt /tmp/sdist-files.txt grep -cE '\.git$|\.pyc$|__pycache__|^third_party/nccl/|(^|/)\.github/|^\.ci/|^\.claude/|^\.spin/' /tmp/sdist-files.txt tar tvzf dist/torch-*.tar.gz | grep -c '^l' ``` - [x] From-sdist build works end to end (CPU-only, linux-x86_64): ``` pip wheel dist/torch-*.tar.gz --no-deps -w /tmp/wheels python -m venv /tmp/venv && /tmp/venv/bin/pip install /tmp/wheels/torch-*.whl numpy /tmp/venv/bin/python -c "import torch; a=torch.randn(64,64); print(([email protected]).shape); print(torch.compile(lambda x: x.sin()+1)(torch.randn(8)).shape)" ``` - [x] Superset of the setuptools sdist's tracked content: compared against a `python setup.py sdist` tarball built from main (7de45b6), zero tracked files are present there but missing here; the ~480 tracked files only present here are ones MANIFEST.in dropped as collateral (submodule .gitignore/.gitmodules via `global-exclude .git*`, flatbuffers test data lost to a setuptools symlink-walk quirk). - [x] include/exclude interaction verified against scikit-build-core 1.0.3's collector with a synthetic tree, including the counterfactual configs (negation-only and exclude-only both leak files; the pairing is required). - [x] No remaining consumers of MANIFEST.in: ``` grep -rln "MANIFEST.in" --exclude-dir=third_party --exclude-dir=.git . ``` Co-Generated with [Claude Code](https://claude.com/claude-code) Pull Request resolved: pytorch#190192 Approved by: https://github.com/albanD, https://github.com/atalman ghstack dependencies: pytorch#180248
Fixes #152532. Since #146073 NCCL is not a submodule but cloned at configure time from a tag in `.ci/docker/ci_commit_pins/nccl*.txt`. Neither release source artifact has ever shipped those files: the plain tarball strips `.ci` (since #63022, no recorded reason) and the PEP 517 sdist excludes it (#190192). A survey of all 16 archives from v2.7.0 to v2.14.0 confirms this; what varies is only whether `third_party/nccl` is present. The 2.14.0 sdist is the first artifact since 2.7.x with neither, because #190192 also stopped shipping the pre-cloned NCCL tree (deliberately: a snapshot freezes the default pin even where the cu126 pin applies). Configure then fails in `cmake/External/nccl.cmake` with ExternalProject's "No download info given for 'nccl_external'", which names neither cause nor remedy. Two commits: 1. The two pin files join the sdist include list, so an sdist build clones NCCL exactly like a git checkout does, with the CUDA-version-specific pin honoured. The pre-build step now warns when neither the NCCL sources nor a pin exist, and `nccl.cmake` fails with a message naming the ways out (provide the sources, `USE_SYSTEM_NCCL=1`, or `USE_NCCL=0`). The fatal check lives in `nccl.cmake` rather than the pre-build step because the latter runs before CUDA is decided; a CPU-only build from a pin-less tree keeps working. 2. The release workflow copies the same two files back into the plain tarball after the `.ci` strip, so both artifacts carry the pins and nothing else from `.ci`. The pre-cloned `third_party/nccl` stays: the tarball exists for offline, complete-source builds. Official wheels use system NCCL, so pip users are unaffected; this is for people building from the source archives. Small enough to cherry-pick into a 2.14 patch release. Offered for this PR if wanted: a check in the pre-build step that compares an existing `third_party/nccl` (its `makefiles/version.mk`) against the selected pin and warns on mismatch. That is what would make a cu126 build from the plain tarball notice it got the default NCCL, and it also catches a developer checkout whose clone predates a pin bump. Left out for now to keep the change minimal. Follow-up, separate PR: move the pins out of `.ci` next to `third_party/eigen_pin.txt`, which makes both include exceptions above unnecessary. It touches `install_nccl.sh` and five Dockerfiles under `.ci/docker`, so it forces a Docker image rebuild and should ride the next planned one. Test plan: see the commit messages. sdist built from this tree contains exactly `nccl.txt` and `nccl-cu126.txt` under `.ci`, byte-identical to the tree, and no `third_party/nccl`; the CMake behaviour was driven through a minimal project in a fake source tree for all five cases; the tarball staging lines were run against a mock tree. Not exercised: the release workflow itself (release tags and nightly only) and an end-to-end CUDA build from the sdist. Pull Request resolved: #197544 Approved by: https://github.com/atalman
Stack from ghstack (oldest at bottom):
scikit-build-core collects sdist contents by walking the tree with
gitignore semantics rather than from git tracking. Several vendored
trees commit files that their own .gitignore matches (XNNPACK's
generated microkernels under gen/, all oneDNN C++ sources via ideep's
"*.cpp" pattern, protobuf's checked-in .pb.cc, clog under qnnpack's
deps/), and PyTorch's top-level .gitignore patterns (bare "gen",
".pb.h") also match tracked third-party files. The walk therefore
silently dropped ~11,500 tracked files, leaving an sdist that cannot
build: XNNPACK, oneDNN, cpuinfo, and NNPACK codegen all lack sources.
The legacy setup.py sdist never hit this because MANIFEST.in grafts
copy from disk regardless of gitignore.
Fix: re-include the affected roots via [tool.scikit-build.sdist]. In
scikit-build-core's collector, include matches take precedence over
every exclude source (user excludes, built-ins, gitignore), so a
separate sdist.exclude list cannot trim a blanket include; entries that
must not ship despite the blanket include are negated inside the
include list and then caught by an exclude source (see the comment in
pyproject.toml for the exact mechanics). The natural alternative --
collecting the file list from git tracking -- does not exist in
scikit-build-core today; worth proposing upstream, at which point this
block can go away.
Deliberately excluded (1323 tracked files, matching the legacy
MANIFEST.in's intent): repo/CI plumbing (.github, .ci, .claude, .spin,
vendored .github dirs) and unneeded vendored language bindings
(flatbuffers java/kotlin, ittapi rust). The latter were pruned by
MANIFEST.in (#157814) to work around invalid symlinks in those trees;
under scikit-build-core the default sdist.resolve-symlinks="all" would
instead silently duplicate the link targets into the sdist. With these
prunes the sdist contains no symlink members at all; the handful of
remaining tracked symlinks (AGENTS.md, docs/requirements.txt, ...)
dereference to a few KB of duplicated content.
MANIFEST.in itself is removed: scikit-build-core's native backend
never reads it, so it has been inert since the backend switch and its
sdist role is fully replaced by the configuration added here.
Test plan
git ls-files --recurse-submodulesexactly, up to (a) the 1323 deliberately excluded files above and
(b) 4 unicode-quoting artifacts of the listing comparison itself,
with zero .git pointers, bytecode, third_party/nccl content, or
symlink members:
against a
python setup.py sdisttarball built from main(7de45b6), zero tracked files are present there but missing here;
the ~480 tracked files only present here are ones MANIFEST.in dropped
as collateral (submodule .gitignore/.gitmodules via
global-exclude .git*, flatbuffers test data lost to a setuptools symlink-walkquirk).
1.0.3's collector with a synthetic tree, including the counterfactual
configs (negation-only and exclude-only both leak files; the pairing
is required).
Co-Generated with Claude Code