Skip to content
Snippets Groups Projects
Commit d1e2cc5e authored by Dilawar Singh's avatar Dilawar Singh
Browse files

Added script to build and install moose on OSX.

parent bb432631
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,9 @@ env: ...@@ -27,7 +27,9 @@ env:
before_script: before_script:
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./_travis/prepare_linux.sh ; fi - if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./_travis/prepare_linux.sh ; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./_travis/prepare_osx.sh ; fi
script: script:
- ./build_on_travis.sh - if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./_travis/build_on_linux.sh ; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then ./_travis/build_on_osx.sh ; fi
class Moose < Formula
include Language::Python::Virtualenv
desc "Multiscale Object Oriented Simulation Environment"
homepage "http://moose.ncbs.res.in"
url "https://github.com/BhallaLab/moose-core/archive/3.1.2.tar.gz"
sha256 "a542983e4903b2b51c79f25f4acc372555cbe31bc0b9827302a6430fad466ef7"
head "https://github.com/BhallaLab/moose-core.git"
bottle do
cellar :any
sha256 "6077f886560480c956270f855cf9576a3e8261c5f2ea064117c3483f74a84462" => :sierra
sha256 "a637de34ce0b92f16afc120ecb2e0e4aff8f8a2e6a2ada5521ee01cf7ccdca9e" => :el_capitan
sha256 "1bb0712ef178577a3c44190be8f21f894cddc66ce03f742d768e44371425dce7" => :yosemite
sha256 "a62366e1e1de37c13dec6d2b7f91dc63f8b40ab460e35b31a4d94507a0df6219" => :x86_64_linux
end
depends_on "cmake" => :build
depends_on "gsl"
depends_on "hdf5"
depends_on :python if MacOS.version <= :snow_leopard
depends_on "numpy"
def install
(buildpath/"VERSION").write("#{version}\n")
# FindHDF5.cmake needs a little help
ENV.prepend "LDFLAGS", "-lhdf5 -lhdf5_hl"
args = std_cmake_args
args << "-DCMAKE_SKIP_RPATH=ON"
mkdir "_build" do
system "cmake", "..", "-DPYTHON_EXECUTABLE:FILEPATH=#{which("python")}", *args
system "make"
system "ctest", "--output-on-failure"
end
Dir.chdir("_build/python") do
system "python", *Language::Python.setup_install_args(prefix)
end
end
def caveats; <<-EOS.undent
You need to install `networkx` and `python-libsbml` using python-pip. Open terminal
and execute following command:
$ pip install python-libsbml networkx
EOS
end
test do
system "python", "-c", "import moose"
end
end
File mode changed from 100644 to 100755
#!/bin/bash -
#===============================================================================
#
# FILE: prepare_osx.sh
#
# USAGE: ./prepare_osx.sh
#
# DESCRIPTION:
#
# OPTIONS: ---
# REQUIREMENTS: ---
# BUGS: ---
# NOTES: ---
# AUTHOR: Dilawar Singh (), dilawars@ncbs.res.in
# ORGANIZATION: NCBS Bangalore
# CREATED: Wednesday 28 June 2017 10:23:28 IST
# REVISION: ---
#===============================================================================
set -o nounset # Treat unset variables as an error
brew install gsl
brew install cmake
brew install homebrew/science/hdf5
brew install homebrew/science/matplotlib
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment