3395 Commits

Author SHA1 Message Date
Christian Fredrik Johnsen
8e5379ebe3 perf: faster execution of build_conda_exclusion_list
1) Got rid of useless call to `cat`, much better to simply use sed with
   file as argument.

2) Got rid of `sort -u`. There is no need to sort the list.
   Additionally, the list `pyenv.d/rehash/conda.d/default.list` only has
   unique entries, and even if you have duplicate entries, the function
   will still work. --> No need for sort nor unique.

3) Further improvement is simple, save a cached
cleaned-list-v1.0 in `conda.d` and simple read from that file instead of
doing `sed`, which must be a more expensive operation than simply
reading from file.
2025-02-13 08:31:48 +03:00
Christian Fredrik Johnsen
ab2a5ad030 style: place greadlink in coreutils section
Applies to the conda blacklist in `pyenv.d/rehash/conda.d/default.list`
No practical difference, but it looks misplaced when it sits at the end
of the file.
2025-02-13 08:31:48 +03:00
Christian Fredrik Johnsen
09fbed1d4f fix: pyenv-rehash | do NOT create conda_exclusion_list if conda is not installed.
I was doing some debugging with PYENV_DEBUG=1 and noticed that a lot of
work was being done in conda.bash, even though I had not installed any
conda versions like `mambaforge`.

The solution is pretty simple, put all the code inside an if-block.
This aligns with what @varikin found in his pull request #3037

Additionally, I have refactored the code slightly for readability
(created function `build_conda_exclusion_list`), and added comments
which should make it easier to understand what's going on.

This commit simplifies debugging and should reduce the execution time of

```bash
eval "$(pyenv init -)"
```

