Skip to content
Snippets Groups Projects
Unverified Commit 2c8ed278 authored by Andrey Martyanov's avatar Andrey Martyanov
Browse files

Update README with simplified installation procedure

parent b183abda
No related branches found
No related tags found
No related merge requests found
...@@ -7,24 +7,8 @@ Python bindings for RocksDB. See http://rocksdb.readthedocs.io for a more compre ...@@ -7,24 +7,8 @@ Python bindings for RocksDB. See http://rocksdb.readthedocs.io for a more compre
Quick install Quick install
------------- -------------
Quick install for debian/ubuntu like linux distributions.
.. code-block:: bash .. code-block:: bash
$ apt-get install build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev
$ git clone https://github.com/facebook/rocksdb.git
$ cd rocksdb
$ mkdir build && cd build
$ cmake ..
$ make
$ cd ..
$ export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}${CPLUS_INCLUDE_PATH:+:}`pwd`/include/
$ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}`pwd`/build/
$ export LIBRARY_PATH=${LIBRARY_PATH}${LIBRARY_PATH:+:}`pwd`/build/
$ apt-get install python-dev
$ python3 -m venv .venv
$ source .venv/bin/activate
$ pip install rocksdb $ pip install rocksdb
...@@ -34,9 +18,9 @@ Quick usage guide ...@@ -34,9 +18,9 @@ Quick usage guide
.. code-block:: python .. code-block:: python
>>> import rocksdb >>> import rocksdb
>>> db = rocksdb.DB("test.db", rocksdb.Options(create_if_missing=True)) >>> db = rocksdb.DB('test.db', rocksdb.Options(create_if_missing=True))
>>> db.put(b'a', b'data') >>> db.put(b'a', b'data')
>>> print db.get(b'a') >>> print(db.get(b'a'))
b'data' b'data'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment