You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Build wheels from the generated downstream sdist #1311
Fromager currently creates the downstream sdist and then builds the wheel from the original mutable source tree. Sdist creation may modify that tree, for example by generating PKG-INFO, so the wheel is not actually built from the downstream sdist that is recorded or published.
Proposed change
Use the downstream sdist as the canonical input for the wheel build:
The wheel build should consume the verified downstream sdist. Add tests confirming that generated files and sdist file selection are preserved during the wheel build.
This happens on every build — the issue is architectural.
The wheel is always built from the original mutable source tree, never from the downstream sdist. In _build.py, _build_wheel() calls _build_sdist() first, then passes the same wi.sdist_root_dir to wheels.build_wheel(). The sdist artifact is never unpacked and fed into the wheel build.
The source tree is also always modified during sdist creation — ensure_pkg_info() writes a stub PKG-INFO if one doesn't exist, and pep517_build_sdist() can trigger additional backend-specific changes (e.g., *.egg-info). So the divergence between the published sdist and the wheel's actual input is guaranteed on every build, though the severity varies by package and build backend.
Activity
LalatenduMohanty commentedon Sep 1, 2026
This happens on every build — the issue is architectural.
The wheel is always built from the original mutable source tree, never from the downstream sdist. In
_build.py,_build_wheel()calls_build_sdist()first, then passes the samewi.sdist_root_dirtowheels.build_wheel(). The sdist artifact is never unpacked and fed into the wheel build.The source tree is also always modified during sdist creation —
ensure_pkg_info()writes a stubPKG-INFOif one doesn't exist, andpep517_build_sdist()can trigger additional backend-specific changes (e.g.,*.egg-info). So the divergence between the published sdist and the wheel's actual input is guaranteed on every build, though the severity varies by package and build backend.