Skip to content

Commit 8d7a2dd

Browse files
authored
Merge pull request #19 from mossman/otherarch
handle exceptions from cpu_info so non-x86 and ARMs compile
2 parents 163f181 + 81f91f4 commit 8d7a2dd

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

setup.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
from setuptools.extension import Extension
1010
from setuptools.dist import Distribution
1111
from os.path import join, dirname
12-
from cpuinfo import get_cpu_info
1312

14-
15-
cpu_info = get_cpu_info()
16-
have_sse42 = 'sse4.2' in cpu_info['flags']
13+
try:
14+
from cpuinfo import get_cpu_info
15+
cpu_info = get_cpu_info()
16+
have_sse42 = 'sse4.2' in cpu_info['flags']
17+
except Exception:
18+
have_sse42 = False
1719

1820
try:
1921
from Cython.Distutils import build_ext

0 commit comments

Comments
 (0)