Skip to content

#201 Adopt the shared co-pypi wrapper; fetch wheels with their own script - #205

Merged
gregoryfoster merged 10 commits into
mainfrom
201-shared-co-pypi
Nov 15, 2026
Merged

gregoryfoster merged 10 commits into
mainfrom
201-shared-co-pypi

Conversation

@gregoryfoster

@gregoryfoster gregoryfoster commented Nov 15, 2026 •

Copy link
Copy Markdown
Member

Refs #201: closed by hand once the deploy proves the new wrapper.

Shared wrapper. install.sh --co-pypi --replace (skills 8f2dbfae) installs scripts/co-pypi.sh and scripts/co_pypi_token.py as marked copies, plus tests/test_co_pypi.py. install.sh --check is clean.

  • pyproject gains the minter's co-pypi dependency group and a ruff exclude for the minter. The lock diff is that group alone.
  • The key is CO_PYPI_KEY, else /etc/replicator/co-pypi-reader.json, so the deploy hooks export nothing.

Wheel fetcher. scripts/co_pypi_wheels.py replaces the old wheels verb. It runs under the wrapper and reads the pair the wrapper hands uv:

bash scripts/co-pypi.sh uv run --no-project python scripts/co_pypi_wheels.py --dest DIR --version V… PACKAGE…
  • It uses the standard library only and names no repo.
  • Its test loads it by path and needs nothing from Replicator.
  • Its 12 real wheels (0.36.0, 0.37.0, 0.45.0, 0.46.1 ×3) are byte-identical to the old verb's.

Closure diff. Only its fetch-naming strings change. The dry pin move reproduces #199's 0.45.0 → 0.46.1 report byte for byte.

Gates and the brief review are on the issue.

🤖 Generated with Claude Code

gregoryfoster and others added 6 commits November 15, 2026 01:25
install.sh --co-pypi --replace from deploying-releases at skills 8f2dbfae:
scripts/co-pypi.sh and scripts/co_pypi_token.py are its marked copies, and
tests/test_co_pypi.py its consumer test. The key is CO_PYPI_KEY, else
/etc/replicator/co-pypi-reader.json. pyproject gains the co-pypi group the
minter runs from (google-auth[requests], already locked) and excludes the
minter from ruff. tests/test_co_pypi_token.py goes: the skill's structural
suite covers the pair, and its wheels cases move to the fetcher's test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed wrapper

scripts/co_pypi_wheels.py replaces the old wrapper's wheels verb. It runs as
bash scripts/co-pypi.sh uv run --no-project python scripts/co_pypi_wheels.py
--dest DIR --version V... PACKAGE..., reading the credential pair the wrapper
hands uv, so it holds no key, no google-auth and no allowlist of its own. uv
cannot do it alone: it has no download command and leaves no .whl behind.

Packages come from arguments, the index from pyproject's co-pypi
[[tool.uv.index]]; names normalize by PEP 503 and the wheel spec. Each file is
sha256-checked against the index, renamed into place, and the token goes to
the index host alone. Standard library only; the test loads the script by path
and needs nothing from this repo, so the pair can drop into the skill's
assets/co-pypi/ unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its missing- and corrupt-wheel errors, the docstring's example and --wheels'
help named co-pypi.sh's retired wheels verb; each now names
scripts/co_pypi_wheels.py under the wrapper, with the directory, version and
packages filled in. Nothing else in it changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The shared wrapper defaults its key to /etc/<[project].name>/co-pypi-reader.json,
this host's /etc/replicator/co-pypi-reader.json, so the hooks' export of
REPLICATOR_CO_PYPI_CREDENTIALS goes. The test now proves the hooks export no
key variable (from an empty environment) and that the installed minter's
default names the host's key.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tcher

README, COMMANDS, DEPENDENCIES, ENVIRONMENT, TESTING, ARCHITECTURE and the
three manifest entries: the wrapper is deploying-releases' copy, its key
defaults to /etc/replicator/co-pypi-reader.json so nothing sets CO_PYPI_KEY,
and a pin move fetches its wheels with scripts/co_pypi_wheels.py under it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wheels verb

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
gregoryfoster and others added 4 commits November 15, 2026 03:36
… as the service's

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…_KEY row

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…wrapped

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ge into a named error

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gregoryfoster
gregoryfoster merged commit a8900f5 into main Nov 15, 2026
4 checks passed
@gregoryfoster
gregoryfoster deleted the 201-shared-co-pypi branch November 15, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant