diff --git a/.github/workflows/sync-python-releases.yml b/.github/workflows/sync-python-releases.yml
index ec015b377f..ad9df0efd7 100644
--- a/.github/workflows/sync-python-releases.yml
+++ b/.github/workflows/sync-python-releases.yml
@@ -30,7 +30,7 @@ jobs:
uses: peter-evans/create-pull-request@v6
with:
commit-message: "Sync latest Python releases"
- add-paths: "rye/src/downloads.inc"
+ add-paths: "rye/src/sources/generated/python_downloads.inc"
branch: "sync-python-releases"
title: "Sync Python Releases"
body: |
diff --git a/.github/workflows/sync-uv-releases.yml b/.github/workflows/sync-uv-releases.yml
new file mode 100644
index 0000000000..3e00e28d66
--- /dev/null
+++ b/.github/workflows/sync-uv-releases.yml
@@ -0,0 +1,39 @@
+# For this action to work you must explicitly allow GitHub Actions to create pull requests.
+# This setting can be found in a repository's settings under Actions > General > Workflow permissions.
+# For repositories belonging to an organization, this setting can be managed by
+# admins in organization settings under Actions > General > Workflow permissions.
+name: Sync UV Releases
+on:
+ workflow_dispatch:
+ schedule:
+ - cron: '0 0 * * *'
+
+permissions:
+ contents: write
+ pull-requests: write
+
+jobs:
+ sync:
+ if: github.repository == 'astral-sh/rye'
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+ - name: Install Rye
+ uses: eifinger/setup-rye@v1
+ with:
+ enable-cache: true
+ - name: Sync UV Releases
+ run: make sync-uv-releases
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ - name: Create PR
+ uses: peter-evans/create-pull-request@v6
+ with:
+ commit-message: "Sync latest Python releases"
+ add-paths: "rye/src/sources/generated/uv_downloads.inc"
+ branch: "sync-uv-releases"
+ title: "Sync UV Releases"
+ body: |
+ - Synced latest UV releases
+
+ Auto-generated by [sync-uv-releases.yml](https://github.com/astral-sh/rye/blob/main/.github/workflows/sync-uv-releases.yml)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 08e96d60b2..6076ddc5bc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,6 +12,12 @@ _Unreleased_
- rye no longer fails if an incorrect `VIRTUAL_ENV` environment
variable is exported. #766
+- Added latest Python builds. #771
+
+- When `uv` is used the prompt is now set to the project name. #773
+
+- Allow `rye fetch --force` to force re-fetch a downloaded toolchain. #778
+
## 0.26.0
diff --git a/Makefile b/Makefile
index 82dfb76f71..32f165990c 100644
--- a/Makefile
+++ b/Makefile
@@ -34,4 +34,7 @@ lint:
.PHONY: sync-python-releases
sync-python-releases: .venv
- @rye run find-downloads > rye/src/downloads.inc
+ @rye run find-downloads > rye/src/sources/generated/python_downloads.inc
+
+sync-uv-releases: .venv
+ @rye run uv-downloads > rye/src/sources/generated/uv_downloads.inc
diff --git a/docs/.includes/quick-install.md b/docs/.includes/quick-install.md
index c4511130db..1ae5b317b0 100644
--- a/docs/.includes/quick-install.md
+++ b/docs/.includes/quick-install.md
@@ -10,8 +10,8 @@
Alternatively if you don't trust this approach, you can download the latest release
binary. On first run it will install itself.
- * [rye-x86_64-linux.gz](https://github.com/mitsuhiko/rye/releases/latest/download/rye-x86_64-linux.gz) for 64bit Intel computers
- * [rye-aarch64-linux.gz](https://github.com/mitsuhiko/rye/releases/latest/download/rye-aarch64-linux.gz) for 64bit ARM computers
+ * [rye-x86_64-linux.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-linux.gz) for 64bit Intel computers
+ * [rye-aarch64-linux.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-aarch64-linux.gz) for 64bit ARM computers
```bash
gunzip rye-x86_64-linux.gz
@@ -31,8 +31,8 @@
Alternatively if you don't trust this approach, you can download the latest release
binary. On first run it will install itself.
- * [rye-aarch64-macos.gz](https://github.com/mitsuhiko/rye/releases/latest/download/rye-aarch64-macos.gz) for M1/M2 Macs
- * [rye-x86_64-macos.gz](https://github.com/mitsuhiko/rye/releases/latest/download/rye-x86_64-macos.gz) for Intel Macs
+ * [rye-aarch64-macos.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-aarch64-macos.gz) for M1/M2 Macs
+ * [rye-x86_64-macos.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-macos.gz) for Intel Macs
```bash
gunzip rye-aarch64-macos.gz
@@ -47,8 +47,8 @@
to have "Developer Mode" activated when using Rye and before starting the
installation. [Learn more](../guide/faq.md).
- * [rye-x86_64-windows.exe](https://github.com/mitsuhiko/rye/releases/latest/download/rye-x86_64-windows.exe) for 64bit Intel Windows
- * [rye-x86-windows.exe](https://github.com/mitsuhiko/rye/releases/latest/download/rye-x86-windows.exe) for 32bit Intel Windows
+ * [rye-x86_64-windows.exe](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe) for 64bit Intel Windows
+ * [rye-x86-windows.exe](https://github.com/astral-sh/rye/releases/latest/download/rye-x86-windows.exe) for 32bit Intel Windows
!!!Note
@@ -58,7 +58,7 @@
Additionally sometimes a Trojan warning about "Bearfoos" is shown. This is a false
positive. For more information see the discussion [Windows Bearfoos
- virus associated with rye](https://github.com/mitsuhiko/rye/issues/468).
+ virus associated with rye](https://github.com/astral-sh/rye/issues/468).
=== "Compile Yourself"
@@ -68,5 +68,5 @@
Afterwards you can install `Rye` via `cargo`:
```bash
- cargo install --git https://github.com/mitsuhiko/rye rye
+ cargo install --git https://github.com/astral-sh/rye rye
```
diff --git a/docs/guide/commands/fetch.md b/docs/guide/commands/fetch.md
index b1d1de9bef..d85be0980d 100644
--- a/docs/guide/commands/fetch.md
+++ b/docs/guide/commands/fetch.md
@@ -11,7 +11,8 @@ Fetch a specific version of Python:
$ rye fetch 3.8.13
Downloading cpython@3.8.13
Checking checksum
-success: Downloaded cpython@3.8.13
+Unpacking
+Downloaded cpython@3.8.13
```
To fetch the pinned version of Python you can leave out the argument:
@@ -20,7 +21,8 @@ To fetch the pinned version of Python you can leave out the argument:
$ rye fetch
Downloading cpython@3.8.17
Checking checksum
-success: Downloaded cpython@3.8.17
+Unpacking
+Downloaded cpython@3.8.17
```
## Arguments
@@ -31,6 +33,8 @@ success: Downloaded cpython@3.8.17
## Options
+* `-f, --force`: Fetch the Python toolchain even if it is already installed.
+
* `-v, --verbose`: Enables verbose diagnostics
* `-q, --quiet`: Turns off all output
diff --git a/docs/guide/faq.md b/docs/guide/faq.md
index 89185ed44f..9e72463b2d 100644
--- a/docs/guide/faq.md
+++ b/docs/guide/faq.md
@@ -108,7 +108,7 @@ extensions. There is no known solution to this problem today other than
This issue is inherited from `python-build-standalone` and more information can
be found in the documentation: [References to Build-Time Paths](https://gregoryszorc.com/docs/python-build-standalone/main/quirks.html#references-to-build-time-paths). There is also an open
-Rye issue for it: [Issue #621](https://github.com/mitsuhiko/rye/issues/621).
+Rye issue for it: [Issue #621](https://github.com/astral-sh/rye/issues/621).
## TKinter Support
@@ -199,4 +199,4 @@ while because the compiler spits out some bytes that have been associated with T
written in Rust.
It can be ignored. For more information see the discussion [Windows Bearfoos
-virus associated with rye](https://github.com/mitsuhiko/rye/issues/468).
+virus associated with rye](https://github.com/astral-sh/rye/issues/468).
diff --git a/docs/guide/installation.md b/docs/guide/installation.md
index 36b4d0b6b6..25b62b8d51 100644
--- a/docs/guide/installation.md
+++ b/docs/guide/installation.md
@@ -14,7 +14,7 @@ a folder in your home directory and manage itself there.
Rye will automatically download suitable Python toolchains as needed. For more
information about this [read about toolchains](toolchains/index.md). To install
a specific version download a binary directly
-[from GitHub](https://github.com/mitsuhiko/rye/releases).
+[from GitHub](https://github.com/astral-sh/rye/releases).
## Customized Installation
@@ -77,14 +77,14 @@ opt-out, or you run a custom shell you will need to do this manually.
Rye ships an `env` file which should be sourced to update `PATH` automatically.
```bash
- echo 'source "$HOME/.rye/env"' >> ~/.profile
+ echo 'source "$HOME/.rye/env"' >> ~/.zprofile
```
- In some setups `.profile` is not sourced, in which case you can add it to your
- `.zprofile`:
+ In some setups `.zprofile` is not sourced, in which case you can add it to your
+ `.zshrc`:
```bash
- echo 'source "$HOME/.rye/env"' >> ~/.zprofile
+ echo 'source "$HOME/.rye/env"' >> ~/.zshrc
```
=== "Fish"
diff --git a/rye/src/bootstrap.rs b/rye/src/bootstrap.rs
index a04bfe1c2b..3a55016cee 100644
--- a/rye/src/bootstrap.rs
+++ b/rye/src/bootstrap.rs
@@ -122,7 +122,7 @@ pub fn ensure_self_venv_with_toolchain(
// initialize the virtualenv
{
- let uv_venv = uv.venv(&venv_dir, &py_bin, &version)?;
+ let uv_venv = uv.venv(&venv_dir, &py_bin, &version, None)?;
// write our marker
uv_venv.write_marker()?;
// update pip and our requirements
@@ -277,7 +277,7 @@ fn ensure_latest_self_toolchain(output: CommandOutput) -> Result Result {
if let Ok(version) = PythonVersion::try_from(version.clone()) {
let py_bin = get_toolchain_python_bin(&version)?;
- if py_bin.is_file() {
+ if !force && py_bin.is_file() {
if output == CommandOutput::Verbose {
echo!("Python version already downloaded. Skipping.");
}
@@ -339,10 +340,17 @@ pub fn fetch(
echo!("target dir: {}", target_dir.display());
}
if target_dir.is_dir() && target_py_bin.is_file() {
- if output == CommandOutput::Verbose {
- echo!("Python version already downloaded. Skipping.");
+ if !force {
+ if output == CommandOutput::Verbose {
+ echo!("Python version already downloaded. Skipping.");
+ }
+ return Ok(version);
+ }
+ if output != CommandOutput::Quiet {
+ echo!("Removing the existing Python version");
}
- return Ok(version);
+ fs::remove_dir_all(&target_dir)
+ .with_context(|| format!("failed to remove target folder {}", target_dir.display()))?;
}
fs::create_dir_all(&target_dir).path_context(&target_dir, "failed to create target folder")?;
diff --git a/rye/src/cli/fetch.rs b/rye/src/cli/fetch.rs
index 71f919d481..376ff774ae 100644
--- a/rye/src/cli/fetch.rs
+++ b/rye/src/cli/fetch.rs
@@ -15,6 +15,9 @@ pub struct Args {
///
/// If no version is provided, the requested version from local project or `.python-version` will be fetched.
version: Option,
+ /// Fetch the Python toolchain even if it is already installed.
+ #[arg(short, long)]
+ force: bool,
/// Enables verbose diagnostics.
#[arg(short, long)]
verbose: bool,
@@ -40,6 +43,6 @@ pub fn execute(cmd: Args) -> Result<(), Error> {
}
};
- fetch(&version, output).context("error while fetching Python installation")?;
+ fetch(&version, output, cmd.force).context("error while fetching Python installation")?;
Ok(())
}
diff --git a/rye/src/installer.rs b/rye/src/installer.rs
index f90cf7f63a..0994d45457 100644
--- a/rye/src/installer.rs
+++ b/rye/src/installer.rs
@@ -131,7 +131,7 @@ pub fn install(
uninstall_helper(&target_venv_path, &shim_dir)?;
// make sure we have a compatible python version
- let py_ver = fetch(py_ver, output)?;
+ let py_ver = fetch(py_ver, output, false)?;
create_virtualenv(
output,
diff --git a/rye/src/sources/generated/python_downloads.inc b/rye/src/sources/generated/python_downloads.inc
index b5d791f3d4..8e339fd86d 100644
--- a/rye/src/sources/generated/python_downloads.inc
+++ b/rye/src/sources/generated/python_downloads.inc
@@ -1,5 +1,5 @@
// Generated by rye-devtools. DO NOT EDIT.
-// To regenerate, run `rye run find-downloads > rye/src/downloads.inc` from the root of the repository.
+// To regenerate, run `rye run find-downloads > rye/src/sources/generated/python_downloads.inc` from the root of the repository.
use std::borrow::Cow;
pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[
(PythonVersion { name: Cow::Borrowed("pypy"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 13, suffix: None }, "https://downloads.python.org/pypy/pypy3.10-v7.3.15-aarch64.tar.bz2", Some("52146fccaf64e87e71d178dda8de63c01577ec3923073dc69e1519622bcacb74")),
@@ -89,6 +89,12 @@ pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[
(PythonVersion { name: Cow::Borrowed("pypy"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("linux"), major: 3, minor: 7, patch: 9, suffix: None }, "https://downloads.python.org/pypy/pypy3.7-v7.3.3-linux32.tar.bz2", Some("7d81b8e9fcd07c067cfe2f519ab770ec62928ee8787f952cadf2d2786246efc8")),
(PythonVersion { name: Cow::Borrowed("pypy"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 7, patch: 9, suffix: None }, "https://downloads.python.org/pypy/pypy3.7-v7.3.3-linux64.tar.bz2", Some("37e2804c4661c86c857d709d28c7de716b000d31e89766599fdf5a98928b7096")),
(PythonVersion { name: Cow::Borrowed("pypy"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 7, patch: 9, suffix: None }, "https://downloads.python.org/pypy/pypy3.7-v7.3.3-osx64.tar.bz2", Some("d72b27d5bb60813273f14f07378a08822186a66e216c5d1a768ad295b582438d")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 12, patch: 2, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("2e87c0215aea1614e52ff8588b0ba41eb5ecf555e500094a179c0bbf1b25cbc7")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 12, patch: 2, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("2afcc8b25c55793f6ceb0bef2e547e101f53c9e25a0fe0332320e5381a1f0fdb")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 12, patch: 2, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("ee985ae6a6a98f4d5bd19fd8c59f45235911d19b64e1dbd026261b8103f15db5")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 12, patch: 2, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("67065f1215e4274edbc44fa368d7d64525a2601636842cff880c2ea538279e0c")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 12, patch: 2, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("b4b4d19c36e86803aa0b4410395f5568bef28d82666efba926e44dbe06345a12")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 12, patch: 2, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.12.2%2B20240224-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("a1daf5e8ceb23d34ea29b16b5123b06694810fe7acc5c8384426435c63bf731e")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 12, patch: 1, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("3621be2cd8b5686e10a022f04869911cad9197a3ef77b30879fe25e792d7c249")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 12, patch: 1, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("61e51e3490537b800fcefad718157cf775de41044e95aa538b63ab599f66f3a9")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 12, patch: 1, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.12.1%2B20240107-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("22866d35fdf58e90e75d6ba9aa78c288b452ea7041fa9bc5549eca9daa431883")),
@@ -101,6 +107,12 @@ pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 12, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("5ce861907a2751a3a7395b1aaada830c2b072acc03f3dd0bcbaaa2b7a9166fc0")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 12, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("3b4781e7fd4efabe574ba0954e54c35c7d5ac4dc5b2990b40796c1c6aec67d79")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 12, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20231002/cpython-3.12.0%2B20231002-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("5bdff7ed56550d96f9b26a27a8c25f0cc58a03bff19e5f52bba84366183cab8b")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 11, patch: 8, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("1d84ed69e5acce555513e9261ce4b78bed19969b06a51a26b2781a375d70083d")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 11, patch: 8, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("c0650884b929253b8688797d1955850f6e339bf0428b3d935f62ab3159f66362")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 11, patch: 8, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("c3e90962996177a027bd73dd9fd8c42a2d6ef832cda26db4ab4efc6105160537")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 11, patch: 8, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("ae1bf11b438304622d9334092491266f908f26d76da03f1125514a192cf093f8")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 11, patch: 8, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("54f8c8ad7313b3505e495bb093825d85eab244306ca4278836a2c7b5b74fb053")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 11, patch: 8, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.11.8%2B20240224-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("6da82390f7ac49f6c4b19a5b8019c4ddc1eef2c5ad6a2f2d32773a27663a4e14")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 11, patch: 7, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("e066d3fb69162e401d2bb1f3c20798fde7c2fffcba0912d792e46d569b591ab3")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 11, patch: 7, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("c1f3dd13825906a5eae23ed8de9b653edb620568b2e0226eef3784eb1cce7eed")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 11, patch: 7, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.11.7%2B20240107-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("6613f1f9238d19969d8a2827deec84611cb772503207056cc9f0deb89bea48cd")),
@@ -141,13 +153,13 @@ pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 11, patch: 1, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("02332441cb610b1e1aa2d2972e261e2910cc6a950b7973cac22c0759a93c5fcd")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 11, patch: 1, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("0eb61be53ee13cf75a30b8a164ef513a2c7995b25b118a3a503245d46231b13a")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 11, patch: 1, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230116/cpython-3.11.1%2B20230116-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("f5c46fffda7d7894b975af728f739b02d1cec50fd4a3ea49f69de9ceaae74b17")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.10.13%2B20240107-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("4e9fcb141a0c9af986f0819ab7a64c62ceb7b68f33df75753e669fc3d23a3412")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.10.13%2B20240107-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("d1a777a0688bafd2a62050c680508769d9b6c14779f64fee591f4e135c11e711")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("7f23a4afa4032a7c5a4e0ec926da37eea242472142613c2baa029ef61c3c493c")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("57b83a4aa32bdbe7611f1290313ef24f2574dff5fa59181c0ccb26c14c688b73")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.10.13%2B20230826-i686-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("cc5625a16fbec682d4ce40c0d185318164bd181efaa7eaf945ca63015db9fea3")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.10.13%2B20240107-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("0e2e96365d06411a78bc1e1b19cc5a148034743fe6ecf5a5c8e890985fcadbb4")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.10.13%2B20240107-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("60e7ca89d37dd8a630a5525bda6143a66a3949c4f03c8319295ddb1d1023b425")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.10.13%2B20240107-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("b61f6f9cf0c35fd6df90b424e757a3bc1b483e8f8d8fadfa6c1ddd1a0c39c003")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.10.13%2B20240107-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("8271db063eea7a32f327121b4d828bd10b9ecd1447d01fcfe8c7518e587ede63")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("c8b99dcf267c574fdfbdf4e9d63ec7a4aa4608565fee3fba0b2f73843b9713b2")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("d42f0dfa0245eb5d7cf26e86ce21ce6a92efb85bb2fb26c79a4657f18bae5fa1")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("a41c1e28e2a646bac69e023873d40a43c5958d251c6adfa83d5811a7cb034c7a")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 10, patch: 13, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.10.13%2B20240224-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("6a2c8f37509556e5d463b1f437cdf7772ebd84cdf183c258d783e64bb3109505")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 12, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("bb5fa1d4ad202afc8ee4330f313c093760c9fb1af5be204dc0c6ba50c7610fea")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 12, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("a7d0cadbe867cc53dd47d7327244154157a7cca02edb88cf3bb760a4f91d4e44")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 12, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.10.12%2B20230726-i686-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("159124ac71c86d8617eae17db6ed9b98f01078cc9bd76073261901826f2d940d")),
@@ -225,13 +237,13 @@ pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 10, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-x86_64-unknown-linux-gnu-pgo%2Blto-20211017T1616.tar.zst", None),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 10, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-x86_64-apple-darwin-pgo%2Blto-20211017T1616.tar.zst", None),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 10, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20211017/cpython-3.10.0-x86_64-pc-windows-msvc-shared-pgo-20211017T1616.tar.zst", None),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.9.18%2B20240107-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("e8938f26837a5654a4ceec1e5385d49f4c56af7fa86255fede416980bd28a34f")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.9.18%2B20240107-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("b7d31a15f7af359c59b01ed9c8accb4b6bdd1237b910699e6b2d14df8e2c1cdc")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("93d7b15bf02a3191cfdee9d9d68bf2da782fc04cb142bcca6a4299fe524d9b37")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("579f9b68bbb3a915cbab9682e4d3c253bc96b0556b8a860982c49c25c61f974a")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.9.18%2B20230826-i686-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("9e40a541b4eb6eb0a5e2f35724a18332aea91c61e18dec77ca40da5cf2496839")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.9.18%2B20240107-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("063c531d3c65f49212c9644ab0f00360a65d7c45bc1e6f78174685e2c165b260")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.9.18%2B20240107-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("2cc59d95934240859e2c67fce02018d00882deb860cabbc3162501f7adfdf16f")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.9.18%2B20240107-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("aa2e549186ab9f831169ccc32965c81ba0fa62e471129f51988f40eaa9552309")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.9.18%2B20240107-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("3b9c7d6ed94260b83ed8f44ee9a7b8fce392259ce6591e538601f7353061a884")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("212d413ab6f854f588cf368fdd2aa140bb7c7ee930e3f7ac1002cba1e50e9685")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("7de4b74bd7f5bbe897339cb692652471de28a97910abe4f8382f744baec551cf")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("146537b9b4a1baa672eed94373e149ca1ee339c4df121e8916d8436265e5245e")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 9, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.9.18%2B20240224-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("924ed4f375ef73c73a725ef18ec6a72726456673d5a116f132f60860a25dd674")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 17, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("de2eab48ca487550258db38b38cb9372143283f757b3cf9ec522eb657e41a035")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 17, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("2902e2a0add6d584999fa27896b721a359f7308404e936e80b01b07aa06e8f5e")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 17, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230726/cpython-3.9.17%2B20230726-i686-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("9984f59284048608f6734b032ff76e6bc3cb208e2235fdb511b0e478158fdb2b")),
@@ -333,12 +345,12 @@ pub const PYTHON_VERSIONS: &[(PythonVersion, &str, Option<&str>)] = &[
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 9, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-x86_64-unknown-linux-gnu-pgo-20201020T0627.tar.zst", None),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 9, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-x86_64-apple-darwin-pgo-20201020T0626.tar.zst", None),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 9, patch: 0, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20201020/cpython-3.9.0-x86_64-pc-windows-msvc-shared-pgo-20201021T0245.tar.zst", None),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.8.18%2B20240107-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("a3d6f2dcaf43b7549e6c0965debdc8ccb958e662b4a3d95b506816dc99624e68")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.8.18%2B20240107-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("f426349265897fb3715f19f474f45e17406d77701eb1b60953f9b32e51c779b9")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.8.18%2B20240107-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("875983fccf91310805164528150adfde1ac63564d0c3967d48086c6fdb9f568b")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.8.18%2B20240107-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("954b52b1d93a1f4f016b5e5f1f9683617f7de112ff0cf53ca3002dcd45eff4ef")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.8.18%2B20240107-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("bfcd4a61998e105a78dbac2b68f1f264cd7bedc5ef11f89ec10911f23b445616")),
- (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240107/cpython-3.8.18%2B20240107-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("0675bf51ad66c149c311e8da4a358b0e0fc28801770163d8053d9aadf6bdb556")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("df66801678a5f4accee67784aff058f283fd52e42898527b7ff0e1cbc3e50e8c")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("c732c068cddcd6a008c1d6d8e35802f5bdc7323bd2eb64e77210d3d5fe4740c2")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("windows"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-i686-pc-windows-msvc-shared-pgo-full.tar.zst", Some("9f94c7b54b97116cd308e73cda0b7a7b7fff4515932c5cbba18eeae9ec798351")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-x86_64-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("7ede28a7119056c24ea51766ac3cd9d3c5d579d3db133e02051b4bcb300507e9")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-x86_64-apple-darwin-pgo%2Blto-full.tar.zst", Some("4d4b65dd821ce13dcf6dfea3ad5c2d4c3d3a8c2b7dd49fc35c1d79f66238e89b")),
+ (PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 3, minor: 8, patch: 18, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20240224/cpython-3.8.18%2B20240224-x86_64-pc-windows-msvc-shared-pgo-full.tar.zst", Some("c63abd9365a13196eb9f65db864f95b85c1f90b770d218c1acd104e6b48a99d3")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 17, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-aarch64-unknown-linux-gnu-lto-full.tar.zst", Some("efdf69695af469da13f86d5be23556fee6c03f417f8810fca55307a63aabf08d")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 3, minor: 8, patch: 17, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-aarch64-apple-darwin-pgo%2Blto-full.tar.zst", Some("d08a542bed35fc74ac6e8f6884c8aa29a77ff2f4ed04a06dcf91578dea622f9a")),
(PythonVersion { name: Cow::Borrowed("cpython"), arch: Cow::Borrowed("x86"), os: Cow::Borrowed("linux"), major: 3, minor: 8, patch: 17, suffix: None }, "https://github.com/indygreg/python-build-standalone/releases/download/20230826/cpython-3.8.17%2B20230826-i686-unknown-linux-gnu-pgo%2Blto-full.tar.zst", Some("aaf4b15bdc35674dbe25d4538c9e75e243796a0cc8841fd31d7bbbee6703342a")),
diff --git a/rye/src/sync.rs b/rye/src/sync.rs
index ec70cfebc9..9846ca4313 100644
--- a/rye/src/sync.rs
+++ b/rye/src/sync.rs
@@ -20,7 +20,7 @@ use crate::platform::get_toolchain_python_bin;
use crate::pyproject::{read_venv_marker, write_venv_marker, ExpandedSources, PyProject};
use crate::sources::py::PythonVersion;
use crate::utils::{
- get_venv_python_bin, mark_path_sync_ignore, set_proxy_variables, symlink_dir, CommandOutput,
+ get_venv_python_bin, set_proxy_variables, symlink_dir, update_venv_sync_marker, CommandOutput,
IoPathContext,
};
use crate::uv::Uv;
@@ -147,7 +147,7 @@ pub fn sync(mut cmd: SyncOptions) -> Result<(), Error> {
// make sure we have a compatible python version
let py_ver =
- fetch(&py_ver.into(), output).context("failed fetching toolchain ahead of sync")?;
+ fetch(&py_ver.into(), output, false).context("failed fetching toolchain ahead of sync")?;
// kill the virtualenv if it's there and we need to get rid of it.
if recreate && venv.is_dir() {
@@ -334,19 +334,14 @@ pub fn create_virtualenv(
) -> Result<(), Error> {
let py_bin = get_toolchain_python_bin(py_ver)?;
- let mut venv_cmd = if Config::current().use_uv() {
+ if Config::current().use_uv() {
// try to kill the empty venv if there is one as uv can't work otherwise.
fs::remove_dir(venv).ok();
- let mut venv_cmd = Uv::ensure_exists(output)?.cmd();
- venv_cmd.arg("venv");
- if output == CommandOutput::Verbose {
- venv_cmd.arg("--verbose");
- } else {
- venv_cmd.arg("-q");
- }
- venv_cmd.arg("-p");
- venv_cmd.arg(&py_bin);
- venv_cmd
+ let uv = Uv::ensure_exists(output.quieter())?
+ .venv(venv, &py_bin, py_ver, Some(prompt))
+ .context("failed to initialize virtualenv")?;
+ uv.write_marker()?;
+ uv.sync_marker();
} else {
// create the venv folder first so we can manipulate some flags on it.
fs::create_dir_all(venv).path_context(venv, "unable to create virtualenv folder")?;
@@ -364,24 +359,16 @@ pub fn create_virtualenv(
venv_cmd.arg("--no-seed");
venv_cmd.arg("--prompt");
venv_cmd.arg(prompt);
- venv_cmd
- };
-
- venv_cmd.arg("--").arg(venv);
-
- let status = venv_cmd
- .status()
- .context("unable to invoke virtualenv command")?;
- if !status.success() {
- bail!("failed to initialize virtualenv");
- }
-
- write_venv_marker(venv, py_ver)?;
+ venv_cmd.arg("--").arg(venv);
+ let status = venv_cmd
+ .status()
+ .context("unable to invoke virtualenv command")?;
+ if !status.success() {
+ bail!("failed to initialize virtualenv");
+ }
- // uv can only do it now
- if Config::current().use_uv() {
- update_venv_sync_marker(output, venv);
- }
+ write_venv_marker(venv, py_ver)?;
+ };
// On UNIX systems Python is unable to find the tcl config that is placed
// outside of the virtualenv. It also sometimes is entirely unable to find
@@ -394,20 +381,6 @@ pub fn create_virtualenv(
Ok(())
}
-/// Update the cloud synchronization marker for the given path
-/// based on the config flag.
-fn update_venv_sync_marker(output: CommandOutput, venv_path: &Path) {
- if let Err(err) = mark_path_sync_ignore(venv_path, Config::current().venv_mark_sync_ignore()) {
- if output != CommandOutput::Quiet && Config::current().venv_mark_sync_ignore() {
- warn!(
- "unable to mark virtualenv {} ignored for cloud sync: {}",
- venv_path.display(),
- err
- );
- }
- }
-}
-
#[cfg(unix)]
fn inject_tcl_config(venv: &Path, py_bin: &Path) -> Result<(), Error> {
let lib_path = match py_bin
diff --git a/rye/src/utils/mod.rs b/rye/src/utils/mod.rs
index 0f0e2a15ee..7a9f7fbe32 100644
--- a/rye/src/utils/mod.rs
+++ b/rye/src/utils/mod.rs
@@ -142,6 +142,14 @@ impl CommandOutput {
CommandOutput::Normal
}
}
+
+ pub fn quieter(self) -> CommandOutput {
+ match self {
+ CommandOutput::Normal => CommandOutput::Quiet,
+ CommandOutput::Verbose => CommandOutput::Normal,
+ CommandOutput::Quiet => CommandOutput::Quiet,
+ }
+ }
}
/// Given a path checks if that path is executable.
@@ -447,6 +455,20 @@ pub struct CopyDirOptions {
pub exclude: Vec,
}
+/// Update the cloud synchronization marker for the given path
+/// based on the config flag.
+pub fn update_venv_sync_marker(output: CommandOutput, venv_path: &Path) {
+ if let Err(err) = mark_path_sync_ignore(venv_path, Config::current().venv_mark_sync_ignore()) {
+ if output != CommandOutput::Quiet && Config::current().venv_mark_sync_ignore() {
+ warn!(
+ "unable to mark virtualenv {} ignored for cloud sync: {}",
+ venv_path.display(),
+ err
+ );
+ }
+ }
+}
+
#[test]
fn test_quiet_exit_display() {
let quiet_exit = QuietExit(0);
diff --git a/rye/src/uv.rs b/rye/src/uv.rs
index 1cccf0e498..d61172ff20 100644
--- a/rye/src/uv.rs
+++ b/rye/src/uv.rs
@@ -4,7 +4,8 @@ use crate::pyproject::write_venv_marker;
use crate::sources::py::PythonVersion;
use crate::sources::uv::{UvDownload, UvRequest};
use crate::utils::{
- check_checksum, set_proxy_variables, unpack_archive, CommandOutput, IoPathContext,
+ check_checksum, set_proxy_variables, unpack_archive, update_venv_sync_marker, CommandOutput,
+ IoPathContext,
};
use anyhow::{anyhow, Context, Error};
use std::fs::{self, remove_dir_all};
@@ -131,22 +132,30 @@ impl Uv {
venv_dir: &Path,
py_bin: &Path,
version: &PythonVersion,
+ prompt: Option<&str>,
) -> Result {
- self.cmd()
- .arg("venv")
- .arg("--python")
- .arg(py_bin)
- .arg(venv_dir)
- .status()
- .with_context(|| {
- format!(
- "unable to create self venv using {}. It might be that \
+ let mut cmd = self.cmd();
+ cmd.arg("venv").arg("--python").arg(py_bin);
+ if let Some(prompt) = prompt {
+ cmd.arg("--prompt").arg(prompt);
+ }
+ cmd.arg(venv_dir);
+ let status = cmd.status().with_context(|| {
+ format!(
+ "unable to create self venv using {}. It might be that \
the used Python build is incompatible with this machine. \
For more information see https://rye-up.com/guide/installation/",
- py_bin.display()
- )
- })?;
+ py_bin.display()
+ )
+ })?;
+ if !status.success() {
+ return Err(anyhow!(
+ "Failed to create self venv using {}. uv exited with status: {}",
+ py_bin.display(),
+ status
+ ));
+ }
Ok(UvWithVenv::new(self.clone(), venv_dir, version))
}
}
@@ -235,4 +244,9 @@ impl UvWithVenv {
.path_context(&tool_version_path, "could not write tool version")?;
Ok(())
}
+
+ /// Update the cloud synchronization marker for the given path
+ pub fn sync_marker(&self) {
+ update_venv_sync_marker(self.uv.output, &self.venv_path)
+ }
}
diff --git a/rye/tests/common/mod.rs b/rye/tests/common/mod.rs
index 11778d2f0a..21ed9807cf 100644
--- a/rye/tests/common/mod.rs
+++ b/rye/tests/common/mod.rs
@@ -50,14 +50,14 @@ fn bootstrap_test_rye() -> PathBuf {
use-uv = true
[default]
-toolchain = "cpython@3.12.1"
+toolchain = "cpython@3.12.2"
"#,
)
.unwrap();
}
// fetch the most important interpreters
- for version in ["cpython@3.8.17", "cpython@3.11.7", "cpython@3.12.1"] {
+ for version in ["cpython@3.8.17", "cpython@3.11.8", "cpython@3.12.2"] {
if home.join("py").join(version).is_dir() {
continue;
}
@@ -192,6 +192,11 @@ impl Space {
&self.project_dir
}
+ #[allow(unused)]
+ pub fn venv_path(&self) -> PathBuf {
+ self.project_dir.join(".venv")
+ }
+
#[allow(unused)]
pub fn lock_rye_home(&self) -> fslock::LockFile {
let mut lock = fslock::LockFile::open(&self.rye_home().join("lock")).unwrap();
diff --git a/rye/tests/test_add.rs b/rye/tests/test_add.rs
index 9e611a87a0..f206091e9e 100644
--- a/rye/tests/test_add.rs
+++ b/rye/tests/test_add.rs
@@ -16,7 +16,7 @@ fn test_add_flask() {
exit_code: 0
----- stdout -----
Initializing new virtualenv in [TEMP_PATH]/project/.venv
- Python version: cpython@3.12.1
+ Python version: cpython@3.12.2
Added colorama>=0.4.6 as regular dependency
Added flask>=3.0.0 as regular dependency
Reusing already existing virtualenv
@@ -65,7 +65,7 @@ fn test_add_from_find_links() {
exit_code: 0
----- stdout -----
Initializing new virtualenv in [TEMP_PATH]/project/.venv
- Python version: cpython@3.12.1
+ Python version: cpython@3.12.2
Added colorama>=0.4.6 as regular dependency
Added tqdm>=4.66.1 as regular dependency
Reusing already existing virtualenv
@@ -101,7 +101,7 @@ fn test_add_flask_wrong_venv_exported() {
exit_code: 0
----- stdout -----
Initializing new virtualenv in [TEMP_PATH]/project/.venv
- Python version: cpython@3.12.1
+ Python version: cpython@3.12.2
Added colorama>=0.4.6 as regular dependency
Added flask>=3.0.0 as regular dependency
Reusing already existing virtualenv
diff --git a/rye/tests/test_init.rs b/rye/tests/test_init.rs
index 8cef398884..b078d0c866 100644
--- a/rye/tests/test_init.rs
+++ b/rye/tests/test_init.rs
@@ -22,7 +22,7 @@ fn test_init_lib() {
exit_code: 0
----- stdout -----
Initializing new virtualenv in [TEMP_PATH]/project/.venv
- Python version: cpython@3.12.1
+ Python version: cpython@3.12.2
Generating production lockfile: [TEMP_PATH]/project/requirements.lock
Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock
Installing dependencies
@@ -74,7 +74,7 @@ fn test_init_default() {
exit_code: 0
----- stdout -----
Initializing new virtualenv in [TEMP_PATH]/project/.venv
- Python version: cpython@3.12.1
+ Python version: cpython@3.12.2
Generating production lockfile: [TEMP_PATH]/project/requirements.lock
Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock
Installing dependencies
@@ -127,7 +127,7 @@ fn test_init_script() {
exit_code: 0
----- stdout -----
Initializing new virtualenv in [TEMP_PATH]/project/.venv
- Python version: cpython@3.12.1
+ Python version: cpython@3.12.2
Generating production lockfile: [TEMP_PATH]/project/requirements.lock
Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock
Installing dependencies
diff --git a/rye/tests/test_sync.rs b/rye/tests/test_sync.rs
index 937b8275d9..0ca5a7f97a 100644
--- a/rye/tests/test_sync.rs
+++ b/rye/tests/test_sync.rs
@@ -1,3 +1,5 @@
+use std::fs;
+
use crate::common::{rye_cmd_snapshot, Space};
mod common;
@@ -11,7 +13,7 @@ fn test_empty_sync() {
exit_code: 0
----- stdout -----
Initializing new virtualenv in [TEMP_PATH]/project/.venv
- Python version: cpython@3.12.1
+ Python version: cpython@3.12.2
Generating production lockfile: [TEMP_PATH]/project/requirements.lock
Generating dev lockfile: [TEMP_PATH]/project/requirements-dev.lock
Installing dependencies
@@ -26,6 +28,20 @@ fn test_empty_sync() {
Installed 1 package in [EXECUTION_TIME]
+ my-project==0.1.0 (from file:[TEMP_PATH]/project)
"###);
+
+ // is the prompt set?
+ #[cfg(unix)]
+ {
+ let script = space.venv_path().join("bin/activate");
+ let contents = fs::read_to_string(script).unwrap();
+ assert!(contents.contains("VIRTUAL_ENV_PROMPT=\"my-project\""));
+ }
+ #[cfg(windows)]
+ {
+ let script = space.venv_path().join("Scripts/activate.bat");
+ let contents = fs::read_to_string(script).unwrap();
+ assert!(contents.contains("@set \"VIRTUAL_ENV_PROMPT=my-project\""));
+ }
}
#[test]
@@ -39,7 +55,7 @@ fn test_add_and_sync_no_auto_sync() {
exit_code: 0
----- stdout -----
Initializing new virtualenv in [TEMP_PATH]/project/.venv
- Python version: cpython@3.12.1
+ Python version: cpython@3.12.2
Added colorama>=0.4.6 as regular dependency
Added flask>=3.0.0 as regular dependency
@@ -86,7 +102,7 @@ fn test_add_autosync() {
exit_code: 0
----- stdout -----
Initializing new virtualenv in [TEMP_PATH]/project/.venv
- Python version: cpython@3.12.1
+ Python version: cpython@3.12.2
Added colorama>=0.4.6 as regular dependency
Added flask>=3.0.0 as regular dependency
Reusing already existing virtualenv
diff --git a/rye/tests/test_toolchain.rs b/rye/tests/test_toolchain.rs
new file mode 100644
index 0000000000..2292426208
--- /dev/null
+++ b/rye/tests/test_toolchain.rs
@@ -0,0 +1,38 @@
+use crate::common::{rye_cmd_snapshot, Space};
+
+mod common;
+
+#[test]
+fn test_fetch() {
+ let space = Space::new();
+ // Use a version not in use by other tests and will be supported for a long time.
+ let version = "cpython@3.12.1";
+
+ // Make sure the version is installed.
+ let status = space.rye_cmd().arg("fetch").arg(version).status().unwrap();
+ assert!(status.success());
+
+ // Fetching the same version again should be a no-op.
+ rye_cmd_snapshot!(space.rye_cmd().arg("fetch").arg(version).arg("--verbose"), @r###"
+ success: true
+ exit_code: 0
+ ----- stdout -----
+ Python version already downloaded. Skipping.
+
+ ----- stderr -----
+ "###);
+
+ // Fetching the same version again with --force should re-download it.
+ rye_cmd_snapshot!(space.rye_cmd().arg("fetch").arg(version).arg("--force"), @r###"
+ success: true
+ exit_code: 0
+ ----- stdout -----
+ Removing the existing Python version
+ Downloading cpython@3.12.1
+ Checking checksum
+ Unpacking
+ Downloaded cpython@3.12.1
+
+ ----- stderr -----
+ "###);
+}
diff --git a/rye/tests/test_tools.rs b/rye/tests/test_tools.rs
index 789a0c06ee..43cee4a9d8 100644
--- a/rye/tests/test_tools.rs
+++ b/rye/tests/test_tools.rs
@@ -61,7 +61,7 @@ fn test_basic_tool_behavior() {
success: true
exit_code: 0
----- stdout -----
- pycowsay 0.0.0.2 (cpython@3.11.7)
+ pycowsay 0.0.0.2 (cpython@3.11.8)
----- stderr -----
"###);
@@ -70,13 +70,13 @@ fn test_basic_tool_behavior() {
space.rye_cmd()
.arg("toolchain")
.arg("remove")
- .arg("cpython@3.11.7"), @r###"
+ .arg("cpython@3.11.8"), @r###"
success: false
exit_code: 1
----- stdout -----
----- stderr -----
- error: toolchain cpython@3.11.7 is still in use by tool pycowsay
+ error: toolchain cpython@3.11.8 is still in use by tool pycowsay
"###);
rye_cmd_snapshot!(