From da96507ad96efbef78ee4d0fcad48fdac973cee1 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Wed, 28 Sep 2022 09:21:11 -0400 Subject: [PATCH 1/2] pythran 0.12.0 --- Formula/pythran.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Formula/pythran.rb b/Formula/pythran.rb index e23f6c5de6b5..a2c3f46e1b47 100644 --- a/Formula/pythran.rb +++ b/Formula/pythran.rb @@ -3,10 +3,9 @@ class Pythran < Formula desc "Ahead of Time compiler for numeric kernels" homepage "https://pythran.readthedocs.io/" - url "https://files.pythonhosted.org/packages/88/9f/161f08131abf7f23920cee29b691de27f10fd97ac09fb2f3532b3a7f9b96/pythran-0.11.0.tar.gz" - sha256 "0b2cba712e09f7630879dff69f268460bfe34a6d6000451b47d598558a92a875" + url "https://files.pythonhosted.org/packages/99/e0/ed0e81de05cfa4ecbcbceec6603d175387d8bc7a6332cbfd155d09958ccf/pythran-0.12.0.tar.gz" + sha256 "eff3dd0d3eebe57372f0d14f82985525e9bcdfb5b1d1010e1932cf9207060f9f" license "BSD-3-Clause" - revision 2 head "https://github.com/serge-sans-paille/pythran.git", branch: "master" bottle do From e2900fe70a686aff6ca2badee42c75dfc561e071 Mon Sep 17 00:00:00 2001 From: Carlo Cabrera <30379873+carlocab@users.noreply.github.com> Date: Thu, 29 Sep 2022 01:52:11 +0800 Subject: [PATCH 2/2] pythran: skip failing test case on Linux --- Formula/pythran.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Formula/pythran.rb b/Formula/pythran.rb index a2c3f46e1b47..f0cf191264b4 100644 --- a/Formula/pythran.rb +++ b/Formula/pythran.rb @@ -55,7 +55,7 @@ def install test do pythran = Formula["pythran"].opt_bin/"pythran" - python = Formula["python@3.10"].opt_bin/"python3" + python = Formula["python@3.10"].opt_libexec/"bin/python" (testpath/"dprod.py").write <<~EOS #pythran export dprod(int list, int list) @@ -66,6 +66,8 @@ def dprod(arr0, arr1): rm_f testpath/"dprod.py" assert_equal "11", shell_output("#{python} -c 'import dprod; print(dprod.dprod([1,2], [3,4]))'").chomp + return if OS.linux? # FIXME: This test case fails with Linux trying to execute `gcc-5`, which does not exist. + (testpath/"arc_distance.py").write <<~EOS #pythran export arc_distance(float[], float[], float[], float[]) import numpy as np @@ -82,6 +84,7 @@ def arc_distance(theta_1, phi_1, theta_2, phi_2): system pythran, "-DUSE_XSIMD", "-fopenmp", "-march=native", testpath/"arc_distance.py" end rm_f testpath/"arc_distance.py" + system python, "-c", <<~EOS import numpy as np import arc_distance