Repository navigation
Conversation
Closes #709, stacked on the #659/#660 bundle work (PR #716). - src/pyscriptc/licenses.py: stage_bundle now writes name/share/licenses/ with three sources: the bundled runtime's own CPython license text copied from the pack (lib/pythonX.Y/LICENSE.txt), the license texts of the third-party components compiled into libpython, the NOTICE rollup, and the licenses/ tree of every *.dist-info the bundle's site-packages carries (#660). - the third-party texts ship as pyscriptc.pbs_licenses package data because the pinned install_only asset carries no licenses/ directory; the texts are vendored from the same PBS release's pgo+lto-full archive (verified identical across the macos-arm64 and linux-x86_64 archives) with their sha256 pinned in packaging/pbs_licenses.toml and refreshed by scripts/sync_pbs_licenses.py (--fetch re-vendors, default mode verifies; drift exit 1). An installed compiler stages from package data, no repo checkout needed; packaging/build.sh includes the directory in the onefile. - scripts/gen_third_party_notices.py now writes NOTICE and the packaged copy together (--check covers both), and the footer describes what an output actually carries. - .github/workflows/embed.yml: the acceptance step asserts OUT-moved/prog/share/licenses/{LICENSE.cpython.txt,LICENSE.expat.txt, NOTICE} again. - docs/reference/runtime-pack.md, docs/getting-started/install.md and .agents/docs/release/embed-runtime.md describe the staged tree, the vendoring and the bump procedure. Verified end to end on this host (macOS arm64, PBS 20261021 pack): env -i relocation of the acceptance bundle prints 11/12 and carries all 21 license files; a wheel install stages the same set from package data.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #709
What changed
A
--embed-python=bundleoutput now carries its license texts inname/share/licenses/, so the redistribution obligation of shipping a compiled CPython is met by the bundle step itself.src/pyscriptc/licenses.py(new):stage_bundlewritesname/share/licenses/withLICENSE.cpython.txt, the bundled runtime's own text, copied from the pack (lib/pythonX.Y/LICENSE.txtof the pinned asset),LICENSE.<component>.txtper third-party component compiled into libpython (expat, libffi, mpdecimal, OpenSSL, SQLite, zlib, zstd, ncurses and the rest of thepackaging/third-party.tomlinventory),NOTICE, the third-party notice rollup for the bundled stdlib and libraries, andlicenses/tree of its*.dist-infometadata (the site-packages the embed: bundle pure-Python dependencies into site-packages, refuse native wheels #660 slice stages).pyscriptc.pbs_licensespackage data, so an installed compiler stages them without a repository checkout. The pinned python-build-standaloneinstall_onlyasset the pack is cut from carries nolicenses/directory, so the texts are vendored from the same release'spgo+lto-fullarchive (the macos-arm64 and linux-x86_64 archives carry byte-identical texts, checked) with their sha256 pinned inpackaging/pbs_licenses.toml.scripts/sync_pbs_licenses.pyrefreshes them (--fetch) and verifies them by default (drift exits 1).packaging/build.shincludes the directory in the onefile binary.scripts/gen_third_party_notices.pywritesNOTICEand the packaged copy together, and--checkcovers both..github/workflows/embed.yml: the acceptance step assertsOUT-moved/prog/share/licenses/LICENSE.cpython.txt,LICENSE.expat.txtandNOTICEagain (the check dropped in feat(embed): the pinned CPython runtime pack and the --embed-python seam (#657, #658) #707 is restored).docs/reference/runtime-pack.md,docs/getting-started/install.md,.agents/docs/release/embed-runtime.md.Tests
End to end on this host (macOS arm64, the pinned PBS 20261021 pack), the acceptance program compiled and relocated:
The 21 files are the 20 component texts plus
NOTICE;LICENSE.cpython.txtis the pack's ownlib/python3.14/LICENSE.txt(13.5 KB).A wheel install was checked separately: the built wheel carries
pyscriptc/pbs_licenses/(21 entries) and a fresh venv with only that wheel stages the same set from package data (staged 20 notice True).scripts/wheel_smoke.shpasses (hello).Not done
licenses/texts of a bundled distribution are staged only when its*.dist-infocarries alicenses/directory. A distribution that ships no license directory contributes nothing, and the wheel's metadata license expression is not turned into a text.fullarchive is not part of the runtime pack; the texts are vendored into the wheel at build time instead. A runtime bump has to refresh the vendored texts, the inventory andNOTICE(documented in.agents/docs/release/embed-runtime.md).