From fcd74ef4b60e62813837fb893d5557a52e21a2c3 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Wed, 29 Jan 2020 10:02:03 +0530 Subject: [PATCH 01/21] python2 is EOL. Upgrading to python3. Probably this is the reason behind --- moose-nightly.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/moose-nightly.rb b/moose-nightly.rb index 67bcdcd..5ae2036 100644 --- a/moose-nightly.rb +++ b/moose-nightly.rb @@ -1,12 +1,12 @@ 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" + 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@3" if MacOS.version <= :snow_leopard def install (buildpath/"VERSION").write("#{version}\n") @@ -15,19 +15,19 @@ def install mkdir "_build" do system "cmake", "..", *args system "make" - system "make install" + system "make", "install" end end def caveats; <<-EOS Please also install the following using pip - $ pip install matplotlib networkx + $ pip install matplotlib networkx Optionally, you can install the folllowing for sbml and NeuroML support. $ pip install python-libsbml pyNeuroML - EOS + EOS end test do - system "python", "-c", "import moose;print(moose.__file__)" + system "python3", "-c", "import moose;print(moose.__file__, moose.__version__)" end end From 69d866f3e3a792ac760dade751127b84358a686f Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Wed, 29 Jan 2020 10:38:23 +0530 Subject: [PATCH 02/21] Updating to python3. --- moose.rb | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/moose.rb b/moose.rb index 4e6c386..66597d2 100644 --- a/moose.rb +++ b/moose.rb @@ -7,28 +7,29 @@ class Moose < Formula depends_on "cmake" => :build depends_on "gsl" - depends_on :python if MacOS.version <= :snow_leopard depends_on "numpy" + depends_on "python" def install args = std_cmake_args args << "-DCMAKE_SKIP_RPATH=ON" + args << "-DPYTHON_EXECUTABLE=/usr/local/bin/python3" args << "-DVERSION_MOOSE=#{version}" mkdir "_build" do system "cmake", "..", *args - system "make install" + system "make", "install" end end def caveats; <<-EOS Please also install the following using pip - $ pip install matplotlib networkx + $ pip install matplotlib networkx Optionally, you can install the folllowing for sbml and NeuroML support. $ pip install python-libsbml pyNeuroML - EOS + EOS end test do - system "python", "-c", "import moose; print( moose.__version__) " + system "python3", "-c", "import moose; print(moose.__file__, moose.__version__)" end end From 4a3c8d36bffb0c0082021082cce66c0c7d7842f7 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Wed, 29 Jan 2020 10:39:38 +0530 Subject: [PATCH 03/21] Time to update chamcham branch. --- moose-nightly.rb | 2 +- moose.rb | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/moose-nightly.rb b/moose-nightly.rb index 5ae2036..3d7e3bb 100644 --- a/moose-nightly.rb +++ b/moose-nightly.rb @@ -6,7 +6,7 @@ class MooseNightly < Formula depends_on "cmake" => :build depends_on "gsl" depends_on "numpy" - depends_on "python@3" if MacOS.version <= :snow_leopard + depends_on "python" def install (buildpath/"VERSION").write("#{version}\n") diff --git a/moose.rb b/moose.rb index 66597d2..621844c 100644 --- a/moose.rb +++ b/moose.rb @@ -13,7 +13,6 @@ class Moose < Formula def install args = std_cmake_args args << "-DCMAKE_SKIP_RPATH=ON" - args << "-DPYTHON_EXECUTABLE=/usr/local/bin/python3" args << "-DVERSION_MOOSE=#{version}" mkdir "_build" do system "cmake", "..", *args From 69f42e2213323db90f48db44b607697c3ffd6d54 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Fri, 31 Jan 2020 12:21:24 +0530 Subject: [PATCH 04/21] Builds locally --- moose-nightly.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moose-nightly.rb b/moose-nightly.rb index 3d7e3bb..7b4f5c8 100644 --- a/moose-nightly.rb +++ b/moose-nightly.rb @@ -1,7 +1,7 @@ class MooseNightly < Formula desc "Multiscale Object Oriented Simulation Environment" homepage "http://moose.ncbs.res.in" - head "https://github.com/BhallaLab/moose-core.git", :branch => "master" + head "https://github.com/dilawar/moose-core.git", :branch => "master" depends_on "cmake" => :build depends_on "gsl" From 304b06123891e3cfd4257912bb0eb76a09157d01 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Fri, 31 Jan 2020 12:56:35 +0530 Subject: [PATCH 05/21] v3.1.5rc1 --- moose.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/moose.rb b/moose.rb index 621844c..8c601a1 100644 --- a/moose.rb +++ b/moose.rb @@ -1,9 +1,9 @@ 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" From d561d7888a3eb14f307510b734df99110ea5ae42 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 09:19:31 +0530 Subject: [PATCH 06/21] Seems like it worked #1. --- moose.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/moose.rb b/moose.rb index 8c601a1..57808ac 100644 --- a/moose.rb +++ b/moose.rb @@ -8,7 +8,7 @@ class Moose < Formula depends_on "cmake" => :build depends_on "gsl" depends_on "numpy" - depends_on "python" + depends_on "python@3" def install args = std_cmake_args @@ -16,7 +16,12 @@ 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 @@ -29,6 +34,6 @@ def caveats; <<-EOS end test do - system "python3", "-c", "import moose; print(moose.__file__, moose.__version__)" + system "python@3", "-c", "import moose; print(moose.__file__, moose.__version__)" end end From f124f930cb364472eb0445ed20f98a85317719f3 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 09:30:05 +0530 Subject: [PATCH 07/21] Both formulae are fixed (hopefully. Time to test on OSX) #1. --- moose-nightly.rb | 15 ++++++++++----- moose.rb | 8 ++++---- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/moose-nightly.rb b/moose-nightly.rb index 7b4f5c8..e999f75 100644 --- a/moose-nightly.rb +++ b/moose-nightly.rb @@ -1,6 +1,7 @@ class MooseNightly < Formula desc "Multiscale Object Oriented Simulation Environment" homepage "http://moose.ncbs.res.in" + version "3.2-nightly" head "https://github.com/dilawar/moose-core.git", :branch => "master" depends_on "cmake" => :build @@ -15,15 +16,19 @@ 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 + 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 diff --git a/moose.rb b/moose.rb index 57808ac..1796af2 100644 --- a/moose.rb +++ b/moose.rb @@ -26,10 +26,10 @@ def install 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 + 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 From c7d301097dfc4e17a6cc7a728e767d731f42fd63 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 09:33:35 +0530 Subject: [PATCH 08/21] Added travis script. --- .travis.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b2bacb5 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: cpp +sudo: required + +os: +- osx + +notifications: + email: + recipients: + - dilawar.s.rajput@gmail.com + on_success: change + on_failure: always + +before_script: +- nvm get head + +script: + - brew tap dilawar/moose + - brew install moose + - python3 -c "import moose; print(dir(moose))" + - brew uninstall -f moose + - brew install --HEAD moose-nightly + - python3 -c "import moose; print(dir(moose))" + - set +e From 8e86618a1ba56c5b59bcc0d9f1dd5307998714d3 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 09:34:12 +0530 Subject: [PATCH 09/21] Minor tweaks in readme file. --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index aff9540..3493349 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ # homebrew-moose + Homebrew formulae for MOOSE and related projects # Install MOOSE From 72a9294c9df7900d4413b3c9ff52e42c50c2c39e Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 09:35:41 +0530 Subject: [PATCH 10/21] Removed nvm command from travis script. --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index b2bacb5..bab916a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,6 @@ notifications: on_success: change on_failure: always -before_script: -- nvm get head - script: - brew tap dilawar/moose - brew install moose From 56134be97c432a53ea8550abd7fb6494d09edffc Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 09:39:41 +0530 Subject: [PATCH 11/21] Update README.md --- README.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 3493349..c2e3887 100644 --- a/README.md +++ b/README.md @@ -1,10 +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 From c6fea958793de959ce7b3368a82bcbdffd212c60 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 09:47:01 +0530 Subject: [PATCH 12/21] Force python3. --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index bab916a..4f5b9d0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ language: cpp sudo: required os: -- osx + - osx notifications: email: @@ -12,6 +12,8 @@ notifications: on_failure: always script: + - brew install python + - brew link --overwrite python - brew tap dilawar/moose - brew install moose - python3 -c "import moose; print(dir(moose))" From e6ca625948d2e0dd7fe877ddb2aabd59bc42bdc1 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 09:47:24 +0530 Subject: [PATCH 13/21] Force overwrite python3. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4f5b9d0..c2e497b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,8 +12,8 @@ notifications: on_failure: always script: - - brew install python - - brew link --overwrite python + - brew install python@3 + - brew link --overwrite python@3 - brew tap dilawar/moose - brew install moose - python3 -c "import moose; print(dir(moose))" From 709947949a0744fdb7bbdf1b3d6b482115320673 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 14:13:56 +0530 Subject: [PATCH 14/21] Use newer OSX images. Default is 9.x. Now using 10.x and 11.x --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index c2e497b..eb821f4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,10 @@ sudo: required os: - osx +oxs_image: + - xcode11.3 + - xcode10.3 + notifications: email: recipients: From 213a451b4ede02de045b4e4075bcfd8d5785dc53 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 14:31:17 +0530 Subject: [PATCH 15/21] Using absolute paths. --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index eb821f4..a5f97fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,8 +20,6 @@ script: - brew link --overwrite python@3 - brew tap dilawar/moose - brew install moose - - python3 -c "import moose; print(dir(moose))" - - brew uninstall -f moose - brew install --HEAD moose-nightly - - python3 -c "import moose; print(dir(moose))" + - /usr/local/bin/python3 -c "import moose; print(dir(moose))" - set +e From d8d272a9abd5f87ee94050e8c9757d61b373a1dd Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 14:48:08 +0530 Subject: [PATCH 16/21] Some minor tweaks to test if this works. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a5f97fc..efa8827 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,9 @@ notifications: on_failure: always script: + - brew unlink python@2 - brew install python@3 - - brew link --overwrite python@3 + - brew link --overwrite python - brew tap dilawar/moose - brew install moose - brew install --HEAD moose-nightly From 2ed8d4f7cd7d29ed8f7c306d57fe1129b90d804f Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 14:55:23 +0530 Subject: [PATCH 17/21] Added flag to travis build. When building moose, be verbose. --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index efa8827..1ccbeb4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,6 +21,5 @@ script: - brew link --overwrite python - brew tap dilawar/moose - brew install moose - - brew install --HEAD moose-nightly + - brew install -v --HEAD moose-nightly - /usr/local/bin/python3 -c "import moose; print(dir(moose))" - - set +e From a70fce10f2c6ef76a4f7755061a18b7700496e16 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 19:52:41 +0530 Subject: [PATCH 18/21] Adding traps in travis. We only care for errors in our setup. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1ccbeb4..cb7686e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,10 +16,13 @@ notifications: on_failure: always script: + - set +e - brew unlink python@2 - brew install python@3 - 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 From ea2a03d532ecb539262b54c1d9867b56d57cc243 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 20:00:36 +0530 Subject: [PATCH 19/21] Adding more tests. --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cb7686e..aa47225 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,8 +17,9 @@ notifications: script: - set +e + - export PATH=/usr/local/bin:$PATH - brew unlink python@2 - - brew install python@3 + - brew install python@3 graphviz - brew link --overwrite python - set -e - brew tap dilawar/moose @@ -26,3 +27,5 @@ script: - 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()" From a677ab39fc5f22c80ad46d44b0211d044de5d791 Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Sat, 1 Feb 2020 20:37:44 +0530 Subject: [PATCH 20/21] Create main.yml --- .github/workflows/main.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 .github/workflows/main.yml 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 From 0cf8b85ee0e4a47bae359924c07708d7b443648c Mon Sep 17 00:00:00 2001 From: Dilawar Singh Date: Fri, 13 Mar 2020 21:17:46 +0530 Subject: [PATCH 21/21] Update moose-nightly.rb Official URL. --- moose-nightly.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/moose-nightly.rb b/moose-nightly.rb index e999f75..fe66026 100644 --- a/moose-nightly.rb +++ b/moose-nightly.rb @@ -2,7 +2,7 @@ class MooseNightly < Formula desc "Multiscale Object Oriented Simulation Environment" homepage "http://moose.ncbs.res.in" version "3.2-nightly" - head "https://github.com/dilawar/moose-core.git", :branch => "master" + head "https://github.com/BhallaLab/moose-core.git", :branch => "master" depends_on "cmake" => :build depends_on "gsl"