diff --git a/.github/workflows/amd64_linux_bazel.yml b/.github/workflows/amd64_linux_bazel.yml index 69625b4d1c..b9713a8c7d 100644 --- a/.github/workflows/amd64_linux_bazel.yml +++ b/.github/workflows/amd64_linux_bazel.yml @@ -12,6 +12,7 @@ jobs: {version: '3.10'}, {version: '3.11'}, {version: '3.12'}, + {version: '3.13'}, ] fail-fast: false name: Linux • Bazel • Python-${{ matrix.python.version }} diff --git a/.github/workflows/amd64_linux_cmake_python.yml b/.github/workflows/amd64_linux_cmake_python.yml index 68ac73ad65..20c6d90fea 100644 --- a/.github/workflows/amd64_linux_cmake_python.yml +++ b/.github/workflows/amd64_linux_cmake_python.yml @@ -18,6 +18,7 @@ jobs: {version: "3.10"}, {version: "3.11"}, {version: "3.12"}, + {version: "3.13"}, ] fail-fast: false name: Linux • ${{ matrix.cmake.generator }} • Python-${{ matrix.python.version }} diff --git a/.github/workflows/amd64_macos_bazel.yml b/.github/workflows/amd64_macos_bazel.yml index 2f5990146d..41e20f9f00 100644 --- a/.github/workflows/amd64_macos_bazel.yml +++ b/.github/workflows/amd64_macos_bazel.yml @@ -12,6 +12,7 @@ jobs: {version: '3.10'}, {version: '3.11'}, {version: '3.12'}, + {version: '3.13'}, ] fail-fast: false name: MacOS • Bazel • Python-${{ matrix.python.version }} diff --git a/.github/workflows/amd64_macos_cmake_python.yml b/.github/workflows/amd64_macos_cmake_python.yml index b1729db0c9..072d573c71 100644 --- a/.github/workflows/amd64_macos_cmake_python.yml +++ b/.github/workflows/amd64_macos_cmake_python.yml @@ -16,7 +16,8 @@ jobs: {version: "3.9"}, {version: "3.10"}, {version: "3.11"}, - {version: "3.12"} + {version: "3.12"}, + {version: "3.13"}, ] fail-fast: false name: MacOS • ${{ matrix.cmake.generator }} • Python-${{ matrix.python.version }} diff --git a/.github/workflows/amd64_windows_bazel.yml b/.github/workflows/amd64_windows_bazel.yml index 30c9245878..f891de2aac 100644 --- a/.github/workflows/amd64_windows_bazel.yml +++ b/.github/workflows/amd64_windows_bazel.yml @@ -13,6 +13,7 @@ jobs: {version: '3.10'}, {version: '3.11'}, {version: '3.12'}, + {version: '3.13'}, ] fail-fast: false # Don't cancel all jobs if one fails. name: ${{ matrix.runner }} • Bazel • Python-${{ matrix.python.version }} diff --git a/.github/workflows/amd64_windows_cmake_python.yml b/.github/workflows/amd64_windows_cmake_python.yml index a8d0babfd6..7cc795f5c3 100644 --- a/.github/workflows/amd64_windows_cmake_python.yml +++ b/.github/workflows/amd64_windows_cmake_python.yml @@ -16,6 +16,7 @@ jobs: {version: "3.10", dir: Python310}, {version: "3.11", dir: Python311}, {version: "3.12", dir: Python312}, + {version: "3.13", dir: Python313}, ] fail-fast: false name: Windows • ${{ matrix.cmake.generator }} • Python-${{ matrix.python.version }} diff --git a/.github/workflows/arm64_macos_bazel.yml b/.github/workflows/arm64_macos_bazel.yml index f76442597d..8ac4f1d071 100644 --- a/.github/workflows/arm64_macos_bazel.yml +++ b/.github/workflows/arm64_macos_bazel.yml @@ -12,6 +12,7 @@ jobs: {version: '3.10'}, {version: '3.11'}, {version: '3.12'}, + {version: '3.13'}, ] fail-fast: false name: MacOS • Bazel • Python-${{ matrix.python.version }} diff --git a/.github/workflows/arm64_macos_cmake_python.yml b/.github/workflows/arm64_macos_cmake_python.yml index 7cd90596f4..5de445d2fe 100644 --- a/.github/workflows/arm64_macos_cmake_python.yml +++ b/.github/workflows/arm64_macos_cmake_python.yml @@ -16,7 +16,8 @@ jobs: {version: "3.9"}, {version: "3.10"}, {version: "3.11"}, - {version: "3.12"} + {version: "3.12"}, + {version: "3.13"}, ] fail-fast: false name: MacOS • ${{ matrix.cmake.generator }} • Python-${{ matrix.python.version }} diff --git a/ortools/python/setup.py.in b/ortools/python/setup.py.in index 2ffbce0675..c01f935895 100644 --- a/ortools/python/setup.py.in +++ b/ortools/python/setup.py.in @@ -162,6 +162,7 @@ setup( 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Programming Language :: C++', 'Programming Language :: Python :: Implementation :: CPython', 'Topic :: Office/Business :: Scheduling', diff --git a/tools/docker/Makefile b/tools/docker/Makefile index 220912fa68..2fef1ffe61 100644 --- a/tools/docker/Makefile +++ b/tools/docker/Makefile @@ -59,6 +59,7 @@ help: @echo -e "\t\t${BOLD}310${RESET} Python3.10" @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 @echo -e "\t${BOLD}${RESET}:" @echo -e "\t\t${BOLD}env${RESET}" diff --git a/tools/release/build_delivery_macos.sh b/tools/release/build_delivery_macos.sh index aa5cbfc3ab..f5bc67ada2 100755 --- a/tools/release/build_delivery_macos.sh +++ b/tools/release/build_delivery_macos.sh @@ -213,9 +213,9 @@ function build_python() { command -v swig | xargs echo "swig: " | tee -a build.log if [[ ${PLATFORM} == "arm64" ]]; then - local -r PY=(3.8 3.9 3.10 3.11 3.12) + local -r PY=(3.8 3.9 3.10 3.11 3.12 3.13) else - local -r PY=(3.8 3.9 3.10 3.11 3.12) + local -r PY=(3.8 3.9 3.10 3.11 3.12 3.13) fi # Check Python env diff --git a/tools/release/build_delivery_win.cmd b/tools/release/build_delivery_win.cmd index 13e45fe408..4dfdc18c3b 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.8, 3.9, 3.10, 3.11, 3.12 +REM PYTHON 3.8, 3.9, 3.10, 3.11, 3.12, 3,13 :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 (8 9 10 11 12) DO ( +FOR %%v IN (8 9 10 11 12 13) 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 diff --git a/tools/release/test_delivery_macos.sh b/tools/release/test_delivery_macos.sh index b2c50e3e7f..6704dd0e9c 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.8 3.9 3.10 3.11 3.12) + local -r PY=(3.8 3.9 3.10 3.11 3.12 3.13) else - local -r PY=(3.8 3.9 3.10 3.11 3.12) + local -r PY=(3.8 3.9 3.10 3.11 3.12 3.13) fi for i in "${PY[@]}"; do diff --git a/tools/release/test_delivery_win.cmd b/tools/release/test_delivery_win.cmd index 0e3fd13ab1..71d98191ae 100755 --- a/tools/release/test_delivery_win.cmd +++ b/tools/release/test_delivery_win.cmd @@ -186,3 +186,36 @@ echo Testing ortools Python3.12... | tee.exe -a test.log echo Testing ortools Python3.12...DONE | tee.exe -a test.log FOR %%i IN (%TEMP_DIR%\ortools\dist\*.whl) DO copy %%i . + +REM ################### +REM ## PYTHON 3.13 ## +REM ################### +echo Cleaning Python... | tee.exe -a test.log +make.exe clean_python WINDOWS_PATH_TO_PYTHON=c:\python313-64 +echo Cleaning Python...DONE | tee.exe -a test.log + +REM make.exe python WINDOWS_PATH_TO_PYTHON=c:\python313-64 || exit 1 +REM echo make python3.13: DONE | tee.exe -a build.log +REM make.exe test_python WINDOWS_PATH_TO_PYTHON=c:\python313-64 || exit 1 +REM echo make test_python3.13: DONE | tee.exe -a build.log +echo Rebuild Python3.13 pypi archive... | tee.exe -a test.log +make.exe package_python WINDOWS_PATH_TO_PYTHON=c:\python313-64 || exit 1 +echo Rebuild Python3.13 pypi archive...DONE | tee.exe -a test.log + +echo Creating Python3.13 venv... | tee.exe -a test.log +set PATH=c:\python313-64;c:\python313-64\Scripts;%PATH% +python -m pip install virtualenv +set TEMP_DIR=temp_python313 +python -m virtualenv %TEMP_DIR%\venv +set PATH=%LOCAL_PATH% +echo Creating Python3.13 venv...DONE | tee.exe -a test.log + +echo Installing ortools Python3.13 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.13 venv...DONE | tee.exe -a test.log + +echo Testing ortools Python3.13... | 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.13...DONE | tee.exe -a test.log + +FOR %%i IN (%TEMP_DIR%\ortools\dist\*.whl) DO copy %%i .