lbry-rocksdb/setup.py

49 lines
1.1 KiB
Python
Raw Normal View History

from setuptools import setup
from setuptools import find_packages
2014-01-13 19:52:22 +01:00
from distutils.extension import Extension
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
mod1 = Extension(
'rocksdb._rocksdb',
sources,
extra_compile_args=[
'-std=c++11',
2014-01-13 19:52:22 +01:00
'-O3',
'-Wall',
'-Wextra',
'-Wconversion',
'-fno-strict-aliasing'
],
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(
name="pyrocksdb",
2015-07-05 13:58:26 +02:00
version='0.4',
2014-02-02 17:40:55 +01:00
description="Python bindings for RocksDB",
keywords='rocksdb',
author='Stephan Hofmockel',
author_email="Use the github issues",
url="https://github.com/stephan-hof/pyrocksdb",
license='BSD License',
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
)