Skip to content
Snippets Groups Projects
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
Branches
Tags
No related merge requests found
...@@ -647,7 +647,8 @@ else() ...@@ -647,7 +647,8 @@ else()
endif() endif()
if ( WALBERLA_BUILD_WITH_PYTHON AND WALBERLA_CXX_COMPILER_IS_MSVC ) 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() endif()
# This variable is necessary, if the CMAKE version used is not aware of a more recent boost version (keep this up to date!) # 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: ...@@ -113,12 +113,12 @@ class PintUnitConverter:
elif type(value) is tuple: elif type(value) is tuple:
try: try:
result[key] = tuple( [ self.ureg.Quantity(e) for e in value ] ) 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 result[key] = value
else: else:
try: try:
result[key] = self.ureg.Quantity( value ) result[key] = self.ureg.Quantity( value )
except (pint.unit.UndefinedUnitError, ValueError, TypeError): except (pint.UndefinedUnitError, ValueError, TypeError):
result[key] = value result[key] = value
return result return result
......
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