Skip to content

Commit

Permalink
pythran: migrate to [email protected]
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
chenrui333 committed Oct 13, 2024
1 parent c0887cd commit d9e9cbe
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions Formula/p/pythran.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@ class Pythran < Formula
depends_on "gcc" # for OpenMP
depends_on "numpy"
depends_on "openblas"
depends_on "python@3.12"
depends_on "python@3.13"

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 +39,12 @@ class Pythran < Formula
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 @@ -59,7 +63,6 @@ def install
end

test do

Check warning on line 65 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-20241013-14149-98rjrc/dprod.py ==> /opt/homebrew/bin/python3.13 -c 'import dprod; print(dprod.dprod([1,2], [3,4]))' ==> /opt/homebrew/opt/pythran/bin/pythran -DUSE_XSIMD -fopenmp -march=native /private/tmp/pythran-test-20241013-14149-98rjrc/arc_distance.py clang++: error: unsupported option '-fopenmp' 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 '/usr/bin/clang++' failed with exit code 1 Cover me Jack. Jack? Jaaaaack!!!! E: error: command '/usr/bin/clang++' failed with exit code 1 Error: pythran: failed ::error::pythran: failed An exception occurred within a child process: BuildError: Failed executing: /opt/homebrew/opt/pythran/bin/pythran -DUSE_XSIMD -fopenmp -march=native /private/tmp/pythran-test-20241013-14149-98rjrc/arc_distance.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.11600/lib/types/private/methods/call_validation.rb:167:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11600/lib/types/private/methods/call_validation.rb:167:in `validate_call_skip_block_type' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11600/lib/types/private/methods/call_validation.rb:109:in `block in create_validator_slow_skip_block_type' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/p/pythran.rb:86:in `block (2 levels) in <class:Pythran>' /opt/homebrew/Library/Homebrew/extend/kernel.rb:536:in `with_env' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/p/pythran.rb:85: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>'

Check failure on line 65 in Formula/p/pythran.rb

View workflow job for this annotation

GitHub Actions / macOS 14-arm64

`brew test --verbose pythran` failed on macOS Sonoma (14) 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-20241013-14245-1xd3lk/dprod.py ==> /opt/homebrew/bin/python3.13 -c 'import dprod; print(dprod.dprod([1,2], [3,4]))' ==> /opt/homebrew/opt/pythran/bin/pythran -DUSE_XSIMD -fopenmp -march=native /private/tmp/pythran-test-20241013-14245-1xd3lk/arc_distance.py clang: error: unsupported option '-fopenmp' 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 '/usr/bin/clang++' failed with exit code 1 Cover me Jack. Jack? Jaaaaack!!!! E: error: command '/usr/bin/clang++' failed with exit code 1 Error: pythran: failed ::error::pythran: failed An exception occurred within a child process: BuildError: Failed executing: /opt/homebrew/opt/pythran/bin/pythran -DUSE_XSIMD -fopenmp -march=native /private/tmp/pythran-test-20241013-14245-1xd3lk/arc_distance.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.11600/lib/types/private/methods/call_validation.rb:167:in `bind_call' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11600/lib/types/private/methods/call_validation.rb:167:in `validate_call_skip_block_type' /opt/homebrew/Library/Homebrew/vendor/bundle/ruby/3.3.0/gems/sorbet-runtime-0.5.11600/lib/types/private/methods/call_validation.rb:109:in `block in create_validator_slow_skip_block_type' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/p/pythran.rb:86:in `block (2 levels) in <class:Pythran>' /opt/homebrew/Library/Homebrew/extend/kernel.rb:536:in `with_env' /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/p/pythran.rb:85: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 Down

0 comments on commit d9e9cbe

Please sign in to comment.