From 0f9718bee93e00026aa528039fede5b37cb034a9 Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Fri, 5 Nov 2021 15:55:23 -0400 Subject: [PATCH 1/2] maturin: migrate to python@3.10 --- Formula/maturin.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Formula/maturin.rb b/Formula/maturin.rb index 548b74d02e3c4..9bda7b575caef 100644 --- a/Formula/maturin.rb +++ b/Formula/maturin.rb @@ -15,7 +15,7 @@ class Maturin < Formula sha256 cellar: :any_skip_relocation, x86_64_linux: "454f41ec800dcc2cbb8abb6db958e3e18e336b2731947979201d3937a3254a2e" end - depends_on "python@3.9" => :test + depends_on "python@3.10" => :test depends_on "rust" def install @@ -32,7 +32,8 @@ def install test do system "cargo", "new", "hello_world", "--bin" system bin/"maturin", "build", "-m", "hello_world/Cargo.toml", "-b", "bin", "-o", "dist", "--compatibility", "off" - system "python3", "-m", "pip", "install", "hello_world", "--no-index", "--find-links", testpath/"dist" - system "python3", "-m", "pip", "uninstall", "-y", "hello_world" + system Formula["python@3.10"].opt_bin/"python3", "-m", "pip", "install", "hello_world", "--no-index", + "--find-links", testpath/"dist" + system Formula["python@3.10"].opt_bin/"python3", "-m", "pip", "uninstall", "-y", "hello_world" end end From 9c9005ee7e6bb3f899ac55716d44ddac982fb444 Mon Sep 17 00:00:00 2001 From: Thierry Moisan Date: Tue, 23 Nov 2021 19:25:57 -0500 Subject: [PATCH 2/2] update maturin.rb Co-authored-by: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> --- Formula/maturin.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Formula/maturin.rb b/Formula/maturin.rb index 9bda7b575caef..2fcf34f1a1539 100644 --- a/Formula/maturin.rb +++ b/Formula/maturin.rb @@ -30,10 +30,10 @@ def install end test do + ENV.prepend_path "PATH", Formula["python@3.10"].opt_bin system "cargo", "new", "hello_world", "--bin" system bin/"maturin", "build", "-m", "hello_world/Cargo.toml", "-b", "bin", "-o", "dist", "--compatibility", "off" - system Formula["python@3.10"].opt_bin/"python3", "-m", "pip", "install", "hello_world", "--no-index", - "--find-links", testpath/"dist" - system Formula["python@3.10"].opt_bin/"python3", "-m", "pip", "uninstall", "-y", "hello_world" + system "python3", "-m", "pip", "install", "hello_world", "--no-index", "--find-links", testpath/"dist" + system "python3", "-m", "pip", "uninstall", "-y", "hello_world" end end