Skip to content

Instantly share code, notes, and snippets.

@ixje
Last active January 24, 2018 15:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ixje/ad1606338ed3dd27872afd9d8f941e65 to your computer and use it in GitHub Desktop.
Save ixje/ad1606338ed3dd27872afd9d8f941e65 to your computer and use it in GitHub Desktop.
python-rocksdb compile instructions

get rocks db

make sure xcode is up to date with a C++ 11 compiler

xcode-select --install

install from brew brew install rocksdb

build python bindings

Create a virtual env and install depencies

python3 -m venv venv
source venv/bin/activate
pip install "Cython>=0.20"

In the following command don't forget to adjust the version number of your rocksdb installation

CFLAGS='-mmacosx-version-min=10.7 -stdlib=libc++' pip install --global-option=build_ext --global-option="-I/usr/local/Cellar/rocksdb/5.9.2_1/include" --global-option="-L/usr/local/Cellar/rocksdb/5.9.2_1/lib" git+git://github.com/twmht/python-rocksdb.git

enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment