* 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.
* 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).
* 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.
* pyenv-binary: test the `save` subcommand
Cover argument validation, the version-name guard, and packaging an
installed version into an archive with matching metadata.
* pyenv-binary: test dependency parsing and tighten the version guard
Add tests that feed realistic ldd and otool listings through save and
check only the libraries resolving outside the prefix end up in the
metadata, since that filtering is the fiddliest part of the command.
Narrow the version guard to reject `.' and `..' rather than any name
containing a dot-dot, now that a slash is already refused, and note why
the find still matches *.so.* even though CPython does not produce them.
* OpenCollectrive API is blocked by a Cloudflare challenge page in some locations so allow to specify the OpenCollective API data manually
---------
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
* Default 30 seems enough for our needs
* comments on critical knowledge
* Cleaner handling of t thunk patches
* Fix an error when adding a release for which there's also a prerelease
* Workaround excepthook not working in Github Actions
* requirements.txt workaround is only needed for old Python
- Prevent OpenSSL from bumping across major versions
- Skip adding versions that already have pending PRs
- Copy/move patches when adding new releases in the same series
* reduce stale lock TTL to 2 min, check for stale lock before acquiring and each time -- to hold up new shell sessions for as little as possible
---------
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
The options is available since 3.10.0+ (https://github.com/python/cpython/pull/24820)
but has no effect until 3.11.0 (cpython b9e9292d75)
and broken in MacOS until 3.12.2 (cpython cc13eabc7c),
we add downstream patches to fix that except for 3.11-dev where we disabled it
fixes stalling for 60s and failing if some past fault
has resulting in a stale lockfile being present
---------
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
GCC 15+ uses C23 by default
(https://www.phoronix.com/news/GCC-15-Default-C23)
fixes "error: static declaration of ‘sinpi’ follows non-static declaration"
fixes "error: cannot use keyword ‘false’ as enumeration constant"
* use OpenSSL 1.0 and 1.1 only from formulae
* Keep bundled OpenSSL 3
There's no support for OpenSSL 4 yet
---------
Co-authored-by: native-api <2670332+native-api@users.noreply.github.com>
Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
* CI: add_version: correctly handle exceptions
exit code 1 is used as a signal that no new version is found -- so have to use a different exit code for unhandled exceptions
* CI: add_version: support prereleases for non-initial releases
They unexpectedly made a prerelease 3.14.5rc1
* clarify confusing error message