Last active
January 1, 2016 14:19
-
-
Save tcgeophysics/8156717 to your computer and use it in GitHub Desktop.
Tentative homebrew formula to install bob a free signal-processing and machine learning toolbox.
http://www.idiap.ch/software/bob/docs/releases/last/sphinx/html/index.html Compilation instructions:
http://www.idiap.ch/software/bob/docs/releases/last/sphinx/html/Compilation.html Dependencies:
http://www.idiap.ch/software/bob/docs/releases/last/sp…
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
# the VTK formula. It uses the output from `python-config`. | |
which_python = "python" + `python -c 'import sys;print(sys.version[:3])'`.strip | |
python_prefix = `python-config --prefix`.strip | |
# Python is actually a library. The libpythonX.Y.dylib points to this lib, too. | |
if File.exist? "#{python_prefix}/Python" | |
# Python was compiled with --framework: | |
args << "-DPYTHON_LIBRARY='#{python_prefix}/Python'" | |
args << "-DPYTHON_INCLUDE_DIR='#{python_prefix}/Headers'" | |
else | |
python_lib = "#{python_prefix}/lib/lib#{which_python}" | |
if File.exists? "#{python_lib}.a" | |
args << "-DPYTHON_LIBRARY='#{python_lib}.a'" | |
else | |
args << "-DPYTHON_LIBRARY='#{python_lib}.dylib'" | |
end | |
args << "-DPYTHON_INCLUDE_DIR='#{python_prefix}/include/#{which_python}'" | |
end | |
args << "-DPYTHON_PACKAGES_PATH='#{lib}/#{which_python}/site-packages'" | |
system "cmake", "..", *args | |
system "make" | |
system "make test" | |
system "make install" | |
end | |
end | |
def test | |
python do | |
ohai "This tests only a simple import and prints the version number. Use --verbose to see progress." | |
system "python", "-c", "import bob; print bob.version" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment