-
-
Save yawara/009959e76f348b9ded53 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 GraphTool < Formula | |
homepage 'http://graph-tool.skewed.de/' | |
url 'http://downloads.skewed.de/graph-tool/graph-tool-2.2.31.tar.bz2' | |
sha1 '5e0b1c215ecd76191a82c745df0fac17e33bfb09' | |
head 'https://github.com/count0/graph-tool.git' | |
depends_on 'pkg-config' => :build | |
depends_on 'boost' => 'c++11' | |
depends_on 'cgal' => 'c++11' | |
depends_on 'google-sparsehash' => ['c++11', :optional] | |
depends_on 'cairomm' => 'c++11' | |
depends_on 'py3cairo' | |
depends_on 'python3' | |
#depends_on 'matplotlib' => :python | |
#depends_on 'numpy' => :python | |
#depends_on 'scipy' => :python | |
def install | |
ENV.cxx11 | |
config_args = %W[ | |
--disable-debug | |
--disable-dependency-tracking | |
--disable-optimization | |
--prefix=#{prefix} | |
--with-python-module-path=/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages | |
] | |
config_args << "--disable-sparsehash" if build.without? 'google-sparsehash' | |
system "./configure", "LDFLAGS=-L/usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/lib/python3.4/config-3.4m -lpython3.4m ", "PYTHON_EXTRA_LDFLAGS=-Wl,-stack_size,1000000 -framework CoreFoundation /usr/local/Cellar/python3/3.4.3/Frameworks/Python.framework/Versions/3.4/Python ", *config_args | |
system "make", "install" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Python3のバージョン(ここでは3.4.3)がハードコーディングされいるので、利用する場合は適宜自分の環境のバージョンに読み替えてください。どうやらgraph-toolをPython3でインストールしたい場合は
--with-python3
をつければいいらしい。