Skip to content

Instantly share code, notes, and snippets.

@mike-lawrence
Forked from asford/boost_numpy.rb
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mike-lawrence/637921f71a6f61efb47a to your computer and use it in GitHub Desktop.
Save mike-lawrence/637921f71a6f61efb47a to your computer and use it in GitHub Desktop.
require 'formula'
class BoostNumpy < Formula
homepage 'https://github.com/ndarray/'
url 'https://github.com/ndarray/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
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