From 09ed3720d0e28aba5a7a8f9a2341e905a77f6b1e Mon Sep 17 00:00:00 2001 From: bab2min Date: Wed, 31 Jul 2024 19:57:33 +0900 Subject: [PATCH] Fix compilation errors --- CMakeLists.txt | 1 + requirements.txt | 2 +- setup.py | 5 ++++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cc4fba6..2e04595 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ if(MSVC) set (ADDITIONAL_FLAGS "") elseif (TARGET_ARCH STREQUAL "sse2") set (ADDITIONAL_FLAGS "/arch:SSE2") + add_definitions(-D__SSE2__) elseif (TARGET_ARCH STREQUAL "avx") set (ADDITIONAL_FLAGS "/arch:AVX") elseif (TARGET_ARCH STREQUAL "avx2") diff --git a/requirements.txt b/requirements.txt index 152d9da..7e6c5fa 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1 +1 @@ -numpy>=1.10.0 \ No newline at end of file +numpy>=1.10.0,<2 \ No newline at end of file diff --git a/setup.py b/setup.py index 3844654..cccd77e 100644 --- a/setup.py +++ b/setup.py @@ -212,7 +212,10 @@ def build_extension(self, ext): # if target is in 64bit, remove 'none' if struct.calcsize("P") == 8: - arch_levels.remove('none') + try: + arch_levels.remove('none') + except ValueError: + pass modules = [] if len(arch_levels) > 1: