pyenv.pyenv/plugins/pyenv-binary
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
..
bin pyenv-binary: add experimental plugin skeleton 2026-06-30 23:05:18 +05:30
libexec pyenv-binary: reject invalid version names and drop readlink -f in save 2026-07-01 10:22:12 +05:30
README.md pyenv-binary: add the save subcommand 2026-06-30 23:05:37 +05:30

pyenv-binary (experimental)

Package an installed Python version into a relocatable archive that can be installed on another machine.

This is experimental and intentionally decoupled: it does not change pyenv install or any other command. You drive it explicitly through pyenv binary. Run pyenv binary <command> --help for details on a command.

Portability

An archive is portable across machines that share its build platform (OS, architecture and a compatible libc) and have the recorded system libraries. It is not portable across, say, glibc and musl, or to an older glibc; the platform and dependency metadata exist to catch that.

Commands

pyenv binary save <version> [<output-dir>]

Packs an installed version into <version>-<platform>.tar.gz (relative paths) and writes <version>-<platform>.meta describing the build platform (OS, arch, distro and libc version) and the system libraries the build links against.

pyenv binary save 3.12.7 ./dist