open-babel: cleanup python usage.

This commit is contained in:
Mike McQuaid 2014-01-04 13:12:26 +00:00
parent dc5b486c3b
commit 9a6e26a884

View file

@ -29,14 +29,7 @@ class OpenBabel < Formula
args << "-DCAIRO_INCLUDE_DIRS='#{HOMEBREW_PREFIX}/include/cairo'" if build.with? 'cairo'
args << "-DCAIRO_LIBRARIES='#{HOMEBREW_PREFIX}/lib/libcairo.dylib'" if build.with? 'cairo'
python do
args << "-DPYTHON_BINDINGS=ON"
# For Xcode-only systems, the headers of system's python are inside of Xcode:
args << "-DPYTHON_INCLUDE_DIR='#{python.incdir}'"
# Cmake picks up the system's python dylib, even if we have a brewed one:
args << "-DPYTHON_LIBRARY='#{python.libdir}/lib#{python.xy}.dylib'"
args << "-DPYTHON_PACKAGES_PATH='#{python.site_packages}'"
end
args << "-DPYTHON_BINDINGS=ON" if build.with? 'python'
args << '..'
@ -46,15 +39,13 @@ class OpenBabel < Formula
system "make install"
end
python do
python.site_packages.install lib/'openbabel.py', lib/'pybel.py', lib/'_openbabel.so'
if build.with? 'python'
(lib+'python2.7/site-packages').install lib/'openbabel.py', lib/'pybel.py', lib/'_openbabel.so'
end
end
def caveats
s = ''
s += python.standard_caveats if python
s += <<-EOS.undent
<<-EOS.undent
Java libraries are installed to #{HOMEBREW_PREFIX}/lib so this path should be
included in the CLASSPATH environment variable.
EOS