From: Nabil Ghodbane Date: Mon, 5 Aug 2024 09:30:56 +0000 (+0200) Subject: spns #42665: MeshIO: GMSH and ANSYS - ensure meshio-script bootstraps Python X-Git-Tag: V9_13_0~11 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=0c7b6374e10130a882e19e8582eb1e3611577ac5;p=tools%2Fsat_salome.git spns #42665: MeshIO: GMSH and ANSYS - ensure meshio-script bootstraps Python --- diff --git a/products/compil_scripts/meshio-5.3.5.bat b/products/compil_scripts/meshio-5.3.5.bat index 457c21c..49818d9 100644 --- a/products/compil_scripts/meshio-5.3.5.bat +++ b/products/compil_scripts/meshio-5.3.5.bat @@ -14,6 +14,9 @@ cd %SOURCE_DIR% xcopy * %BUILD_DIR%\ /E /I /Q cd %BUILD_DIR% +REM Ensure that meshio is not present. +%PYTHON_ROOT_DIR%\python.exe -m pip uninstall -y meshio + %PYTHON_ROOT_DIR%\python.exe setup.py install if NOT %ERRORLEVEL% == 0 ( echo ERROR on python setup.py @@ -24,5 +27,13 @@ echo. echo Product %PRODUCT_NAME% version: %VERSION%> %PRODUCT_INSTALL%\README.txt echo Installation folder: %PYTHON_ROOT_DIR%>> %PRODUCT_INSTALL%\README.txt +REM Fix Python path +cd %PYTHONHOME%\Scripts +powershell -Command "(Get-Content meshio-script.py).replace('%PYTHONBIN%','python3.exe') |Set-Content meshio-script.py" +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on powershell command. + exit 3 +) + echo. echo ########## END