Commit graph

23 commits

Author SHA1 Message Date
Romwierz b64372d939 make the option linux only 2026-09-09 10:41:50 +02:00
Romwierz 528597d5ff change the flag name 2026-09-09 10:21:48 +02:00
Michał b8c7b387bf
send diagnostics to stderr
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-09-08 12:15:23 +02:00
Romwierz fbd0abd3f7 check if multiple Python versions are selected and use the first one 2026-09-08 12:05:04 +02:00
Michał 2eb849102a
fix lengths of lines
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-09-08 11:12:38 +02:00
Michał 4113b2d9f7
add warning about setting envvars
Co-authored-by: native-api <vano@mail.mipt.ru>
2026-09-08 10:49:16 +02:00
Michał 63548e129f
fix libexec/pyenv-exec
Make sure the $LD_LIBRARY_PATH does not have a trailing colon.

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-09-07 19:25:58 +02:00
Romwierz a4f80ce23f pyenv-exec: add option to modify python runtime for the called executable
The only variables modified are $PYTHONHOME and $LD_LIBRARY_PATH which will allow the executable to use the shared library of the Python version which is selected with pyenv.
2026-09-07 18:26:48 +02:00
rockandska 2c38423a98
pyenv launcher: introduce and export _PYENV_INSTALL_PREFIX (#3334)
provides a reliable way for Pyenv code to locate other parts of Pyenv code that are not under `PYENV_ROOT`

* tests: Work with Git entirely in a test repo

Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2025-12-24 10:00:09 +03:00
Ivan Pozdeev 7418835908
Prevent infinite loop if a shim is linked and called from a nonstandard location with "system" active 2025-12-20 11:05:27 +03:00
native-api dc873cf568
Support missing versions being present and set in a local .python-version (#3134)
Some checks failed
macos_build / macos_build (3.10) (push) Waiting to run
macos_build / macos_build (3.11) (push) Waiting to run
macos_build / macos_build (3.12) (push) Waiting to run
macos_build / macos_build (3.13) (push) Waiting to run
macos_build / macos_build (3.9) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-13) (push) Waiting to run
pyenv_tests / pyenv_tests (macos-14) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-20.04) (push) Waiting to run
pyenv_tests / pyenv_tests (ubuntu-22.04) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.10) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.11) (push) Failing after 0s
ubuntu_build / ubuntu_build (3.12) (push) Failing after 0s
ubuntu_build / ubuntu_build (3.13) (push) Failing after 1s
ubuntu_build / ubuntu_build (3.9) (push) Failing after 1s
Requested in https://github.com/pyenv/pyenv/issues/2680
for deployments with a stock `.pyenv-version` that can use any
of a number of Python versions
and for compatibility with `uv`.

* Support `pyenv local --force`
* Support `pyenv-version-file-write --force`
* Support `pyenv version-name --force`
* Ignore missing versions when searching for executables
* Display "commmand not found" even when there are nonexistent versions

* exec.bats: replace `python` and `rspec` with something that doesn't exist globally, either
in Ubuntu Github CI, `python` exists globally
2024-12-16 02:32:45 +03:00
Oğuzhan Çelikarslan 552d943762
Fix typos in command examples (#2147) 2021-11-09 09:50:29 +03:00
Daniel Hahler ecd67c8223
pyenv-exec: no -a with exec to keep $PATH with system version (#1169)
Using `exec -a` caused Python to use $PATH to look up the full program name (for
`sys.executable`), which 314937d then tried to fix by changing $PATH
also for the system version.
This is not necessary anymore when not using the short name with `exec`.

This was rejected upstream
(https://github.com/rbenv/rbenv/pull/1089#issuecomment-394531896), since
it is not a problem with Ruby apparently.

Uses $PYENV_ROOT to check if system version is used.

Fixes https://github.com/pyenv/pyenv/issues/98.
Fixes https://github.com/pyenv/pyenv/issues/789.
2019-09-29 00:03:44 +02:00
Andrew Rabert 0f596d2504 Revert "Merge pull request #1153 from cmcginty/remove-sbang"
This reverts commit 070e1c859f, reversing
changes made to 3faeda67bb.
2019-04-23 10:23:33 -04:00
Casey McGinty 83e5459cfb Remove shebang lines from scripts for performance
All scripts in libexec/ (excluding pyenv) are called through pyenv,
therefore the shebang lines are not necessary. On some systems this
provides a measurable increase in performance of the shell prompt.

Related to pyenv/pyenv-virtualenv#259
2019-03-07 22:15:14 +01:00
Yamashita, Yuu d01fa09a7d Migrate project URL to https://github.com/pyenv/pyenv 2017-03-06 04:31:48 +00:00
Yamashita Yuu f0e852553a Import rbenv changes at 7e0e85bdda 2014-12-01 00:29:26 +09:00
Yamashita Yuu 314937d599 Set PYENV_BIN_PATH in PATH even if the version is system (fixes #98) 2014-01-15 16:41:06 +09:00
Yamashita Yuu d03f290b5d s/rbenv/pyenv/ 2014-01-02 22:49:23 +09:00
Yamashita Yuu 8ddf8760d5 Import recent changes from rbenv 0.4.0 2014-01-02 22:45:02 +09:00
Yamashita Yuu fca31c4307 import trivial changes from rbenv 0.4.0 2013-01-18 19:10:35 +09:00
Yamashita Yuu da06998457 import rbenv-help from rbenv 0.4.0 2013-01-18 19:09:56 +09:00
Yamashita Yuu 2457419b4a created new project.
modified rbenv source for Python and renamed to pyenv.
2012-08-31 15:30:20 +09:00