Skip to content
Snippets Groups Projects
Commit 8481bc24 authored by hofmockel's avatar hofmockel
Browse files

Only 'cythonize' if Cython is installed.

parent 61e8ae76
No related branches found
No related tags found
No related merge requests found
from setuptools import setup
from setuptools import find_packages
from distutils.extension import Extension
from Cython.Build import cythonize
try:
from Cython.Build import cythonize
except ImportError:
def cythonize(extensions): return extensions
sources = ['rocksdb/_rocksdb.cpp']
else:
sources = ['rocksdb/_rocksdb.pyx']
mod1 = Extension(
'rocksdb._rocksdb',
['rocksdb/_rocksdb.pyx'],
sources,
extra_compile_args=[
'-std=c++11',
'-O3',
......@@ -32,10 +39,7 @@ setup(
author_email="Use the github issues",
url="https://github.com/stephan-hof/pyrocksdb",
license='BSD License',
install_requires=[
'setuptools',
'Cython>=0.20',
],
install_requires=['setuptools'],
package_dir={'rocksdb': 'rocksdb'},
packages=find_packages('.'),
ext_modules=cythonize([mod1]),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment