@@ -165,6 +165,42 @@ If the package content varies by the target platform, use:
165165 > src/ai/backend/runner:dist
166166 $ ls -l dist/*.whl
167167
168+ Building scie executables
169+ -------------------------
170+
171+ Each component exposes ``…:<name> `` (lazy) and ``…:<name>-fat `` (eager)
172+ ``pex_binary `` targets that PEX bundles into a `scie
173+ <https://github.com/a-scie/jump> `_ self-contained executable. For example:
174+
175+ .. code-block :: console
176+
177+ $ pants package src/ai/backend/client:backendai-client-fat
178+ $ ls -l dist/backendai-client-fat
179+
180+ During the build, PEX delegates to the ``science `` binary, which downloads
181+ ``scie-jump ``, ``ptex ``, and the embedded Python interpreter from GitHub.
182+ Anonymous GitHub requests are rate-limited per IP; when the limit is hit, the
183+ ``science-fat-<platform>.sha256 `` or ``scie-jump-…sha256 `` URL returns an HTML
184+ error page and the build fails with a checksum mismatch where the expected
185+ digest looks like ``<!DOCTYPE… `` instead of a hex string.
186+
187+ To avoid this on local machines, export a GitHub Personal Access Token (a
188+ read-only token works — only public release assets are fetched) and let Pants
189+ forward it to its subprocesses. ``pants.toml `` already declares
190+ ``SCIENCE_AUTH_GITHUB_COM_BEARER `` and ``SCIENCE_AUTH_API_GITHUB_COM_BEARER ``
191+ under ``[subprocess-environment] ``, so all you need is to provide the values.
192+ The easiest place is the (gitignored) ``.pants.env `` file at the repo root:
193+
194+ .. code-block :: bash
195+
196+ # .pants.env
197+ SCIENCE_AUTH_GITHUB_COM_BEARER=ghp_xxx... # for scie-jump / ptex / science downloads
198+ SCIENCE_AUTH_API_GITHUB_COM_BEARER=ghp_xxx... # for python-build-standalone release listing
199+
200+ Alternatively, export the same variables in your shell profile. Either way the
201+ ``science `` subprocess will authenticate to ``github.com `` and
202+ ``api.github.com `` and the digest URLs will return the real ``.sha256 `` body.
203+
168204Using IDEs and editors
169205----------------------
170206
0 commit comments