diff options
| author | Mike McQuaid | 2014-04-03 20:57:22 +0100 |
|---|---|---|
| committer | Mike McQuaid | 2014-04-10 12:17:58 +0100 |
| commit | 0176bbfcdb2c280655b1a8c7aba2695ef7cd30bf (patch) | |
| tree | 48ba61db0c19b4a35f04fea746d7c8a070e1fff5 /Library | |
| parent | 7e2b725d5235348966f47e95cac452a90ce0bb3d (diff) | |
| download | homebrew-0176bbfcdb2c280655b1a8c7aba2695ef7cd30bf.tar.bz2 | |
cantera: use numpy resource.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Formula/cantera.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Library/Formula/cantera.rb b/Library/Formula/cantera.rb index 6118e26c8..ff3ea44dc 100644 --- a/Library/Formula/cantera.rb +++ b/Library/Formula/cantera.rb @@ -6,13 +6,24 @@ class Cantera < Formula sha1 'c62666590c65c9a5a17c0867f0f6b6789984131f' head 'http://cantera.googlecode.com/svn/cantera18/trunk/' - depends_on 'numpy' => :python + depends_on :python + depends_on :fortran => :build depends_on 'graphviz' # fixes the Makefiles in Cantera/cxx/demos/ that have broken install commands patch :DATA + resource 'numpy' do + url 'http://downloads.sourceforge.net/project/numpy/NumPy/1.8.1/numpy-1.8.1.tar.gz' + sha1 '8fe1d5f36bab3f1669520b4c7d8ab59a21a984da' + end + def install + ENV.prepend_create_path 'PYTHONPATH', libexec+'lib/python2.7/site-packages' + numpy_args = [ "build", "--fcompiler=gnu95", + "install", "--prefix=#{libexec}" ] + resource('numpy').stage { system "python", "setup.py", *numpy_args } + if MacOS.prefer_64_bit? # There is probably a better way to do this, but this seems to work for my purposes: ENV['CFLAGS'] += " -arch #{Hardware::CPU.arch_64_bit}" |
