From b47d72f8f835c311d28e130b1960b395d7600d3b Mon Sep 17 00:00:00 2001 From: Anthony Rebello Date: Thu, 9 Feb 2017 20:31:14 +0530 Subject: [PATCH 1/2] fixes #5, calls super for define_args --- rocksdbserver/rocksdbserver.py | 1 + 1 file changed, 1 insertion(+) diff --git a/rocksdbserver/rocksdbserver.py b/rocksdbserver/rocksdbserver.py index 4920307..0d14eb9 100644 --- a/rocksdbserver/rocksdbserver.py +++ b/rocksdbserver/rocksdbserver.py @@ -569,6 +569,7 @@ def prepare_api(self): return api def define_args(self, parser): + super(RocksDBServer, self).define_args(parser) parser.add_argument('data_dir', type=str, metavar='data-dir', help='Directory path where data is stored') From 584c59a4aec38120b169e349072c3333c30abc48 Mon Sep 17 00:00:00 2001 From: Anthony Rebello Date: Thu, 9 Feb 2017 20:44:25 +0530 Subject: [PATCH 2/2] references #4, added travis support --- .travis.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ README.md | 8 ++++++-- setup.py | 42 ++++++++++++++++++++++++++++++++++-------- 3 files changed, 85 insertions(+), 10 deletions(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e3c45a0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,45 @@ +dist: trusty +sudo: required +language: python +python: + - "2.7" +install: + - sudo apt-get install build-essential libsnappy-dev zlib1g-dev libbz2-dev libgflags-dev liblz4-dev python-dev + - git clone "https://github.com/facebook/rocksdb.git" + - cd rocksdb + - git checkout "v4.6.1" + - make shared_lib + - export CPLUS_INCLUDE_PATH=${CPLUS_INCLUDE_PATH}:`pwd`/include + - export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:`pwd` + - export LIBRARY_PATH=${LIBRARY_PATH}:`pwd` + - cd - + - pip install . +script: + - echo "no tests yet" +before_deploy: + - "wget https://github.com/jgm/pandoc/releases/download/1.19.1/pandoc-1.19.1-1-amd64.deb -O $TRAVIS_BUILD_DIR/pandoc.deb" + - "sudo dpkg -i $TRAVIS_BUILD_DIR/pandoc.deb" + - "rm $TRAVIS_BUILD_DIR/pandoc.deb" + - "pandoc --from=markdown --to=rst --output=$TRAVIS_BUILD_DIR/README.rst README.md" +deploy: + # test pypi + - provider: pypi + distributions: "sdist bdist_wheel" + server: https://testpypi.python.org/pypi + skip_cleanup: true + user: "deepcompute" + password: + secure: "osC9Hw55g4pCu/MWnhwLIuSaDcY+xjBurS48oQovbyfvNUAsHYHFBTkY4WLJiU+QvaK5pIDSpvGtoVr2mTdG8vx++A2tEp3NZ/c1ArKbLBOOIzR/D/wau+YZl8rnyZ33FAp3Aek4RkVBlYrPJstzPlLk/CZT26Gg/GwIe21QNIFpuJKGGkODrOCC53Y7qe91OwVBPrxcZUxhKhAy9Nsy5AfV/v2iVUT94KJ8iJwRVxrZz+BlyzAwaeRXV5wbkFxxks0pHyQphHd4S9Cmz8Iqrhz7xzURR0Kv0+PfICsJzEr3Di150hrIEMaHHhapP+2rcYE2yHqvKZ0ntYyqsjEaHy1plWVia7Vim3A39uRw8AgsgZvDPcu8yVq/4RPuJ4iYKu6m4EtEPTpAmdi+RE5wT+gSytILfcWKiYuGsmfDtYQsrGRKrVhdJ3Jd0BIc3+QAvjci4kkDz+TO3NDoSpoLY4pizLoNkhiCzqtKlWwRaFMqi6AYLSvHXT/sZX2wnBTc91zWn3mgVSdsHO17nChGuxgUJ88MxUGS8Vq+gBn4+h9x1Ajc7ALRQ7dwO7drE//+Co90+F1g7tiHlTnFCA/P7Owk1zJzP7Am+hlU2CC79JVq4QRZfweodvXB46eDg6Y2a+//NpGIz3kPMS0JUMzhbq9pjv6Fhu2+FvIwf5Zovj0=" + on: + branch: master + tags: false + # pypi + - provider: pypi + distributions: "sdist bdist_wheel" + skip_cleanup: true + user: "deepcompute" + password: + secure: "osC9Hw55g4pCu/MWnhwLIuSaDcY+xjBurS48oQovbyfvNUAsHYHFBTkY4WLJiU+QvaK5pIDSpvGtoVr2mTdG8vx++A2tEp3NZ/c1ArKbLBOOIzR/D/wau+YZl8rnyZ33FAp3Aek4RkVBlYrPJstzPlLk/CZT26Gg/GwIe21QNIFpuJKGGkODrOCC53Y7qe91OwVBPrxcZUxhKhAy9Nsy5AfV/v2iVUT94KJ8iJwRVxrZz+BlyzAwaeRXV5wbkFxxks0pHyQphHd4S9Cmz8Iqrhz7xzURR0Kv0+PfICsJzEr3Di150hrIEMaHHhapP+2rcYE2yHqvKZ0ntYyqsjEaHy1plWVia7Vim3A39uRw8AgsgZvDPcu8yVq/4RPuJ4iYKu6m4EtEPTpAmdi+RE5wT+gSytILfcWKiYuGsmfDtYQsrGRKrVhdJ3Jd0BIc3+QAvjci4kkDz+TO3NDoSpoLY4pizLoNkhiCzqtKlWwRaFMqi6AYLSvHXT/sZX2wnBTc91zWn3mgVSdsHO17nChGuxgUJ88MxUGS8Vq+gBn4+h9x1Ajc7ALRQ7dwO7drE//+Co90+F1g7tiHlTnFCA/P7Owk1zJzP7Am+hlU2CC79JVq4QRZfweodvXB46eDg6Y2a+//NpGIz3kPMS0JUMzhbq9pjv6Fhu2+FvIwf5Zovj0=" + on: + branch: master + tags: true diff --git a/README.md b/README.md index 9214060..51d9ed4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,8 @@ -# rocksdbserver +rocksdbserver +============= + +[![Build Status](https://travis-ci.org/deep-compute/rocksdbserver.svg?branch=master)](https://travis-ci.org/deep-compute/rocksdbserver) +[![PyPI version](https://badge.fury.io/py/rocksdbserver.svg)](https://badge.fury.io/py/rocksdbserver) A server exposing an RPC interface to RocksDB @@ -24,7 +28,7 @@ $ sudo mv include/* /usr/include/ ### Install RocksDBServer ``` bash -sudo pip install git+git://github.com/prashanthellina/rocksdbserver.git +sudo pip install rocksdbserver ``` ## Usage diff --git a/setup.py b/setup.py index 80f7b63..6880dad 100644 --- a/setup.py +++ b/setup.py @@ -1,12 +1,36 @@ from setuptools import setup, find_packages +import os +HERE = os.path.abspath(os.path.dirname(__file__)) +def get_long_description(): + dirs = [ HERE ] + if os.getenv("TRAVIS"): + dirs.append(os.getenv("TRAVIS_BUILD_DIR")) + + long_description = "" + + for d in dirs: + rst_readme = os.path.join(d, "README.rst") + if not os.path.exists(rst_readme): + continue + + with open(rst_readme) as fp: + long_description = fp.read() + return long_description + + return long_description + +long_description = get_long_description() + +version = '0.1.3' setup( name="rocksdbserver", - version='0.1.3', + version=version, description="RocksDB Server", + long_description=long_description, keywords='rocksdbserver rocksdb', - author='Prashanth Ellina', - author_email="Use the github issues", + author='Deep Compute, LLC', + author_email="contact@deepcompute.com", url="https://github.com/deep-compute/rocksdbserver", license='MIT License', install_requires=[ @@ -19,11 +43,13 @@ 'funcserver', 'pyrocksdb', ], - dependency_links=[ - 'https://github.com/deep-compute/funcserver/archive/master.zip#egg=funcserver', - 'http://github.com/stephan-hof/pyrocksdb/archive/v0.2.tar.gz#egg=pyrocksdb' - ], package_dir={'rocksdbserver': 'rocksdbserver'}, packages=find_packages('.'), - include_package_data=True + include_package_data=True, + classifiers=[ + "Programming Language :: Python :: 2.7", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + ] )