From c44ecb69fdaff4e95279d705413bb63375270723 Mon Sep 17 00:00:00 2001 From: Andrey Martyanov <andrey@martyanov.com> Date: Mon, 14 Dec 2020 16:26:05 +0600 Subject: [PATCH] Attribution and packaging changes --- LICENSE.md => LICENSE | 0 README.rst | 46 ++++++++++----------- setup.py | 93 +++++++++++++++++++++++++++++++------------ 3 files changed, 90 insertions(+), 49 deletions(-) rename LICENSE.md => LICENSE (100%) diff --git a/LICENSE.md b/LICENSE similarity index 100% rename from LICENSE.md rename to LICENSE diff --git a/README.rst b/README.rst index 4557382..e2c306b 100644 --- a/README.rst +++ b/README.rst @@ -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. @@ -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 diff --git a/setup.py b/setup.py index 6b4dfc4..19e55d2 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,5 @@ import platform -from setuptools import setup -from setuptools import find_packages -from setuptools import Extension +import setuptools extra_compile_args = [ @@ -14,34 +12,79 @@ extra_compile_args = [ '-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="qrnnis2623891@gmail.com", - 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='andrey@martyanov.com', + 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', + }, ) -- GitLab