From b3ad12a079a7a7a3ef0020630a074f9e68ae55f0 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Wed, 17 Apr 2024 12:00:23 +0200 Subject: [PATCH] bos #41189 - PyFMI 2.6.0 windows build --- products/compil_scripts/PyFMI-2.6.bat | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/products/compil_scripts/PyFMI-2.6.bat b/products/compil_scripts/PyFMI-2.6.bat index fff8441..4a78670 100644 --- a/products/compil_scripts/PyFMI-2.6.bat +++ b/products/compil_scripts/PyFMI-2.6.bat @@ -15,16 +15,17 @@ if NOT exist "%PRODUCT_INSTALL%" mkdir %PRODUCT_INSTALL% REM clean BUILD directory if exist "%BUILD_DIR%" rmdir /Q /S %BUILD_DIR% mkdir %BUILD_DIR% - cd %SOURCE_DIR% - +xcopy * %BUILD_DIR%\ /E /I /Q +cd %BUILD_DIR% +del /Q /S %BUILD_DIR%\src\pyfmi\*.c set INSTALL_LIB=%PRODUCT_INSTALL%\lib\python%PYTHON_VERSION%\site-packages if NOT exist "%INSTALL_LIB%" mkdir %INSTALL_LIB% set PYTHONPATH=%INSTALL_LIB%;%PYTHONPATH% echo. echo ########################################################################## -echo *** Launching "python.exe setup.py build" +echo *** Launching python.exe setup.py build echo ########################################################################## %PYTHON_ROOT_DIR%\python.exe setup.py build --build-base %BUILD_DIR% --build-temp %BUILD_DIR% @@ -35,13 +36,18 @@ if NOT %ERRORLEVEL% == 0 ( echo. echo ########################################################################## -echo *** Launching "python.exe setup.py install" +echo *** Launching python.exe setup.py install echo ########################################################################## +SET SETUP_EXTRA_OPTIONS=--old-and-unmanageable +if %PYTHON_VERSION% == 3.6 ( + SET SETUP_EXTRA_OPTIONS= +) + if %INSTALL_CENTRALLY% == 1 ( - %PYTHON_ROOT_DIR%\python.exe setup.py install + %PYTHON_ROOT_DIR%\python.exe setup.py install %SETUP_EXTRA_OPTIONS% ) else ( - %PYTHON_ROOT_DIR%\python.exe setup.py install --prefix=%PRODUCT_INSTALL% --install-lib=%INSTALL_LIB% + %PYTHON_ROOT_DIR%\python.exe setup.py install --prefix=%PRODUCT_INSTALL% --install-lib=%INSTALL_LIB% %SETUP_EXTRA_OPTIONS% ) if NOT %ERRORLEVEL% == 0 ( -- 2.39.2