feat: daedalus publish - guarded PyPI release (v0.12.0)
- new script python/src/publish/publish.py: guards (clean tree, HEAD exactly tagged v<version>, version not yet on PyPI, build+twine present), then the chained python -m build (the sdist must rebuild the wheel, SPEC 9.2.1) and twine check; --upload sends exactly this version's sdist+wheel, credentials stay with twine (~/.pypirc or prompt, __token__) - spec python/src/publish/spec.md (sections 1-7) first, then tests (13) in python/tests/test_publish.py, then code (SPEC 6.12) - fix release-blocking sdist defect (SPEC 9.2.1): empty powershell/ and batch/ folders now carry README placeholders and MANIFEST.in ships them, so an sdist installs again - release tooling in requirements.txt; registry entry, README row + section, CHANGELOG 0.12.0, version pins Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
@@ -21,6 +21,7 @@ daedalus --list # list everything
|
||||
| `hello` | Python | test | Prints a hello line and the daedalus version |
|
||||
| `hello_bash` | Bash | test | Sample bash script through the shared help() interface |
|
||||
| `init` | Python | setup | Enable tab completion for daedalus: register argcomplete in bash (appends the managed hook block to ~/.bashrc), idempotent |
|
||||
| `publish` | Python | release | Release daedalus to PyPI: guarded chained build (clean tree, exact `v<version>` tag, PyPI-free version, tooling), twine check, `--upload` (credentials stay with twine) |
|
||||
|
||||
Run the sample script:
|
||||
|
||||
@@ -205,6 +206,28 @@ daedalus init --bashrc FILE # a different bashrc
|
||||
Exit code: `3` when `register-python-argcomplete` is nowhere to be
|
||||
found (reinstall daedalus — argcomplete is a declared dependency).
|
||||
|
||||
### publish
|
||||
|
||||
`publish` releases the package itself. Guards first — clean working
|
||||
tree, HEAD exactly tagged `v<version>` (the version from
|
||||
`pyproject.toml`), the version not yet on PyPI, and `build` + `twine`
|
||||
available in the running interpreter — then a **chained** build
|
||||
(the sdist must rebuild the wheel, SPEC item 9.2.1) and
|
||||
`twine check`. Without `--upload` it stops there and prints the
|
||||
artifacts; with `--upload` it uploads exactly this version's sdist
|
||||
and wheel. Credentials never touch the script: twine prompts or
|
||||
reads `~/.pypirc` (username `__token__`, your PyPI API token).
|
||||
|
||||
```bash
|
||||
daedalus publish # build + check, print next step
|
||||
daedalus publish --upload # ... and upload to PyPI
|
||||
```
|
||||
|
||||
Exit codes: `2` not run from a checkout, `3` dirty tree, `4` not
|
||||
exactly tagged `v<version>`, `5` build/twine missing, `6` version
|
||||
already on PyPI (or PyPI unreachable), `7` build failed, `8` twine
|
||||
check failed, `9` upload failed.
|
||||
|
||||
## Getting started
|
||||
|
||||
1. Clone or copy this template and name the Git remote for your team.
|
||||
|
||||
Reference in New Issue
Block a user