Skip to content

Commit

Permalink
Attribution and packaging changes
Browse files Browse the repository at this point in the history
  • Loading branch information
martyanov committed Dec 14, 2020
1 parent 3a5df05 commit c44ecb6
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 49 deletions.
File renamed without changes.
46 changes: 22 additions & 24 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,25 +1,11 @@
Note
=========
The original pyrocksdb (https://pypi.python.org/pypi/pyrocksdb/0.4) has not been updated for long time. I update pyrocksdb to support the latest rocksdb. Please open issues in github if you have any problem.

News (2019/04/18)
=========
Currently I am refactoring the code, and more features like TTL are coming soon. And the installation with cmake will be much more easily.

News (2019/04/19)
=========
I have created a new branch(https://github.com/twmht/python-rocksdb/tree/pybind11) which provides the basic functions (`put`, `get` and `delete`) now. And the installtion is much more easily! you can try it if you encounter any installtion issues in the current version of `python-rocksdb`.

The branch is under development and will be released to PypI after I migrate most of the existing features.

pyrocksdb
=========
python-rocksdb
==============

Python bindings for RocksDB.
See http://python-rocksdb.readthedocs.io/en/latest/ for a more comprehensive install and usage description.
See http://rocksdb.readthedocs.io for a more comprehensive install and usage description.


Quick Install
Quick install
-------------

Quick install for debian/ubuntu like linux distributions.
Expand All @@ -38,19 +24,31 @@ Quick install for debian/ubuntu like linux distributions.
$ export LIBRARY_PATH=${LIBRARY_PATH}${LIBRARY_PATH:+:}`pwd`/build/
$ apt-get install python-virtualenv python-dev
$ virtualenv pyrocks_test
$ cd pyrocks_test
$ . bin/active
$ pip install python-rocksdb
$ virtualenv rocksdb_test
$ cd rocksdb_test
$ . bin/activate
$ pip install rocksdb
Quick Usage Guide
Quick usage guide
-----------------

.. code-block:: pycon
.. code-block:: python
>>> import rocksdb
>>> db = rocksdb.DB("test.db", rocksdb.Options(create_if_missing=True))
>>> db.put(b'a', b'data')
>>> print db.get(b'a')
b'data'
Acknowledgements
~~~~~~~~~~~~~~~~

This project is a fork of `python-rocksdb`_ maintained by `twmht`_, which itself is a fork
of `pyrocksdb`_, that was originally written by `stephan-hof`_.

.. _python-rocksdb: https://github.com/twmht/python-rocksdb
.. _twmht: https://github.com/twmht
.. _pyrocksdb: https://github.com/stephan-hof/pyrocksdb
.. _stephan-hof: https://github.com/stephan-hof
93 changes: 68 additions & 25 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import platform
from setuptools import setup
from setuptools import find_packages
from setuptools import Extension
import setuptools


extra_compile_args = [
Expand All @@ -14,34 +12,79 @@
'-fno-rtti',
]


if platform.system() == 'Darwin':
extra_compile_args += ['-mmacosx-version-min=10.7', '-stdlib=libc++']


setup(
name="python-rocksdb",
version='0.7.0',
description="Python bindings for RocksDB",
keywords='rocksdb',
author='Ming Hsuan Tu',
author_email="[email protected]",
url="https://github.com/twmht/python-rocksdb",
def _get_long_description():
with open('README.rst') as readme_file:
return readme_file.read()


setuptools.setup(
name='rocksdb',
version='0.8.0rc1',
description='Python bindings for RocksDB',
long_description=_get_long_description(),
long_description_content_type='text/x-rst',
author='Andrey Martyanov',
author_email='[email protected]',
url='https://github.com/martyanov/python-rocksdb',
license='BSD License',
setup_requires=['setuptools>=25', 'Cython>=0.20'],
install_requires=['setuptools>=25'],
package_dir={'rocksdb': 'rocksdb'},
packages=find_packages('.'),
ext_modules=[Extension(
'rocksdb._rocksdb',
['rocksdb/_rocksdb.pyx'],
extra_compile_args=extra_compile_args,
language='c++',
libraries=['rocksdb', 'snappy', 'bz2', 'z', 'lz4'],
)],
extras_require={
"doc": ['sphinx_rtd_theme', 'sphinx'],
"test": ['pytest'],
license_file='LICENSE',
packages=setuptools.find_packages('.'),
package_dir={
'rocksdb': 'rocksdb',
},
include_package_data=True,
ext_modules=[
setuptools.Extension(
'rocksdb._rocksdb',
[
'rocksdb/_rocksdb.pyx',
],
extra_compile_args=extra_compile_args,
language='c++',
libraries=[
'rocksdb',
'snappy',
'bz2',
'z',
'lz4',
],
),
],
setup_requires=[
'cython>=0.20',
'setuptools>=25',
],
install_requires=[
'setuptools>=25',
],
extras_require={
'doc': [
'sphinx',
'sphinx_rtd_theme',
],
'test': [
'pytest',
],
},
zip_safe=False,
keywords='rocksdb bindings',
classifiers=[
'Development Status :: 3 - Alpha',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Database',
],
project_urls={
'Bug Reports': 'https://github.com/martyanov/python-rocksdb/issues',
'Repository': 'https://github.com/martyanov/python-rocksdb',
},
)

0 comments on commit c44ecb6

Please sign in to comment.