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

yoda 1.9.8 #317

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
19 changes: 13 additions & 6 deletions Formula/yoda.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ class Yoda < Formula

desc "Yet more Objects for Data Analysis"
homepage "https://yoda.hepforge.org"
url "https://yoda.hepforge.org/downloads/?f=YODA-1.9.7.tar.gz"
sha256 "abff3e56bc360e38b2dd32d49bd962d6e773e97da1d50140ac4703daa1d51c8b"
url "https://yoda.hepforge.org/downloads/?f=YODA-1.9.8.tar.gz"
sha256 "c7d5e8b35027d607ddc2ce132fe5032f764e3e39b81e81a9d79ecdee2278ebe5"
license "GPL-3.0-only"

livecheck do
Expand All @@ -31,18 +31,21 @@ class Yoda < Formula
option "with-test", "Test during installation"

depends_on "[email protected]"
depends_on "numpy" => :optional
depends_on "root" => :optional

if build.with? "test"
depends_on "numpy"
else
depends_on "numpy" => :optional
end

patch :DATA

def python
"python3.10"
end

def install
ENV.prepend_path "PATH", Formula["[email protected]"].opt_libexec/"bin"

args = %W[
--disable-debug
--disable-dependency-tracking
Expand All @@ -54,11 +57,15 @@ def install
ENV.append "PYTHONPATH", Formula["root"].opt_prefix/"lib/root" if build.with? "test"
end

# yoda attempts to install to HOMEBREW_PREFIX/lib/pythonX.Y/site-packages
prefix_site_packages = prefix/Language::Python.site_packages(python)
inreplace "configure", /(?<!#)YODA_PYTHONPATH=.+/, "YODA_PYTHONPATH=#{prefix_site_packages}"

system "autoreconf", "-i" if build.head?
system "./configure", *args
system "make"
system "make", "check" if build.with? "test"
system "make", "install"
system "make", "check" if build.with? "test"

rewrite_shebang detected_python_shebang, *bin.children
end
Expand Down