Skip to content
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
17 changes: 10 additions & 7 deletions src/sage/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,17 +384,20 @@ def sage_include_directories(use_sources=False):
sage: any(os.path.isfile(os.path.join(d, file)) for d in dirs)
True
"""
import distutils.sysconfig

TOP = SAGE_SRC if use_sources else SAGE_LIB

dirs = [TOP,
distutils.sysconfig.get_python_inc()]
if use_sources:
dirs = [SAGE_SRC]
else:
import sage
dirs = [os.path.dirname(directory)
for directory in sage.__path__]
try:
import numpy
dirs.insert(1, numpy.get_include())
dirs.append(numpy.get_include())
except ModuleNotFoundError:
pass

dirs.append(sysconfig.get_config_var('INCLUDEPY'))

return dirs

def get_cblas_pc_module_name() -> str:
Expand Down