Skip to content

Commit 17d6788

Browse files
committed
Merge branch 'master' of github.com:mattilyra/suckerpunch
2 parents 19c6958 + fb63a14 commit 17d6788

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ setup.py
1212

1313
NumPy is needed to run the code.
1414

15-
The MurmurHash3 library is distributed under the MIT license. More information https://code.google.com/smhasher
15+
The MurmurHash3 library is distributed under the MIT license. More information https://github.com/aappleby/smhasher
1616

1717

1818
installation

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from __future__ import print_function
33

44
from setuptools import setup, Extension
5-
import numpy as np
65

76
USE_CYTHON = False
87

@@ -17,9 +16,15 @@
1716
VERSION = '0.3.0'
1817

1918
ext = '.pyx' if USE_CYTHON else '.cpp'
19+
try:
20+
import numpy as np
21+
includes = [np.get_include()]
22+
except ImportError:
23+
includes = []
24+
2025
extensions = [Extension("lsh.cMinhash",
2126
["lsh/cMinhash{}".format(ext), 'lsh/MurmurHash3.cpp'],
22-
include_dirs=[np.get_include()])]
27+
include_dirs=includes)]
2328
if USE_CYTHON:
2429
from Cython.Build import cythonize
2530

0 commit comments

Comments
 (0)