Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pythran 0.12.0 #111909

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Formula/pythran.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -56,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)
Expand All @@ -67,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
Expand All @@ -83,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
Expand Down