diff options
Diffstat (limited to 'CLAUDE.md')
| -rw-r--r-- | CLAUDE.md | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -25,7 +25,7 @@ Two subcommands; all options are explicit flags, no positionals. ``` mkwheels pypi --name PKG --ver VER [--epoch N] -mkwheels gh --repo OWNER/REPO --ver VER [--name PKG] [--tag TAG] [--epoch N] +mkwheels gh --repo OWNER/REPO --ver VER [--name PKG] [--tag TAG] [--epoch N] [--env K=V]... ``` - `--ver` / `--tag` strip a single leading `v`; the output version is always @@ -35,6 +35,10 @@ mkwheels gh --repo OWNER/REPO --ver VER [--name PKG] [--tag TAG] [--epoch N] - `gh`: the GitHub release `published_at` for the tag. - `gh` defaults: `--name` = repo basename lowercased; `--tag` = normalized `--ver`; the real ref is resolved by trying `<tag>` then `v<tag>`. +- `--env K=V` (gh, repeatable): extra env for the source build. gh mode also + auto-sets `POETRY_DYNAMIC_VERSIONING_BYPASS` and `SETUPTOOLS_SCM_PRETEND_VERSION` + to `--ver` (source tarballs have no `.git`, so dynamic-versioning projects + like NetExec fail VCS detection otherwise); `--env` overrides these. - `OUTPUT` env var — output dir (default: `$PWD`). ## How it works @@ -45,9 +49,10 @@ mkwheels gh --repo OWNER/REPO --ver VER [--name PKG] [--tag TAG] [--epoch N] - `pypi`: epoch from PyPI JSON; `pip download <name>==<ver>` (pre-built wheels, deterministic). - `gh`: resolve release ref + `published_at`; download+unpack the tagged - source; `pip wheel <src_dir>` builds the project **and all deps** (PyPI + - `git+` deps) to wheels. `pip download <dir>` is wrong here — it only - resolves metadata and leaves the local project unmaterialized. + source; `pip wheel <src_dir>` (with the auto-set + `--env` build env) + builds the project **and all deps** (PyPI + `git+` deps) to wheels. + `pip download <dir>` is wrong here — it only resolves metadata and leaves + the local project unmaterialized. 3. Emit pinned + hashed `requirements.txt` (audit record only, not the install input). 4. Pack a byte-reproducible `.tar.gz`: sorted entries, `--mtime=@epoch`, |
