diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..e50273c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,2 @@ +- name: GitHub Action for Homebrew + uses: artemnovichkov/action-homebrew@0.1.0 diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..aa47225 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,31 @@ +language: cpp +sudo: required + +os: + - osx + +oxs_image: + - xcode11.3 + - xcode10.3 + +notifications: + email: + recipients: + - dilawar.s.rajput@gmail.com + on_success: change + on_failure: always + +script: + - set +e + - export PATH=/usr/local/bin:$PATH + - brew unlink python@2 + - brew install python@3 graphviz + - brew link --overwrite python + - set -e + - brew tap dilawar/moose + - brew install moose + - brew install -v --HEAD moose-nightly + - /usr/local/bin/python3 -c "import moose; print(dir(moose))" + - set +e + - /usr/local/bin/python3 -m pip install matplotlib scipy networkx + - /usr/local/bin/python3 -c "import moose;moose.test()" diff --git a/README.md b/README.md index aff9540..c2e3887 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,8 @@ -# homebrew-moose Homebrew formulae for MOOSE and related projects -# Install MOOSE - - $ brew tap BhallaLab/moose - $ brew install moose +# Installation + $ brew tap BhallaLab/moose + $ brew install moose # For stable version. + $ brew install --HEAD moose-nightly # for bleeding edge version diff --git a/moose-nightly.rb b/moose-nightly.rb index 67bcdcd..fe66026 100644 --- a/moose-nightly.rb +++ b/moose-nightly.rb @@ -1,12 +1,13 @@ class MooseNightly < Formula desc "Multiscale Object Oriented Simulation Environment" homepage "http://moose.ncbs.res.in" - head "https://github.com/BhallaLab/moose-core.git", :branch => "chhennapoda" + version "3.2-nightly" + head "https://github.com/BhallaLab/moose-core.git", :branch => "master" depends_on "cmake" => :build depends_on "gsl" - depends_on :python if MacOS.version <= :snow_leopard depends_on "numpy" + depends_on "python" def install (buildpath/"VERSION").write("#{version}\n") @@ -15,19 +16,23 @@ def install mkdir "_build" do system "cmake", "..", *args system "make" - system "make install" + # NOTE: https://github.com/Homebrew/brew/blob/master/docs/Python-for-Formula-Authors.md + cd "python" do + system "cp", "setup.cmake.py", "setup.py" + system "python3", *Language::Python.setup_install_args(prefix) + end end end def caveats; <<-EOS - Please also install the following using pip - $ pip install matplotlib networkx - Optionally, you can install the folllowing for sbml and NeuroML support. - $ pip install python-libsbml pyNeuroML - EOS + Please install the following as well, + $ python3 -m pip install matplotlib networkx + And optionally, folllowing are needed for SBML and NeuroML. + $ python3 -m pip install python-libsbml pyNeuroML + EOS end test do - system "python", "-c", "import moose;print(moose.__file__)" + system "python3", "-c", "import moose;print(moose.__file__, moose.__version__)" end end diff --git a/moose.rb b/moose.rb index 4e6c386..1796af2 100644 --- a/moose.rb +++ b/moose.rb @@ -1,14 +1,14 @@ class Moose < Formula desc "Multiscale Object Oriented Simulation Environment" homepage "http://moose.ncbs.res.in" - url "https://github.com/BhallaLab/moose-core/archive/v3.1.4.tar.gz" - sha256 "5d8e56e4361723fc30598d87fecfeab67be471abc0bc017a334357fa2160cc1a" - head "https://github.com/BhallaLab/moose-core.git", :branch=>"chamcham" + url "https://github.com/dilawar/moose-core/archive/v3.1.5rc1.tar.gz" + sha256 "74d8ca49662e28e3742f520ff1017ba520e2d1f9e1f94f4361c85066c1fb17e6" + head "https://github.com/dilawar/moose-core.git", :branch=>"chamcham" depends_on "cmake" => :build depends_on "gsl" - depends_on :python if MacOS.version <= :snow_leopard depends_on "numpy" + depends_on "python@3" def install args = std_cmake_args @@ -16,19 +16,24 @@ def install args << "-DVERSION_MOOSE=#{version}" mkdir "_build" do system "cmake", "..", *args - system "make install" + system "make" + # NOTE: https://github.com/Homebrew/brew/blob/master/docs/Python-for-Formula-Authors.md + cd "python" do + system "cp", "setup.cmake.py", "setup.py" + system "python3", *Language::Python.setup_install_args(prefix) + end end end def caveats; <<-EOS - Please also install the following using pip - $ pip install matplotlib networkx - Optionally, you can install the folllowing for sbml and NeuroML support. - $ pip install python-libsbml pyNeuroML - EOS + Please install the following as well, + $ python3 -m pip install matplotlib networkx + And optionally, folllowing are needed for SBML and NeuroML. + $ python3 -m pip install python-libsbml pyNeuroML + EOS end test do - system "python", "-c", "import moose; print( moose.__version__) " + system "python@3", "-c", "import moose; print(moose.__file__, moose.__version__)" end end