Skip to content

Commit 928398a

Browse files
authored
Better fix for no AVX2 on windows PY27
1 parent 2900620 commit 928398a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
have_avx2 = 'avx2' in flags
3030
disable_sse2 = 'DISABLE_NUMCODECS_SSE2' in os.environ
3131
disable_avx2 = 'DISABLE_NUMCODECS_AVX2' in os.environ
32-
32+
if PY2 and os.name == 'nt':
33+
# force no AVX2 on windows PY27
34+
disable_avx2 = True
3335

3436
# setup common compile arguments
3537
have_cflags = 'CFLAGS' in os.environ
@@ -105,7 +107,7 @@ def blosc_extension():
105107
info('compiling Blosc extension with AVX2 support')
106108
extra_compile_args.append('-DSHUFFLE_AVX2_ENABLED')
107109
blosc_sources += [f for f in glob('c-blosc/blosc/*.c') if 'avx2' in f]
108-
if os.name == 'nt' and not PY2:
110+
if os.name == 'nt':
109111
define_macros += [('__AVX2__', 1)]
110112
else:
111113
info('compiling Blosc extension without AVX2 support')

0 commit comments

Comments
 (0)