slightly.
2025-02-13 08:31:48 +03:00
Christian Fredrik Johnsen
4c6b0e9c3b
Fix: mistake in configuration hints in pyenv init and manpage. (#3145) 2024-12-23 20:58:54 +03:00
native-api
330e3fc130
CI: use Ubuntu 24.04; use ubuntu-latest for the ubuntu_build check (#3144)
Now that ubuntu-24 is out of beta at Github

Since for ubuntu_build, we only use one OS version
and the changes between versions are not as drastic as with MacOS,
it seems safe to have it upgrade automatically.
2024-12-22 23:38:58 +03:00
Ivan Pozdeev
2aff0df76d 2.5.0 v2.5.0 2024-12-22 23:22:20 +03:00
native-api
2acb2296e5
Exclude broken miniforge3/mambaforge3 22.11.0-0, 22.11.0-1, 22.11.0-2 from generation [no ci] (#3143) 2024-12-22 23:10:42 +03:00
native-api
04b440df0b
Add miniforge3 and mambaforge3 24.1.2-0, 24.3.0-0, 24.5.0-0, 24.7.1-0, 24.7.1-1, 24.7.1-2, 24.9.0-0, 24.9.2-0, 24.11.0-0, 24.11.0-1 (#3142) 2024-12-22 23:06:33 +03:00
native-api
5d80be09cb
CI: only run macos_build_bundled_dependencies and ubuntu_build_tar_gz for CPython (#3141)
Only CPython scripts use bundled dependencies for MacOS and two alternative tarballs
2024-12-22 22:19:24 +03:00
Ivan Pozdeev
e0504fc2f8 add_miniforge.py: Support different Python version lines, improvements
* report more progress
* don't download SHA files for unsupported architectures
2024-12-22 21:31:28 +03:00
native-api
51937ccc19
Add miniconda3-24.3.0-0 (#3139) 2024-12-22 17:04:32 +03:00
Ivan Pozdeev
ac2f882aab Fix scripts not getting a Python version for verify_pyXXX 2024-12-22 16:19:59 +03:00
Ivan Pozdeev
25c966eb4f add_miniconda.py: future-proof, update defaults, change -v
* future-proof PyVersion
* fix handling "-latest"
* Update default versions
* change -v argument to bool
2024-12-22 15:59:52 +03:00
Christian Fredrik Johnsen
c6973391f3
pyenv-init | performance improvements (#3136)
* perf: replace a series of if statements with a case block. Add error
handling for case where unknown option is provided.
Same setup as rbenv-init for reading arguments.

* perf, docs: Recommend users to specify the shell for `pyenv init -`
Speeds up the startup by about 40% (in local testing, from ~50ms to ~30ms).
Reflect this in `pyenv init` hint text.

* style: remove unnecessary `root` variable in pyenv-init
* style: remove unnecessary variable declarations at the top of file in pyenv-init.

* perf: replace `cat <<` calls with `echo`
The builtin `echo` is about 100x faster. In tests, saves about 2-3ms.

* docs: document the `pyenv init - <shell>` performance boost in the Advanced Configuration section.

* style: test_helper.bash: avoid unnecessary ".." in produced PATH

* docs: fix a false statement about completions location in the Advanced Configuration section.
2024-12-22 15:23:51 +03:00
binbjz
38421ba6aa
Add miniconda3-24.11.1-0 (#3138)
Co-authored-by: binbjz <zhaobin@avenir.hk>
2024-12-21 16:48:25 +03:00
Ivan Pozdeev
a1edb81e8e 2.4.23 v2.4.23 2024-12-18 10:13:13 +03:00
Ned Batchelder
5f7892f728
Add CPython 3.14.0a3 (#3135) 2024-12-18 10:11:11 +03:00
Ivan Pozdeev
86be59a6d5 Tolerate nonexistent versions from pyenv-version-name in pyenv-which
Addendum to #3134 as per https://github.com/pyenv/pyenv/pull/3134#issuecomment-2545710044
2024-12-16 21:36:14 +03:00
native-api
dc873cf568
Support missing versions being present and set in a local .python-version (#3134)
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
Ivan Pozdeev
aef6a2a6d0 Remove incorrect statement about resolution behavior
`shell` does not fall through to `local`, and `local to `global`.
2024-12-15 21:20:49 +03:00
native-api
527d8fab3e
Adjust suggested shell startup code to support Pyenv with Pyenv-Win in WSL (#3132)
There's a complaint that this results in duplicate PATH entries in nested shells, will deal with that separately
2024-12-15 17:22:51 +03:00
native-api
fc0e27c24b
Support PACKAGE_CPPFLAGS and PACKAGE_LDFLAGS (#3130)
add test to test all the flag types
2024-12-13 23:06:03 +03:00
Oluf Lorenzen
a2ad48aa40
README: explain using multiple versions (#3126)
Co-authored-by: native-api <vano@mail.mipt.ru>
2024-12-12 06:58:02 +03:00
Ivan Pozdeev
d04a081dcb 2.4.22 v2.4.22 2024-12-07 14:29:09 +03:00
Ivan Pozdeev
cb83169098 fix CL: + test modified scripts with tar.gz source
missed some of the changes
2024-12-07 14:27:29 +03:00
Daniel Lamblin
3bdb9bd1e7
Fix 404 for bundled openssl-3.4.0 release in 3.13.1 (#3122) 2024-12-07 14:20:33 +03:00
native-api
cc40a3f965
CL: + test modified scripts with tar.gz source (#3125) 2024-12-07 14:19:50 +03:00
native-api
25e70b2c80
CI: + build with bundled MacOS dependencies (#3123) 2024-12-07 13:58:35 +03:00
native-api
4c90a3147f
Speed up building bundled OpenSSL (#3124)
* Skip building bundled OpneSSL unnecessary parts
* Remove bundled OpneSSL build hack: no longer needed
2024-12-07 13:54:33 +03:00
Ivan Pozdeev
ee84e89ef1 2.4.21 v2.4.21 2024-12-06 02:57:27 +03:00
native-api
a39449bc50
Prefer tcl-tk@8 from Homebrew due to release of Tcl/Tk 9 with which only 3.12+ are compatible (#3118) 2024-12-06 02:55:53 +03:00
Michael Makukha
3bc0d858cc
Add 3.13.1t (#3120) 2024-12-06 01:53:45 +03:00
Ivan Pozdeev
0f8b2b2b84 2.4.20 v2.4.20 2024-12-04 02:08:51 +03:00
native-api
c424717a39
Merge pull request #3117 from edgarrmondragon/cpython-3.13.1
Add CPython 3.9.21, 3.10.16, 3.11.11, 3.12.8 and 3.13.1
2024-12-04 02:07:07 +03:00
Edgar Ramírez-Mondragón
81632f0ab4
Remove EOL Python 3.8 from CI 2024-12-03 16:25:19 -06:00
Edgar Ramírez-Mondragón
a79440470e
Run ubuntu_build on Python 3.13 2024-12-03 16:17:03 -06:00
Edgar Ramírez-Mondragón
84037dff4e
Run macos_build on Python 3.13 2024-12-03 16:11:00 -06:00
Edgar Ramírez-Mondragón
a7a0354da9
Add CPython 3.9.21, 3.10.16, 3.11.11, 3.12.8 and 3.13.1 2024-12-03 16:09:02 -06:00
Clément Vannicatte
6140619301
README: correct link to shell setup instructions (#3113) 2024-11-27 23:30:12 +03:00
Noelle Leigh
61c0f25ef5
README: Fix Markdown in "Notes about python releases" (#3112)
HTML and Markdown need to be separated by an empty line to co-exist, otherwise the Markdown isn't parsed correctly.
2024-11-23 16:35:06 +03:00
Ivan Pozdeev
1e8e96b8a2 2.4.19 v2.4.19 2024-11-20 22:11:32 +03:00
Madhu Gururajan
707e8d1ef8
Add quick start section and gif demo to accompany it. (#3044)
* Reorganize readme, add gif

1. Details in 'Getting Pyenv' and 'Setup for your shell' are collapsed. User can expand relevant
   sections depending on their platform and shell.

2. 'How It Works' and 'Advanced Configuration' are moved to the bottom of the README.md
   just before 'Contributing' section at the end.

3. Added a GIF in the 'Usage' section to showcase
   - Listing python versions available for install.
   - Installing a specific python version.
   - Listing installed python versions.
   - Switching to another python version for a directory.
   - Testing by moving terminal into the directory and moving back.

* Update GIF to show prefix resolution

* Collapse upgrade notes

* Cross-mention Linux and MacOS instlalation scenarios

---------

Co-authored-by: Ivan Pozdeev <vano@mail.mipt.ru>
2024-11-20 22:08:35 +03:00
Ned Batchelder
04b32e2d46
Add CPython 3.14.0a2 (#3110) 2024-11-20 21:26:18 +03:00
Ivan Pozdeev
6393a4dfce 2.4.18 v2.4.18 2024-11-17 23:49:36 +03:00
Michael Goerz
b0d6a67881
Add miniforge3-24.9.2-0 (#3106) 2024-11-13 23:57:14 +03:00
Ivan Pozdeev
d64d1aa1e0 MAINTENANCE.md: easier way to make a release 2024-10-28 02:53:18 +03:00
Ivan Pozdeev
96b3fb2fc3 2.4.17 v2.4.17 2024-10-28 02:43:30 +03:00
native-api
7f60ef0b54
Merge pull request #3097 from binbjz/anaconda3-2024.10-1
Add Anaconda3-2024.10-1
2024-10-27 10:43:38 +03:00
binbjz
37ad06f7ce
Add miniconda3-24.9.2-0 (#3096)
Co-authored-by: binbjz <zhaobin@avenir.hk>
2024-10-27 10:35:24 +03:00
binbjz
6711e9a21d Add anaconda3-2024.10-1 2024-10-27 15:33:17 +08:00