mirror of
https://github.com/Cantera/cantera.git
synced 2025-02-25 18:55:29 -06:00
Fixed discovery of Numpy directories under Windows
This commit is contained in:
@@ -7,10 +7,13 @@ localenv = env.Clone()
|
||||
|
||||
gcv = distutils.sysconfig.get_config_var
|
||||
|
||||
localenv.Append(CPPPATH=[gcv('INCLUDEPY')],
|
||||
localenv.Append(CPPPATH=[gcv('INCLUDEPY'), env['python_array_include']],
|
||||
SHLINKFLAGS=gcv('LDFLAGS'),
|
||||
CPPFLAGS=[gcv('BASECFLAGS'), gcv('OPT')])
|
||||
|
||||
if localenv['OS'] == 'Windows':
|
||||
localenv.Append(LIBPATH=pjoin(gcv('prefix'), 'libs'))
|
||||
|
||||
make_setup = localenv.SubstFile('setup.py', 'setup.py.in')
|
||||
|
||||
if env['python_package'] == 'full':
|
||||
|
||||
@@ -467,7 +467,13 @@ if env['python_package'] in ('full','default'):
|
||||
if env['python_array_home']:
|
||||
sys.path.append(env['python_array_home'])
|
||||
try:
|
||||
__import__(env['python_array'])
|
||||
np = __import__(env['python_array'])
|
||||
try:
|
||||
env['python_array_include'] = np.get_include()
|
||||
except AttributeError:
|
||||
print """WARNING: Couldn't find include directory for Python array package"""
|
||||
env['python_array_include'] = ''
|
||||
|
||||
print """INFO: Building the full Python package using %s.""" % env['python_array']
|
||||
env['python_package'] = 'full'
|
||||
except ImportError:
|
||||
|
||||
Reference in New Issue
Block a user