Skip to content

Commit

Permalink
Merge branch 'astral-sh:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nazq authored Jul 14, 2024
2 parents a1e6d56 + 93e4cb8 commit 1b040bb
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ The installation takes just a minute:

* **Windows:**

Download and run the installer ([64bit Intel](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe) or [32bit Intel](https://github.com/astral-sh/rye/releases/latest/download/rye-x86-windows.exe)).
Download and run the installer ([64-bit (x86-64)](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe) or [32-bit (x86)](https://github.com/astral-sh/rye/releases/latest/download/rye-x86-windows.exe)).

For more details and other options, refer to the [installation instructions](https://rye.astral.sh/guide/installation/).

Expand Down
12 changes: 6 additions & 6 deletions docs/.includes/quick-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/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
* [rye-x86_64-linux.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-linux.gz) Intel/AMD (x86-64).
* [rye-aarch64-linux.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-aarch64-linux.gz) for ARM64.

```bash
gunzip rye-x86_64-linux.gz
Expand All @@ -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/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
* [rye-aarch64-macos.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-aarch64-macos.gz) for Apple Silicon (M1/M2/M3) (ARM64).
* [rye-x86_64-macos.gz](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-macos.gz) for Intel processors (x86-64).

```bash
gunzip rye-aarch64-macos.gz
Expand All @@ -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/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
* [rye-x86_64-windows.exe](https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe) for 64-bit (x86-64).
* [rye-x86-windows.exe](https://github.com/astral-sh/rye/releases/latest/download/rye-x86-windows.exe) for 32-bit (x86).

!!!Note

Expand Down
6 changes: 5 additions & 1 deletion rye/src/cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ pub fn execute(cmd: Args) -> Result<(), Error> {
let use_uv = Config::current().use_uv();
let projects = locate_projects(project, cmd.all, &cmd.package[..])?;

let all_virtual = projects.iter().all(|p| p.is_virtual());
if all_virtual {
warn!("skipping build, all projects are virtual");
return Ok(());
}
for project in projects {
// skip over virtual packages on build
if project.is_virtual() {
Expand Down Expand Up @@ -121,6 +126,5 @@ pub fn execute(cmd: Args) -> Result<(), Error> {
bail!("failed to build dist");
}
}

Ok(())
}
1 change: 1 addition & 0 deletions rye/src/pyproject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ impl SourceRef {
.ok_or_else(|| anyhow!("expected source.url"))?;
let verify_ssl = source
.get("verify_ssl")
.or_else(|| source.get("verify-ssl"))
.and_then(|x| x.as_bool())
.unwrap_or(true);
let username = source
Expand Down
14 changes: 7 additions & 7 deletions rye/src/sources/generated/uv_downloads.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
// To regenerate, run `rye run uv-downloads > rye/src/sources/generated/uv_downloads.inc` from the root of the repository.
use std::borrow::Cow;
pub const UV_DOWNLOADS: &[UvDownload] = &[
UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-aarch64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("ed44fcb929f8cef958ed9e6de350d542f7392a43331d3605c4fcbf418e204c5c") },
UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-aarch64-unknown-linux-musl.tar.gz"), sha256: Cow::Borrowed("1855c439577523fd2a3e1afb19712fd80eb59d63c92fa29d24afb7f68c8ba88c") },
UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-i686-pc-windows-msvc.zip"), sha256: Cow::Borrowed("aa5b36bdc88a16c92d5ca93c4a9325bb82eb875507d363ec28cb6e5ee694e8ed") },
UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-i686-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("00002ada635ce3f17a97a4eca7361eb6ac065db342540dc31e743920a723b92f") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-x86_64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("cb03b461250b688e39b19feaa0853d842e5d4193e262c9d4db2d15faafc54dcc") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-x86_64-pc-windows-msvc.zip"), sha256: Cow::Borrowed("6ab3ed27e38e3a2c4a3a4880b87b8d607fa14589860aebbb1a34064d792d54ad") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 22, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.22/uv-x86_64-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("65cd2e2c3660779f8a1fb02eac488b540d1ae30f3a80a381f8a7859d0b76bf06") },
UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 24, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.24/uv-aarch64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("49d55dd8a8f2adfb83d1feaee5bf40c20169b411e3809e3455ff0d96bae4f388") },
UvDownload {arch: Cow::Borrowed("aarch64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 24, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.24/uv-aarch64-unknown-linux-musl.tar.gz"), sha256: Cow::Borrowed("56bd0db80905d0f5eeba51aa33872727aa40e3dda65c86a584c095ac05609509") },
UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 24, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.24/uv-i686-pc-windows-msvc.zip"), sha256: Cow::Borrowed("3995fbf5a09bcdfc54824ccd0969a975844d586a5fe5dc689f0b8d36eec6e5e6") },
UvDownload {arch: Cow::Borrowed("i686"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 24, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.24/uv-i686-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("dfb662a3dbb7bd1d5da4dbb20805484d8ba7e9d8cc1f6884e737ffdb3106cba2") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("macos"), major: 0, minor: 2, patch: 24, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.24/uv-x86_64-apple-darwin.tar.gz"), sha256: Cow::Borrowed("dbb918c9d55b99cfe1c995cc330b6b1dac29379e320c35a84e7bc6bc0e0a55f4") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("windows"), major: 0, minor: 2, patch: 24, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.24/uv-x86_64-pc-windows-msvc.zip"), sha256: Cow::Borrowed("a044e2cbdfaaea36d15a7c8091d12e2ae81784329116fdf967a573b792fc1fd5") },
UvDownload {arch: Cow::Borrowed("x86_64"), os: Cow::Borrowed("linux"), major: 0, minor: 2, patch: 24, suffix: None, url: Cow::Borrowed("https://github.com/astral-sh/uv/releases/download/0.2.24/uv-x86_64-unknown-linux-gnu.tar.gz"), sha256: Cow::Borrowed("24a0c6758a4f533c37193592fd0a9a37a61fb583a4b6abd0bb81b83127d86336") },
];
9 changes: 9 additions & 0 deletions rye/tests/test_tools.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::env::consts::EXE_EXTENSION;
use std::fs;
use tempfile::TempDir;

use crate::common::{rye_cmd_snapshot, Space};

Expand All @@ -9,6 +10,9 @@ mod common;
fn test_basic_tool_behavior() {
let space = Space::new();

// Cache alongside the home directory, so that the cache lives alongside the tools directory.
let cache_dir = TempDir::new_in(space.rye_home()).unwrap();

// in case we left things behind from last run.
fs::remove_dir_all(space.rye_home().join("tools")).ok();
fs::remove_file(
Expand All @@ -22,6 +26,7 @@ fn test_basic_tool_behavior() {

rye_cmd_snapshot!(
space.rye_cmd()
.env("UV_CACHE_DIR", cache_dir.path())
.arg("tools")
.arg("install")
.arg("pycowsay")
Expand All @@ -43,6 +48,7 @@ fn test_basic_tool_behavior() {

rye_cmd_snapshot!(
space.rye_cmd()
.env("UV_CACHE_DIR", cache_dir.path())
.arg("tools")
.arg("list"), @r###"
success: true
Expand All @@ -55,6 +61,7 @@ fn test_basic_tool_behavior() {

rye_cmd_snapshot!(
space.rye_cmd()
.env("UV_CACHE_DIR", cache_dir.path())
.arg("tools")
.arg("list")
.arg("--include-version"), @r###"
Expand All @@ -68,6 +75,7 @@ fn test_basic_tool_behavior() {

rye_cmd_snapshot!(
space.rye_cmd()
.env("UV_CACHE_DIR", cache_dir.path())
.arg("toolchain")
.arg("remove")
.arg("[email protected]"), @r###"
Expand All @@ -81,6 +89,7 @@ fn test_basic_tool_behavior() {

rye_cmd_snapshot!(
space.rye_cmd()
.env("UV_CACHE_DIR", cache_dir.path())
.arg("tools")
.arg("uninstall")
.arg("pycowsay"), @r###"
Expand Down

0 comments on commit 1b040bb

Please sign in to comment.