diff --git a/language-extensions/python/README.md b/language-extensions/python/README.md index 0b6e9ec..0b12e9a 100644 --- a/language-extensions/python/README.md +++ b/language-extensions/python/README.md @@ -65,7 +65,7 @@ B. Installing needed packages from respective sources. 1. Install the package numpy into your python. This is needed to build boost_numpy in the next step. -1. Download and build [Boost Python](https://www.boost.org/doc/libs/1_87_0/libs/python/doc/html/building/no_install_quickstart.html) with your version of Python. Make sure to build the static libraries. +1. Download and build [Boost Python](https://www.boost.org/doc/libs/1_90_0/libs/python/doc/html/building/no_install_quickstart.html) with your version of Python. Make sure to build the static libraries. 1. Set PYTHONHOME and BOOST_ROOT to point to your python installation and boost build folder respectively. diff --git a/language-extensions/python/build/linux/build-python-extension.sh b/language-extensions/python/build/linux/build-python-extension.sh index 4965253..edd3033 100644 --- a/language-extensions/python/build/linux/build-python-extension.sh +++ b/language-extensions/python/build/linux/build-python-extension.sh @@ -72,7 +72,7 @@ PYTHONEXTENSION_WORKING_DIR=${ENL_ROOT}/build-output/pythonextension/linux INCLUDE_ROOT=/usr/local/include DEFAULT_PYTHONHOME=/usr/local -DEFAULT_BOOST_ROOT=/usr/local/lib/boost_1_87_0 +DEFAULT_BOOST_ROOT=/usr/local/lib/boost_1_90_0 # Find PYTHONHOME from user, or set to default for tests. # Error code 1 is generic bash error. diff --git a/language-extensions/python/build/linux/restore-packages.sh b/language-extensions/python/build/linux/restore-packages.sh index 2e004dc..99855c6 100644 --- a/language-extensions/python/build/linux/restore-packages.sh +++ b/language-extensions/python/build/linux/restore-packages.sh @@ -11,8 +11,8 @@ add-apt-repository -y ppa:deadsnakes/ppa apt-get update DEFAULT_PYTHONHOME=/usr -BOOST_VERSION=1.87.0 -BOOST_VERSION_IN_UNDERSCORE=1_87_0 +BOOST_VERSION=1.90.0 +BOOST_VERSION_IN_UNDERSCORE=1_90_0 PYTHON_VERSION=3.12 NUMPY_VERSION=2.3.0 PANDAS_VERSION=2.3.0 diff --git a/language-extensions/python/build/windows/build-python-extension.cmd b/language-extensions/python/build/windows/build-python-extension.cmd index 4741238..f32a1da 100644 --- a/language-extensions/python/build/windows/build-python-extension.cmd +++ b/language-extensions/python/build/windows/build-python-extension.cmd @@ -11,8 +11,8 @@ SET PYTHONEXTENSION_WORKING_DIR=%ENL_ROOT%\build-output\pythonextension\windows IF EXIST %PYTHONEXTENSION_WORKING_DIR% (RMDIR /s /q %PYTHONEXTENSION_WORKING_DIR%) MKDIR %PYTHONEXTENSION_WORKING_DIR% -SET BOOST_VERSION=1.79.0 -SET BOOST_VERSION_IN_UNDERSCORE=1_79_0 +SET BOOST_VERSION=1.90.0 +SET BOOST_VERSION_IN_UNDERSCORE=1_90_0 SET DEFAULT_BOOST_ROOT=%PACKAGES_ROOT%\boost_%BOOST_VERSION_IN_UNDERSCORE% SET DEFAULT_BOOST_PYTHON_ROOT=%DEFAULT_BOOST_ROOT%\stage\lib SET DEFAULT_PYTHONHOME=C:\Python310 diff --git a/language-extensions/python/build/windows/restore-packages.cmd b/language-extensions/python/build/windows/restore-packages.cmd index 7df4e83..809b318 100644 --- a/language-extensions/python/build/windows/restore-packages.cmd +++ b/language-extensions/python/build/windows/restore-packages.cmd @@ -16,8 +16,8 @@ SET PYTHON_VERSION_NO_DOT=310 REM Specify the Boost version to be downloaded and installed REM -SET BOOST_VERSION=1.79.0 -SET BOOST_VERSION_IN_UNDERSCORE=1_79_0 +SET BOOST_VERSION=1.90.0 +SET BOOST_VERSION_IN_UNDERSCORE=1_90_0 REM Download and install Python from the official Python website REM @@ -87,19 +87,26 @@ echo %PACKAGES_ROOT% pushd %PACKAGES_ROOT%\boost_%BOOST_VERSION_IN_UNDERSCORE% echo %cd% dir -echo create user config jam -REM Create a Boost user-config.jam configuration file for building Boost.Python -REM -echo using python : %PYTHON_VERSION_MAJOR_MINOR% : "%PYTHON_INSTALLATION_PATH_DOUBLE_SLASH%\\python" : "%PYTHON_INSTALLATION_PATH_DOUBLE_SLASH%\\include" : "%PYTHON_INSTALLATION_PATH_DOUBLE_SLASH%\\libs" ; > user-config.jam - -REM Run Boost's bootstrap script and build Boost.Python with the created configuration +REM Run Boost's bootstrap script to build the b2 build engine REM Explicitly set VS2019 Compiler tooling REM bootstrap - "vc142" REM b2.exe "toolset=msvc-14.2" echo -- Beginning Boost b2.exe build -- Time: %time% -- CALL bootstrap.bat vc142 -echo -- Beginning Boost build using compiled b2.exe-- Time: %time% -- -b2.exe -j12 --prefix=%PACKAGES_ROOT%\output --with-python --user-config="%PACKAGES_ROOT%\boost_%BOOST_VERSION_IN_UNDERSCORE%\user-config.jam" --debug-configuration -dp0 toolset=msvc-14.2 + +REM bootstrap.bat may change the working directory (e.g. into tools\build\src\engine). +REM Restore it to the Boost root so b2.exe can find Jamroot and build correctly. +REM +cd /d %PACKAGES_ROOT%\boost_%BOOST_VERSION_IN_UNDERSCORE% + +REM Append Python configuration to project-config.jam (generated by bootstrap.bat above). +REM This must be done AFTER bootstrap since bootstrap creates/overwrites project-config.jam. +REM This approach matches the Linux build and ensures b2 auto-loads the Python config. +REM +echo using python : %PYTHON_VERSION_MAJOR_MINOR% : "%PYTHON_INSTALLATION_PATH_DOUBLE_SLASH%\\python" : "%PYTHON_INSTALLATION_PATH_DOUBLE_SLASH%\\include" : "%PYTHON_INSTALLATION_PATH_DOUBLE_SLASH%\\libs" ; >> project-config.jam + +echo -- Beginning Boost build using compiled b2.exe -- Time: %time% -- +b2.exe -j12 --with-python toolset=msvc-14.2 address-model=64 link=static,shared threading=multi echo -- Finished Boost build -- Time: %time% -- REM If building in pipeline, set the PYTHONHOME here to overwrite the existing PYTHONHOME diff --git a/language-extensions/python/src/CMakeLists.txt b/language-extensions/python/src/CMakeLists.txt index 15a1165..7f54e18 100644 --- a/language-extensions/python/src/CMakeLists.txt +++ b/language-extensions/python/src/CMakeLists.txt @@ -99,14 +99,14 @@ elseif(${PLATFORM} STREQUAL windows) set(COMPILE_OPTIONS ${COMPILE_OPTIONS} /MDd) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Zi") set(CMAKE_SHARED_LINKER_FLAGS_DEBUG "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} /DEBUG:FULL /OPT:REF /OPT:ICF") - find_library(BOOST_PYTHON_LIB libboost_python${PYTHON_VERSION_NO_DOT}-vc142-mt-gd-x64-1_79 ${BOOST_PYTHON_ROOT}) - find_library(BOOST_NUMPY_LIB libboost_numpy${PYTHON_VERSION_NO_DOT}-vc142-mt-gd-x64-1_79 ${BOOST_PYTHON_ROOT}) + find_library(BOOST_PYTHON_LIB libboost_python${PYTHON_VERSION_NO_DOT}-vc142-mt-gd-x64-1_90 ${BOOST_PYTHON_ROOT}) + find_library(BOOST_NUMPY_LIB libboost_numpy${PYTHON_VERSION_NO_DOT}-vc142-mt-gd-x64-1_90 ${BOOST_PYTHON_ROOT}) else() set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /Zi") set(CMAKE_SHARED_LINKER_FLAGS_RELEASE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE} /DEBUG:FULL /OPT:REF /OPT:ICF") set(COMPILE_OPTIONS ${COMPILE_OPTIONS} /MD) - find_library(BOOST_PYTHON_LIB libboost_python${PYTHON_VERSION_NO_DOT}-vc142-mt-x64-1_79 ${BOOST_PYTHON_ROOT}) - find_library(BOOST_NUMPY_LIB libboost_numpy${PYTHON_VERSION_NO_DOT}-vc142-mt-x64-1_79 ${BOOST_PYTHON_ROOT}) + find_library(BOOST_PYTHON_LIB libboost_python${PYTHON_VERSION_NO_DOT}-vc142-mt-x64-1_90 ${BOOST_PYTHON_ROOT}) + find_library(BOOST_NUMPY_LIB libboost_numpy${PYTHON_VERSION_NO_DOT}-vc142-mt-x64-1_90 ${BOOST_PYTHON_ROOT}) endif() target_compile_options(PythonExtension PRIVATE ${COMPILE_OPTIONS}) diff --git a/language-extensions/python/test/build/linux/build-pythonextension-test.sh b/language-extensions/python/test/build/linux/build-pythonextension-test.sh index 5fd7e23..01a97ca 100644 --- a/language-extensions/python/test/build/linux/build-pythonextension-test.sh +++ b/language-extensions/python/test/build/linux/build-pythonextension-test.sh @@ -57,7 +57,7 @@ PYTHONEXTENSIONTEST_WORKING_DIR=${ENL_ROOT}/build-output/pythonextension-test/li INCLUDE_ROOT=/usr/local/include DEFAULT_PYTHONHOME=/usr/local -DEFAULT_BOOST_ROOT=/usr/local/lib/boost_1_87_0 +DEFAULT_BOOST_ROOT=/usr/local/lib/boost_1_90_0 # Find PYTHONHOME from user, or set to default for tests. # Error code 1 is generic bash error. diff --git a/language-extensions/python/test/build/windows/build-pythonextension-test.cmd b/language-extensions/python/test/build/windows/build-pythonextension-test.cmd index 70c3ab8..36bfe7a 100644 --- a/language-extensions/python/test/build/windows/build-pythonextension-test.cmd +++ b/language-extensions/python/test/build/windows/build-pythonextension-test.cmd @@ -12,8 +12,8 @@ SET PYTHONEXTENSION_TEST_WORKING_DIR=%ENL_ROOT%\build-output\pythonextension-tes RMDIR /s /q %PYTHONEXTENSION_TEST_WORKING_DIR% MKDIR %PYTHONEXTENSION_TEST_WORKING_DIR% -SET BOOST_VERSION=1.79.0 -SET BOOST_VERSION_IN_UNDERSCORE=1_79_0 +SET BOOST_VERSION=1.90.0 +SET BOOST_VERSION_IN_UNDERSCORE=1_90_0 SET DEFAULT_BOOST_ROOT=%PACKAGES_ROOT%\boost_%BOOST_VERSION_IN_UNDERSCORE% SET DEFAULT_BOOST_PYTHON_ROOT=%DEFAULT_BOOST_ROOT%\stage\lib SET DEFAULT_PYTHONHOME=C:\Python310 diff --git a/language-extensions/python/test/src/CMakeLists.txt b/language-extensions/python/test/src/CMakeLists.txt index b742d04..36900a2 100644 --- a/language-extensions/python/test/src/CMakeLists.txt +++ b/language-extensions/python/test/src/CMakeLists.txt @@ -84,13 +84,13 @@ elseif(${PLATFORM} STREQUAL windows) # if (${CMAKE_BUILD_TYPE} STREQUAL debug) set(COMPILE_OPTIONS ${COMPILE_OPTIONS} /MDd) - find_library(BOOST_PYTHON_LIB libboost_python${PYTHON_VERSION_NO_DOT}-vc142-mt-gd-x64-1_79 ${BOOST_PYTHON_ROOT}) - find_library(BOOST_NUMPY_LIB libboost_numpy${PYTHON_VERSION_NO_DOT}-vc142-mt-gd-x64-1_79 ${BOOST_PYTHON_ROOT}) + find_library(BOOST_PYTHON_LIB libboost_python${PYTHON_VERSION_NO_DOT}-vc142-mt-gd-x64-1_90 ${BOOST_PYTHON_ROOT}) + find_library(BOOST_NUMPY_LIB libboost_numpy${PYTHON_VERSION_NO_DOT}-vc142-mt-gd-x64-1_90 ${BOOST_PYTHON_ROOT}) find_library(GTEST_LIB gtestd ${GTEST_LIB_PATH}) else() set(COMPILE_OPTIONS ${COMPILE_OPTIONS} /MD) - find_library(BOOST_PYTHON_LIB libboost_python${PYTHON_VERSION_NO_DOT}-vc142-mt-x64-1_79 ${BOOST_PYTHON_ROOT}) - find_library(BOOST_NUMPY_LIB libboost_numpy${PYTHON_VERSION_NO_DOT}-vc142-mt-x64-1_79 ${BOOST_PYTHON_ROOT}) + find_library(BOOST_PYTHON_LIB libboost_python${PYTHON_VERSION_NO_DOT}-vc142-mt-x64-1_90 ${BOOST_PYTHON_ROOT}) + find_library(BOOST_NUMPY_LIB libboost_numpy${PYTHON_VERSION_NO_DOT}-vc142-mt-x64-1_90 ${BOOST_PYTHON_ROOT}) find_library(GTEST_LIB gtest ${GTEST_LIB_PATH}) endif()