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

biogeme: deprecate as of oct 2018 #54717

Closed
wants to merge 4 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
52 changes: 45 additions & 7 deletions Formula/biogeme.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
class Biogeme < Formula
desc "Maximum likelihood estimation of choice models"
homepage "https://biogeme.epfl.ch/"
url "https://biogeme.epfl.ch/distrib/biogeme-2.6a.tar.gz"
sha256 "f6de0ea12f83ed183f31a41b9a56d1ec7226d2305549fb89ea7b1de8273ede49"
revision 5
url "https://files.pythonhosted.org/packages/0a/8b/1228805ea0ad03dbfac3c15e22be6451b09a40438524cf2bff2aeeb4075d/biogeme-3.2.5.tar.gz"
sha256 "cbee2d318dddb6cf4bd6714961435aae201440b78185f2bc3eeab16cf28a98d6"
revision 6

bottle do
cellar :any
Expand All @@ -13,12 +13,50 @@ class Biogeme < Formula
sha256 "cad38740685b800f07bece9dd13238b900427155697582fc689bd3eee42e8c38" => :sierra
end

depends_on "gtkmm3"
depends_on "python"
depends_on "numpy"
depends_on "python@3.8"
depends_on "scipy"

resource "Cython" do
url "https://files.pythonhosted.org/packages/79/36/69246177114d0b6cb7bd4f9aef177b434c0f4a767e05201b373e8c8d7092/Cython-0.29.19.tar.gz"
sha256 "97f98a7dc0d58ea833dc1f8f8b3ce07adf4c0f030d1886c5399a2135ed415258"
end

resource "Unidecode" do
url "https://files.pythonhosted.org/packages/b1/d6/7e2a98e98c43cf11406de6097e2656d31559f788e9210326ce6544bd7d40/Unidecode-1.1.1.tar.gz"
sha256 "2b6aab710c2a1647e928e36d69c21e76b453cd455f4e2621000e54b2a9b8cce8"
end

resource "pandas" do
url "https://files.pythonhosted.org/packages/2f/79/f236ab1cfde94bac03d7b58f3f2ab0b1cc71d6a8bda3b25ce370a9fe4ab1/pandas-1.0.3.tar.gz"
sha256 "32f42e322fb903d0e189a4c10b75ba70d90958cc4f66a1781ed027f1a1d14586"
end

def install
system "./configure", "--prefix=#{prefix}"
system "make", "install"
xy = Language::Python.major_minor_version Formula["python@3.8"].opt_bin/"python3"

vendor_site_packages = libexec/"vendor/lib/python#{xy}/site-packages"
ENV.prepend_create_path "PYTHONPATH", vendor_site_packages

ENV.prepend_create_path "PYTHONPATH", buildpath/"cython/lib/python#{xy}/site-packages"
resource("Cython").stage do
system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(buildpath/"cython")
end
%w[numpy scipy].each do |d|
ENV.prepend "PYTHONPATH", Formula[d].opt_lib/"python#{xy}/site-packages"
end
Comment on lines +45 to +47
Copy link
Member

Choose a reason for hiding this comment

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

Removing these lines did the trick for me

Suggested change
%w[numpy scipy].each do |d|
ENV.prepend "PYTHONPATH", Formula[d].opt_lib/"python#{xy}/site-packages"
end


resources.each do |r|
next if r.name == "Cython"

r.stage do
system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec/"vendor")
end
end

site_packages = libexec/"lib/python#{xy}/site-packages"
ENV.prepend_create_path "PYTHONPATH", site_packages
system Formula["python@3.8"].opt_bin/"python3", *Language::Python.setup_install_args(libexec)
end

test do
Expand Down