Skip to content

Commit

Permalink
chapel: use altinstall python@3.12
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 21, 2024
1 parent 4653459 commit 1fc1576
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Formula/c/chapel.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
class Chapel < Formula
include Language::Python::Shebang
desc "Programming language for productive parallel computing at scale"
homepage "https://chapel-lang.org/"
url "https://github.com/chapel-lang/chapel/releases/download/2.1.0/chapel-2.1.0.tar.gz"
sha256 "72593c037505dd76e8b5989358b7580a3fdb213051a406adb26a487d26c68c60"
license "Apache-2.0"
revision 2
revision 3
head "https://github.com/chapel-lang/chapel.git", branch: "main"

bottle do
Expand Down Expand Up @@ -44,13 +45,20 @@ def install
# It should be noted that this will expand to: 'for cmd in python3.12 python3 python python2; do'
# in our find-python.sh script.
inreplace "util/config/find-python.sh", /^(for cmd in )(python3 )/, "\\1#{python} \\2"
inreplace "third-party/chpl-venv/Makefile", "python3 -c ", "#{python} -c "

# a lot of scripts have a python3 or python shebang, which does not point to python3.12 anymore
Pathname.glob("**/*.py") do |pyfile|
rewrite_shebang detected_python_shebang, pyfile
end

libexec.install Dir["*"]
# Chapel uses this ENV to work out where to install.
ENV["CHPL_HOME"] = libexec
ENV["CHPL_GMP"] = "system"
# This ENV avoids a problem where cmake cache is invalidated by subsequent make calls
ENV["CHPL_CMAKE_USE_CC_CXX"] = "1"
ENV["CHPL_CMAKE_PYTHON"] = python

# don't try to set CHPL_LLVM_GCC_PREFIX since the llvm
# package should be configured to use a reasonable GCC
Expand Down

0 comments on commit 1fc1576

Please sign in to comment.