2015-08-16 11:18:18 +02:00
|
|
|
from setuptools import setup
|
|
|
|
from setuptools import find_packages
|
2014-01-13 19:52:22 +01:00
|
|
|
from distutils.extension import Extension
|
2015-08-16 12:17:47 +02:00
|
|
|
|
|
|
|
try:
|
|
|
|
from Cython.Build import cythonize
|
|
|
|
except ImportError:
|
|
|
|
def cythonize(extensions): return extensions
|
|
|
|
sources = ['rocksdb/_rocksdb.cpp']
|
|
|
|
else:
|
|
|
|
sources = ['rocksdb/_rocksdb.pyx']
|
2014-01-13 19:52:22 +01:00
|
|
|
|
2015-08-16 11:18:18 +02:00
|
|
|
mod1 = Extension(
|
|
|
|
'rocksdb._rocksdb',
|
2015-08-16 12:17:47 +02:00
|
|
|
sources,
|
2015-08-16 11:18:18 +02:00
|
|
|
extra_compile_args=[
|
2015-07-20 08:03:09 +02:00
|
|
|
'-std=c++11',
|
2014-01-13 19:52:22 +01:00
|
|
|
'-O3',
|
|
|
|
'-Wall',
|
|
|
|
'-Wextra',
|
|
|
|
'-Wconversion',
|
|
|
|
'-fno-strict-aliasing'
|
|
|
|
],
|
2015-08-16 11:18:18 +02:00
|
|
|
language='c++',
|
|
|
|
libraries=[
|
2014-01-26 13:32:23 +01:00
|
|
|
'rocksdb',
|
|
|
|
'snappy',
|
2014-01-13 19:52:22 +01:00
|
|
|
'bz2',
|
2014-01-26 13:32:23 +01:00
|
|
|
'z'
|
2014-01-13 19:52:22 +01:00
|
|
|
]
|
|
|
|
)
|
|
|
|
|
|
|
|
setup(
|
2017-03-23 15:13:45 +01:00
|
|
|
name="python-rocksdb",
|
2017-04-23 13:33:42 +02:00
|
|
|
version='0.6.5',
|
2014-02-02 17:40:55 +01:00
|
|
|
description="Python bindings for RocksDB",
|
|
|
|
keywords='rocksdb',
|
2017-03-23 15:13:45 +01:00
|
|
|
author='Ming Hsuan Tu',
|
2014-02-02 17:40:55 +01:00
|
|
|
author_email="Use the github issues",
|
2017-04-23 13:33:42 +02:00
|
|
|
url="https://github.com/twmht/python-rocksdb",
|
2014-02-02 17:40:55 +01:00
|
|
|
license='BSD License',
|
2015-08-16 12:17:47 +02:00
|
|
|
install_requires=['setuptools'],
|
2014-01-13 19:52:22 +01:00
|
|
|
package_dir={'rocksdb': 'rocksdb'},
|
|
|
|
packages=find_packages('.'),
|
|
|
|
ext_modules=cythonize([mod1]),
|
|
|
|
test_suite='rocksdb.tests',
|
|
|
|
include_package_data=True
|
|
|
|
)
|