Last active
January 1, 2016 04:39
-
-
Save asford/8092922 to your computer and use it in GitHub Desktop.
Boost.Numpy and ndarray homebrew formula.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class BoostNumpy < Formula | |
homepage 'https://github.com/ndarray/' | |
url '[email protected]:asford/Boost.NumPy.git', :using => :git, :branch => 'master' | |
version "0.0.1" | |
depends_on 'scons' => :build | |
depends_on 'boost' => 'with-python' | |
depends_on 'numpy' => :python | |
def install | |
args = [ | |
"--with-boost-include=#{HOMEBREW_PREFIX}/include", | |
"--with-boost-lib=#{HOMEBREW_PREFIX}/lib", | |
"--prefix=#{prefix}" | |
] | |
system "scons", *args | |
system "scons", "install", *args | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class Ndarray < Formula | |
homepage 'https://github.com/ndarray/' | |
url 'https://github.com/ndarray/ndarray.git', :using => :git, :branch => 'master' | |
version "0.0.1" | |
depends_on 'scons' => :build | |
depends_on 'eigen' | |
depends_on 'boost' => 'with-python' | |
depends_on 'numpy' => :python | |
def install | |
args = [ | |
"--with-eigen-include=" + %x[pkg-config eigen3 --cflags-only-I][2..-1].strip, | |
"--with-boost-include=#{HOMEBREW_PREFIX}/include", | |
"--with-boost-lib=#{HOMEBREW_PREFIX}/lib", | |
"--prefix=#{prefix}" | |
] | |
system "scons", "include", "m4", "Boost.NumPy", *args | |
## Temporary workaround for test ordering | |
system "scons", "tests/.ndarray.cc.succeeded", *args | |
system "scons", "tests", *args | |
system "scons", *args | |
system "scons", "install", *args | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment