From 9505f49a0242bb3adef01db6c220ccca47716c59 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Fri, 12 Apr 2024 16:21:28 +0200 Subject: [PATCH] bos #41189 - support embedded Python 3.9 - Windows - by default target 3.6 --- applications/SALOME-master-windows.pyconf | 2 +- products/compil_scripts/sphinxintl-2.0.0.bat | 61 ++++++++++++++++++++ products/sphinxintl.pyconf | 2 +- 3 files changed, 63 insertions(+), 2 deletions(-) create mode 100755 products/compil_scripts/sphinxintl-2.0.0.bat diff --git a/applications/SALOME-master-windows.pyconf b/applications/SALOME-master-windows.pyconf index cc619ad..c823829 100644 --- a/applications/SALOME-master-windows.pyconf +++ b/applications/SALOME-master-windows.pyconf @@ -12,7 +12,7 @@ APPLICATION : debug : 'no' base : 'no' python3 : 'yes' - pyver : '3.9' + pyver : '3.6' environ : { build : diff --git a/products/compil_scripts/sphinxintl-2.0.0.bat b/products/compil_scripts/sphinxintl-2.0.0.bat new file mode 100755 index 0000000..f712aa2 --- /dev/null +++ b/products/compil_scripts/sphinxintl-2.0.0.bat @@ -0,0 +1,61 @@ +@echo off + +echo ########################################################################## +echo sphinxintl %VERSION% +echo ########################################################################## + +REM install in python directly +SET INSTALL_CENTRALLY=1 + +IF NOT DEFINED SAT_DEBUG ( + SET SAT_DEBUG=0 +) + +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% + +echo. +echo -------------------------------------------------------------------------- +echo Launching "python.exe setup.py build" +echo -------------------------------------------------------------------------- +set BUILD_OPT= +if %SAT_DEBUG% == 1 ( + set BUILD_OPT=--debug +) + +%PYTHON_ROOT_DIR%\python.exe setup.py build %BUILD_OPT% + +echo. +echo -------------------------------------------------------------------------- +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 ( + %PYTHONBIN% setup.py build %BUILD_OPT% install %SETUP_EXTRA_OPTIONS% +) else ( + %PYTHONBIN% setup.py build %BUILD_OPT% install --prefix=%PRODUCT_INSTALL% %SETUP_EXTRA_OPTIONS% +) +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on sphinxintl + exit 1 +) + +if NOT %ERRORLEVEL% == 0 ( + echo ERROR on setup.py install + exit 3 +) + +echo. +echo Product %PRODUCT_NAME% version: %VERSION%> %PRODUCT_INSTALL%\README.txt +echo Installation folder: %PYTHON_ROOT_DIR%>> %PRODUCT_INSTALL%\README.txt + +echo. +echo ########## END diff --git a/products/sphinxintl.pyconf b/products/sphinxintl.pyconf index db66f48..e87df9b 100644 --- a/products/sphinxintl.pyconf +++ b/products/sphinxintl.pyconf @@ -38,7 +38,7 @@ version_2_0_0_win_dbg : { name : "sphinx_intl" build_source : "script" - compil_script : 'sphinxintl.bat' + compil_script : 'sphinxintl-2.0.0.bat' archive_info : {archive_name : "sphinxintl-2.0.0.tar.gz"} get_source : "archive" environ : -- 2.39.2