diff --git a/.github/workflows/amd64_linux_bazel.yml b/.github/workflows/amd64_linux_bazel.yml index 283517e21c..948195e103 100644 --- a/.github/workflows/amd64_linux_bazel.yml +++ b/.github/workflows/amd64_linux_bazel.yml @@ -26,6 +26,7 @@ jobs: #{version: '3.11'}, {version: '3.12'}, #{version: '3.13'}, + #{version: '3.14'}, ] fail-fast: false env: diff --git a/.github/workflows/amd64_linux_cmake_python.yml b/.github/workflows/amd64_linux_cmake_python.yml index ec7f93e6e0..8f211d896c 100644 --- a/.github/workflows/amd64_linux_cmake_python.yml +++ b/.github/workflows/amd64_linux_cmake_python.yml @@ -28,6 +28,7 @@ jobs: #{version: "3.11"}, #{version: "3.12"}, {version: "3.13"}, + {version: "3.14"}, ] fail-fast: false name: amd64•Linux•CMake•Python${{matrix.python.version}} diff --git a/.github/workflows/amd64_macos_bazel.yml b/.github/workflows/amd64_macos_bazel.yml index d336ba15e8..cea7192789 100644 --- a/.github/workflows/amd64_macos_bazel.yml +++ b/.github/workflows/amd64_macos_bazel.yml @@ -26,6 +26,7 @@ jobs: #{version: '3.11'}, {version: '3.12'}, #{version: '3.13'}, + #{version: '3.14'}, ] fail-fast: false env: diff --git a/.github/workflows/amd64_macos_cmake_python.yml b/.github/workflows/amd64_macos_cmake_python.yml index 2e087620b0..f069af65a7 100644 --- a/.github/workflows/amd64_macos_cmake_python.yml +++ b/.github/workflows/amd64_macos_cmake_python.yml @@ -32,6 +32,7 @@ jobs: #{version: "3.11"}, #{version: "3.12"}, {version: "3.13"}, + {version: "3.14"}, ] fail-fast: false name: amd64•MacOS•CMake(${{matrix.cmake.name}})•Python-${{matrix.python.version}} diff --git a/.github/workflows/amd64_windows_bazel.yml b/.github/workflows/amd64_windows_bazel.yml index 44490ebf6f..c950fb3831 100644 --- a/.github/workflows/amd64_windows_bazel.yml +++ b/.github/workflows/amd64_windows_bazel.yml @@ -26,6 +26,7 @@ jobs: # {version: '3.11'}, {version: '3.12'}, # {version: '3.13'}, + # {version: '3.14'}, ] fail-fast: false # Don't cancel all jobs if one fails. env: diff --git a/.github/workflows/amd64_windows_cmake_python.yml b/.github/workflows/amd64_windows_cmake_python.yml index ee8a494c8d..12a1fc81dd 100644 --- a/.github/workflows/amd64_windows_cmake_python.yml +++ b/.github/workflows/amd64_windows_cmake_python.yml @@ -27,6 +27,7 @@ jobs: #{version: "3.11", dir: Python311}, #{version: "3.12", dir: Python312}, {version: "3.13", dir: Python313}, + {version: "3.14", dir: Python314}, ] fail-fast: false name: amd64•Windows•CMake(${{matrix.cmake.name}})•Python-${{matrix.python.version}} diff --git a/.github/workflows/arm64_macos_bazel.yml b/.github/workflows/arm64_macos_bazel.yml index 9aec169757..95fbe05bac 100644 --- a/.github/workflows/arm64_macos_bazel.yml +++ b/.github/workflows/arm64_macos_bazel.yml @@ -26,6 +26,7 @@ jobs: #{version: '3.11'}, {version: '3.12'}, #{version: '3.13'}, + #{version: '3.14'}, ] fail-fast: false env: diff --git a/.github/workflows/arm64_macos_cmake_python.yml b/.github/workflows/arm64_macos_cmake_python.yml index 489e9faa23..28e59dc1bd 100644 --- a/.github/workflows/arm64_macos_cmake_python.yml +++ b/.github/workflows/arm64_macos_cmake_python.yml @@ -32,6 +32,7 @@ jobs: #{version: "3.11"}, {version: "3.12"}, #{version: "3.13"}, + #{version: "3.14"}, ] fail-fast: false name: arm64•MacOS•CMake(${{matrix.cmake.name}})•Python-${{matrix.python.version}} diff --git a/ortools/python/setup.py.in b/ortools/python/setup.py.in index 00ca709220..62362cc4bc 100644 --- a/ortools/python/setup.py.in +++ b/ortools/python/setup.py.in @@ -166,6 +166,7 @@ setup( 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: 3.13', + 'Programming Language :: Python :: 3.14', 'Programming Language :: C++', 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Office/Business :: Scheduling', diff --git a/tools/docker/Makefile b/tools/docker/Makefile index 70c88c92db..4b14e7453b 100644 --- a/tools/docker/Makefile +++ b/tools/docker/Makefile @@ -59,6 +59,7 @@ help: @echo -e "\t\t${BOLD}311${RESET} Python3.11" @echo -e "\t\t${BOLD}312${RESET} Python3.12" @echo -e "\t\t${BOLD}313${RESET} Python3.13" + @echo -e "\t\t${BOLD}314${RESET} Python3.14" @echo @echo -e "\t${BOLD}${RESET}:" @echo -e "\t\t${BOLD}env${RESET}" @@ -204,7 +205,7 @@ cache/python: | cache -mkdir $@ ## MANYLINUX ## -PYTHON_VERSIONS := 39 310 311 312 313 +PYTHON_VERSIONS := 39 310 311 312 313 314 export/python/manylinux: | export/python -mkdir -p $@ diff --git a/tools/release/build_delivery_macos.sh b/tools/release/build_delivery_macos.sh index f03ddf3577..79244cae90 100755 --- a/tools/release/build_delivery_macos.sh +++ b/tools/release/build_delivery_macos.sh @@ -225,9 +225,9 @@ function build_python() { echo "DONE" | tee -a build.log if [[ ${PLATFORM} == "arm64" ]]; then - local -r PY=(3.9 3.10 3.11 3.12 3.13) + local -r PY=(3.9 3.10 3.11 3.12 3.13 3.14) else - local -r PY=(3.9 3.10 3.11 3.12 3.13) + local -r PY=(3.9 3.10 3.11 3.12 3.13 3.14) fi # Check Python env diff --git a/tools/release/build_delivery_win.cmd b/tools/release/build_delivery_win.cmd index 940e0ff7bd..846c2f593c 100644 --- a/tools/release/build_delivery_win.cmd +++ b/tools/release/build_delivery_win.cmd @@ -269,7 +269,7 @@ set PATH=%userprofile%\AppData\Roaming\Python\Python3%1\Scripts;%PATH% ::echo "python path: %PATH%" GOTO :eof -REM PYTHON 3.9, 3.10, 3.11, 3.12, 3.13 +REM PYTHON 3.9, 3.10, 3.11, 3.12, 3.13, 3.14 :BUILD_PYTHON title Build Python set HASH= @@ -279,7 +279,7 @@ echo Python build seems up to date, skipping exit /B 0 ) -FOR %%v IN (9 10 11 12 13) DO ( +FOR %%v IN (9 10 11 12 13 14) DO ( title Build Python 3.%%v echo Check python3.%%v... | tee.exe -a build.log which.exe "C:\python3%%v-64\python.exe" || exit 1 @@ -342,7 +342,7 @@ del /s /f /q temp_dotnet rmdir /s /q temp_dotnet del /s /f /q temp_java rmdir /s /q temp_java -FOR %%v IN (9 10 11 12 13) do ( +FOR %%v IN (9 10 11 12 13 14) do ( del /s /f /q temp_python3%%v rmdir /s /q temp_python3%%v ) diff --git a/tools/release/test_delivery_macos.sh b/tools/release/test_delivery_macos.sh index d5d09ff23e..fd8110ebd7 100755 --- a/tools/release/test_delivery_macos.sh +++ b/tools/release/test_delivery_macos.sh @@ -23,9 +23,9 @@ command -v make | xargs echo "make: " | tee -a test.log command -v swig | xargs echo "swig: " | tee -a test.log # python if [[ ${PLATFORM} == "arm64" ]]; then - local -r PY=(3.9 3.10 3.11 3.12 3.13) + local -r PY=(3.9 3.10 3.11 3.12 3.13 3.14) else - local -r PY=(3.9 3.10 3.11 3.12 3.13) + local -r PY=(3.9 3.10 3.11 3.12 3.13 3.14) fi for i in "${PY[@]}"; do diff --git a/tools/release/test_delivery_win.cmd b/tools/release/test_delivery_win.cmd index 2cd35cdd76..ca7586d76a 100755 --- a/tools/release/test_delivery_win.cmd +++ b/tools/release/test_delivery_win.cmd @@ -21,6 +21,8 @@ which.exe C:\python312-64\python.exe || exit 1 echo C:\python312-64\python.exe: FOUND | tee.exe -a test.log which.exe C:\python313-64\python.exe || exit 1 echo C:\python313-64\python.exe: FOUND | tee.exe -a test.log +which.exe C:\python314-64\python.exe || exit 1 +echo C:\python314-64\python.exe: FOUND | tee.exe -a test.log set LOCAL_PATH=%PATH% @@ -188,3 +190,36 @@ echo Testing ortools Python3.13... | tee.exe -a test.log echo Testing ortools Python3.13...DONE | tee.exe -a test.log FOR %%i IN (%TEMP_DIR%\ortools\dist\*.whl) DO copy %%i . + +REM ################### +REM ## PYTHON 3.14 ## +REM ################### +echo Cleaning Python... | tee.exe -a test.log +make.exe clean_python WINDOWS_PATH_TO_PYTHON=c:\python314-64 +echo Cleaning Python...DONE | tee.exe -a test.log + +REM make.exe python WINDOWS_PATH_TO_PYTHON=c:\python314-64 || exit 1 +REM echo make python3.14: DONE | tee.exe -a build.log +REM make.exe test_python WINDOWS_PATH_TO_PYTHON=c:\python314-64 || exit 1 +REM echo make test_python3.14: DONE | tee.exe -a build.log +echo Rebuild Python3.14 pypi archive... | tee.exe -a test.log +make.exe package_python WINDOWS_PATH_TO_PYTHON=c:\python314-64 || exit 1 +echo Rebuild Python3.14 pypi archive...DONE | tee.exe -a test.log + +echo Creating Python3.14 venv... | tee.exe -a test.log +set PATH=c:\python314-64;c:\python314-64\Scripts;%PATH% +python -m pip install virtualenv +set TEMP_DIR=temp_python314 +python -m virtualenv %TEMP_DIR%\venv +set PATH=%LOCAL_PATH% +echo Creating Python3.14 venv...DONE | tee.exe -a test.log + +echo Installing ortools Python3.14 venv... | tee.exe -a test.log +FOR %%i IN (%TEMP_DIR%\ortools\dist\*.whl) DO %TEMP_DIR%\venv\Scripts\python -m pip install %%i +echo Installing ortools Python3.14 venv...DONE | tee.exe -a test.log + +echo Testing ortools Python3.14... | tee.exe -a test.log +%TEMP_DIR%\venv\Scripts\python cmake\samples\python\sample.py 2>&1 | tee.exe -a test.log +echo Testing ortools Python3.14...DONE | tee.exe -a test.log + +FOR %%i IN (%TEMP_DIR%\ortools\dist\*.whl) DO copy %%i .