Commit graph

4 commits

Author SHA1 Message Date
macayu17 91e46f80de pyenv-binary: test the save subcommand
Cover argument validation, the version-name guard, and packaging an
installed version into an archive with matching metadata.
2026-07-02 15:11:05 +05:30
macayu17 f0ac849b16 pyenv-binary: reject invalid version names and drop readlink -f in save
A version is a single directory name under versions/, so refuse names with a
slash or a dot-dot component before building the prefix path.

Also emit the python paths directly instead of `readlink -f`, which BSD
readlink on macOS does not support; ldd/otool follow the symlinks anyway, so
the resolved paths were never needed.
2026-07-01 10:22:12 +05:30
macayu17 bcd73586b4 pyenv-binary: add the save subcommand
`pyenv binary save <version> [<output-dir>]` packs an installed version into a
relocatable .tar.gz with relative paths and writes a metadata file recording the
build platform, distro, libc version and the external system libraries the
build links against (via `ldd` on Linux, `otool -L` on macOS).
2026-06-30 23:05:37 +05:30
macayu17 54894b6d96 pyenv-binary: add experimental plugin skeleton
Adds a new plugin, decoupled from `pyenv install`, for packaging and installing
relocatable Python binaries. This commit is just the command dispatcher; the
individual subcommands follow.

`pyenv binary <command>` dispatches to the matching script under the plugin's
libexec, so subcommands stay out of the top-level `pyenv commands` list.

Groundwork for the binary distribution support discussed in #2334.
2026-06-30 23:05:18 +05:30