Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update include path for compatibility with numpy 2. #562

Merged
merged 1 commit into from
Sep 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,18 @@
numpy_found = 0
try:
import numpy
include_path = os.path.join(numpy.__path__[0], 'core', 'include')
if os.path.exists(include_path):
print('numpy include found at', include_path)
numpy1_include_path = os.path.join(numpy.__path__[0], 'core', 'include')
numpy2_include_path = os.path.join(numpy.__path__[0], '_core', 'include')
if os.path.exists(numpy1_include_path):
print('numpy include found at', numpy1_include_path)
numpy_found = 1
numpy_include = [include_path]
numpy_include = [numpy1_include_path]
elif os.path.exists(numpy2_include_path):
print('numpy include found at', numpy2_include_path)
numpy_found = 1
numpy_include = [numpy2_include_path]
else:
print('numpy include not found')
except ImportError:
print('numpy not found, running without numpy support')

Expand Down