Skip to content

Commit 125e3dd

Browse files
Merge pull request #224 from lgarrison/patch-1
Fix pip install failure from accessing cpu_info when it is None
2 parents c8ae646 + e3f80ed commit 125e3dd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ def cmake_bool(cond):
8787
platforms = ['any'],
8888
cmake_args = [
8989
'-DBLOSC_DIR:PATH=%s' % os.environ.get('BLOSC_DIR', ''),
90-
'-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool('DISABLE_BLOSC_SSE2' in os.environ or 'sse2' not in cpu_info['flags']),
91-
'-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool('DISABLE_BLOSC_AVX2' in os.environ),
90+
'-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_SSE2' in os.environ) or (cpu_info is None) or ('sse2' not in cpu_info['flags'])),
91+
'-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_AVX2' in os.environ) or (cpu_info is None) or ('avx2' not in cpu_info['flags'])),
9292
'-DDEACTIVATE_LZ4:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_LZ4', '1'))),
9393
# Snappy is disabled by default
9494
'-DDEACTIVATE_SNAPPY:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_SNAPPY', '0'))),

0 commit comments

Comments
 (0)