Commit cb331d8f authored by Martin Bauer's avatar Martin Bauer
Browse files

Merge branch 'mergeRequest' into 'master'

Python: 3.7 support for MSVC; bug fix in unit conversion

See merge request walberla/walberla!227
parents afe97cab 9daab0c3
......@@ -647,7 +647,8 @@ else()
endif()
if ( WALBERLA_BUILD_WITH_PYTHON AND WALBERLA_CXX_COMPILER_IS_MSVC )
list( APPEND waLBerla_REQUIRED_BOOST_COMPONENTS python36 )
get_filename_component(PYTHON_REQUIRED_LIB ${PYTHON_LIBRARY} NAME_WE)
list( APPEND waLBerla_REQUIRED_BOOST_COMPONENTS ${PYTHON_REQUIRED_LIB} )
endif()
# This variable is necessary, if the CMAKE version used is not aware of a more recent boost version (keep this up to date!)
......
......@@ -113,12 +113,12 @@ class PintUnitConverter:
elif type(value) is tuple:
try:
result[key] = tuple( [ self.ureg.Quantity(e) for e in value ] )
except (pint.unit.UndefinedUnitError, ValueError, TypeError):
except (pint.UndefinedUnitError, ValueError, TypeError):
result[key] = value
else:
try:
result[key] = self.ureg.Quantity( value )
except (pint.unit.UndefinedUnitError, ValueError, TypeError):
except (pint.UndefinedUnitError, ValueError, TypeError):
result[key] = value
return result
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment