Skip to content

Instantly share code, notes, and snippets.

@philopon
Last active December 26, 2015 15:19
Show Gist options
  • Save philopon/7171723 to your computer and use it in GitHub Desktop.
Save philopon/7171723 to your computer and use it in GitHub Desktop.
#!/bin/sh
## install rdkit 2013.06_1 to $RDBASE
TARGET=$HOME/package
RDBASE=$TARGET/RDKIT_2013_09_1-g++-4.8
# install gcc48
brew tap homebrew/versions
brew install gcc48
# install python
brew install python
# install boost using gcc48
tar xvf boost_1_55_0.tar.bz2
cd boost_1_55_0
echo "using darwin : gcc48 : g++-4.8 ;" > $HOME/user-config.jam
./bootstrap.sh --with-python-root=/usr/local/Frameworks/Python.framework/Versions/2.7
./b2 address-model=64 cflags=-fPIC cxxflags=-fPIC toolset=darwin-gcc48 --with-python --with-regex install --prefix=$RDBASE
export DYLD_LIBRARY_PATH=$RDBASE/lib
# install rdkit
tar xvf RDKit_2013_09_1.tgz -C $TARGET
cd $RDBASE
mkdir build
cd build
cmake -DCMAKE_CXX_COMPILER=g++-4.8 -DCMAKE_C_COMPILER=gcc-4.8 \
-DBOOST_ROOT=$RDBASE -DBoost_NO_SYSTEM_PATHS=ON \
-DPYTHON_LIBRARY=/usr/local/Frameworks/Python.framework/Versions/Current/lib/libpython2.7.dylib \
-DPYTHON_INCLUDE_DIR=/usr/local/Frameworks/Python.framework/Versions/Current/include/python2.7 \
-DPYTHON_EXECUTABLE=/usr/local/bin/python \
..
make
make install
export PYTHONPATH=$RDBASE:$PYTHONPATH
# test rdkit
ctest
# generate C++ document
cd $RDBASE/Code
doxygen doxygen/doxygen.config
# python binding recomended
## for high quality drawing
brew install py2cairo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment