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: migrate to [email protected] #194274

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
25 changes: 14 additions & 11 deletions Formula/p/pythran.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,18 @@
depends_on "gcc" # for OpenMP
depends_on "numpy"
depends_on "openblas"
depends_on "[email protected]"
depends_on "[email protected]"

fails_with :clang # no OpenMP support

resource "beniget" do
url "https://files.pythonhosted.org/packages/14/e7/50cbac38f77eca8efd39516be6651fdb9f3c4c0fab8cf2cf05f612578737/beniget-0.4.1.tar.gz"
sha256 "75554b3b8ad0553ce2f607627dad3d95c60c441189875b98e097528f8e23ac0c"
url "https://files.pythonhosted.org/packages/2e/27/5bb01af8f2860d431b98d0721b96ff2cea979106cae3f2d093ec74f6400c/beniget-0.4.2.post1.tar.gz"
sha256 "a0258537e65e7e14ec33a86802f865a667f949bb6c73646d55e42f7c45a052ae"
end

resource "gast" do
url "https://files.pythonhosted.org/packages/e4/41/f26f62ebef1a80148e20951a6e9ef4d0ebbe2090124bc143da26e12a934c/gast-0.5.4.tar.gz"
sha256 "9c270fe5f4b130969b54174de7db4e764b09b4f7f67ccfc32480e29f78348d97"
url "https://files.pythonhosted.org/packages/f4/85/d65445079010a6bf35041455b7b97e1bfca49f80b8aed41f89f7831cb02d/gast-0.5.5.tar.gz"
sha256 "5f4ae749ba7199034b6912af98f05b4058d6d48fc2f065037b241be819a22924"
end

resource "ply" do
Expand All @@ -39,8 +41,12 @@
end

resource "setuptools" do
url "https://files.pythonhosted.org/packages/aa/60/5db2249526c9b453c5bb8b9f6965fcab0ddb7f40ad734420b3b421f7da44/setuptools-70.0.0.tar.gz"
sha256 "f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"
url "https://files.pythonhosted.org/packages/27/b8/f21073fde99492b33ca357876430822e4800cdf522011f18041351dfa74b/setuptools-75.1.0.tar.gz"
sha256 "d59a21b17a275fb872a9c3dae73963160ae079f1049ed956880cd7c09b120538"
end

def python3
which("python3.13")
end

def install
Expand All @@ -58,8 +64,7 @@
virtualenv_install_with_resources
end

test do

Check warning on line 67 in Formula/p/pythran.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

`brew test --verbose pythran` failed on macOS Sequoia (15) on Apple Silicon!

/opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/bin/bundle clean ==> Testing pythran ==> /opt/homebrew/opt/pythran/bin/pythran /private/tmp/pythran-test-20241014-13939-n7l0l/dprod.py clang: error: no input files WARNING: Compilation error, trying hard to find its origin... Compilation error, trying hard to find its origin... WARNING: Nope, I'm going to flood you with C++ errors! Nope, I'm going to flood you with C++ errors! CRITICAL: Cover me Jack. Jack? Jaaaaack!!!! E: error: command '/opt/homebrew/bin/g++-14' failed with exit code 1 Cover me Jack. Jack? Jaaaaack!!!! E: error: command '/opt/homebrew/bin/g++-14' failed with exit code 1 ::error::pythran: failed An exception occurred within a child process: BuildError: Failed executing: /opt/homebrew/opt/pythran/bin/pythran /private/tmp/pythran-test-20241014-13939-n7l0l/dprod.py /opt/homebrew/Library/Homebrew/formula.rb:3078:in `block in system' /opt/homebrew/Library/Homebrew/formula.rb:3014:in `open' /opt/homebrew/Library/Homebrew/formula.rb:3014:in `system' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11602/lib/types/private/methods/call_validation.rb:270:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11602/lib/types/private/methods/call_validation.rb:270:in `validate_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11602/lib/types/private/methods/_methods.rb:277:in `block in _on_method_added' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/p/pythran.rb:70:in `block in <class:Pythran>' /opt/homebrew/Library/Homebrew/formula.rb:2813:in `block (3 levels) in run_test' /opt/homebrew/Library/Homebrew/extend/kernel.rb:536:in `with_env' /opt/homebrew/Library/Homebrew/formula.rb:2812:in `block (2 levels) in run_test' /opt/homebrew/Library/Homebrew/formula.rb:1199:in `with_logging' /opt/homebrew/Library/Homebrew/formula.rb:2811:in `block in run_test' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `block in run' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `chdir' /opt/homebrew/Library/Homebrew/mktemp.rb:75:in `run' /opt/homebrew/Library/Homebrew/formula.rb:3129:in `mktemp' /opt/homebrew/Library/Homebrew/formula.rb:2805:in `run_test' /opt/homebrew/Library/Homebrew/test.rb:48:in `block in <main>' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/lib/ruby/3.3.0/timeout.rb:186:in `block in timeout' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/lib/ruby/3.3.0/timeout.rb:41:in `handle_timeout' /opt/homebrew/Library/Homebrew/vendor/portable-ruby/3.3.5/lib/ruby/3.3.0/timeout.rb:195:in `timeout' /opt/homebrew/Library/Homebrew/test.rb:52:in `<main>'
python3 = which("python3.12")
pythran = Formula["pythran"].opt_bin/"pythran"

(testpath/"dprod.py").write <<~EOS
Expand All @@ -84,9 +89,7 @@
return distance_matrix
EOS
# Test with configured gcc to detect breakages from gcc major versions and for OpenMP support
with_env(CC: nil, CXX: nil) do
system pythran, "-DUSE_XSIMD", "-fopenmp", "-march=native", testpath/"arc_distance.py"
end
Comment on lines -87 to -89
Copy link
Member

@carlocab carlocab Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't change this. If the test fails with CC and CXX unset then the formula is broken.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see 👍

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now seeing the same in #196198 maybe something not from pythran?

system pythran, "-DUSE_XSIMD", "-fopenmp", "-march=native", testpath/"arc_distance.py"
rm(testpath/"arc_distance.py")

system python3, "-c", <<~EOS
Expand Down
Loading