Skip to content

Commit

Permalink
Merge pull request #224 from lgarrison/patch-1
Browse files Browse the repository at this point in the history
Fix pip install failure from accessing cpu_info when it is None
  • Loading branch information
FrancescAlted authored Apr 10, 2020
2 parents c8ae646 + e3f80ed commit 125e3dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def cmake_bool(cond):
platforms = ['any'],
cmake_args = [
'-DBLOSC_DIR:PATH=%s' % os.environ.get('BLOSC_DIR', ''),
'-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool('DISABLE_BLOSC_SSE2' in os.environ or 'sse2' not in cpu_info['flags']),
'-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool('DISABLE_BLOSC_AVX2' in os.environ),
'-DDEACTIVATE_SSE2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_SSE2' in os.environ) or (cpu_info is None) or ('sse2' not in cpu_info['flags'])),
'-DDEACTIVATE_AVX2:BOOL=%s' % cmake_bool(('DISABLE_BLOSC_AVX2' in os.environ) or (cpu_info is None) or ('avx2' not in cpu_info['flags'])),
'-DDEACTIVATE_LZ4:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_LZ4', '1'))),
# Snappy is disabled by default
'-DDEACTIVATE_SNAPPY:BOOL=%s' % cmake_bool(not int(os.environ.get('INCLUDE_SNAPPY', '0'))),
Expand Down

0 comments on commit 125e3dd

Please sign in to comment.