Skip to content

Commit

Permalink
Include numpy headers
Browse files Browse the repository at this point in the history
  • Loading branch information
grihabor committed Sep 18, 2018
1 parent d1e9ca4 commit 9e2b2ea
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import numpy
from pprint import pprint
from urllib.request import urlretrieve
import sys
Expand Down Expand Up @@ -44,7 +45,7 @@ def build_extension(self, ext):
ext = [Extension(name='.'.join(['ivfhnsw', '_' + name]),
sources=[os.path.join('interface', '.'.join([name, 'i']))],
swig_opts=['-Iinclude', '-c++'],
include_dirs=['include', os.curdir],
include_dirs=['include', os.curdir, numpy.get_include()],
libraries=['ivfhnsw', 'hnswlib', 'faiss', 'gomp', 'lapack',],
extra_compile_args=['-std=c++11', '-static'],)
for name in names]
Expand All @@ -56,7 +57,10 @@ def build_extension(self, ext):
ext_modules=ext,
package_dir={'': python_src},
packages=find_packages(python_src),
setup_requires=['pytest-runner'],
setup_requires=[
'pytest-runner',
'numpy',
],
install_requires=[
'numpy',
],
Expand Down

0 comments on commit 9e2b2ea

Please sign in to comment.