Skip to content

Commit 09b3ed1

Browse files
committed
Simplified check for sympy
1 parent 4e84649 commit 09b3ed1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

site_scons/dependencies.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,10 @@ def checkOptionalModules(env):
455455
env['warnings'].append("Cannot import sympy. Symbolic toolbox and nonlinear PDEs will not be available.")
456456
env.Append(CPPDEFINES = ['ESYS_NO_SYMPY'])
457457
else:
458-
if env['pythoncmd'] is not None:
459-
env=get_external_python_sympy(env, env['pythoncmd'])
460-
else:
458+
# if env['pythoncmd'] is not None:
459+
# env=get_external_python_sympy(env, env['pythoncmd'])
460+
# else:
461+
try:
461462
import sympy as sp
462463
import distutils.version as duv
463464
spVer=sp.__version__
@@ -492,6 +493,9 @@ def checkOptionalModules(env):
492493
else:
493494
env['sympy']=True
494495
env['warnings'].append("Found sympy version %s" % spVer)
496+
except:
497+
env['sympy']=False
498+
env['warnings'].append("Could not find sympy")
495499

496500
######## gmshpy
497501
env['gmshpy'] = detectModule(env, 'gmshpy')

0 commit comments

Comments
 (0)