Merge pull request #20 from metachris/osx-support

OSX support for building, simple update in setup.py
This commit is contained in:
Ming-Hsuan-Tu 2018-01-25 12:46:43 +08:00 committed by GitHub
commit 8b8781f450
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,3 +1,4 @@
import platform
from setuptools import setup
from setuptools import find_packages
from distutils.extension import Extension
@ -10,17 +11,22 @@ except ImportError:
else:
sources = ['rocksdb/_rocksdb.pyx']
mod1 = Extension(
'rocksdb._rocksdb',
sources,
extra_compile_args=[
extra_compile_args = [
'-std=c++11',
'-O3',
'-Wall',
'-Wextra',
'-Wconversion',
'-fno-strict-aliasing'
],
]
if platform.system() == 'Darwin':
extra_compile_args += ['-mmacosx-version-min=10.7', '-stdlib=libc++']
mod1 = Extension(
'rocksdb._rocksdb',
sources,
extra_compile_args=extra_compile_args,
language='c++',
libraries=[
'rocksdb',