Skip to content

Commit 6efa48c

Browse files
Dmitry YashuninDmitry Yashunin
authored andcommitted
Add symlink to setup.py instead of hnswlib
1 parent afd18d2 commit 6efa48c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

python_bindings/hnswlib

Lines changed: 0 additions & 1 deletion
This file was deleted.

python_bindings/setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../setup.py

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,15 @@
66

77
__version__ = '0.4.0'
88

9+
# compatibility when run in python_bindings
10+
bindings_dir = 'python_bindings'
11+
if bindings_dir in os.path.basename(os.getcwd()):
12+
source_files = ['./bindings.cpp']
13+
include_dirs = ['../hnswlib/']
14+
else:
15+
source_files = ['./python_bindings/bindings.cpp']
16+
include_dirs = ['./hnswlib/']
917

10-
source_files = ['./python_bindings/bindings.cpp']
11-
include_dirs = ['./hnswlib/']
1218

1319
libraries = []
1420
extra_objects = []

0 commit comments

Comments
 (0)