diff --git a/CMakeLists.txt b/CMakeLists.txt index 6de20290cdb6eed443d70b9fe3a06974bf91dd7c..5d4e3c27271876bd9cc231485f62f8041f7dd54a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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!) diff --git a/python/waLBerla/tools/lbm_unitconversion/pint_unit_converter.py b/python/waLBerla/tools/lbm_unitconversion/pint_unit_converter.py index 83b6ab0f982007f5ae363472799155fc553d2c25..eec47971e6dd4da1f96e86d86d465ce9141d7022 100644 --- a/python/waLBerla/tools/lbm_unitconversion/pint_unit_converter.py +++ b/python/waLBerla/tools/lbm_unitconversion/pint_unit_converter.py @@ -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