From 50e3697e7da0f297cf847eb9d56e4d1ec4a775c2 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Wed, 27 Sep 2023 13:04:03 +0200 Subject: [PATCH 1/2] Cf #4975 - Try to build python bindings on windows for python 3.11 --- .github/workflows/python_bindings.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/python_bindings.yml b/.github/workflows/python_bindings.yml index 0b2933ff76e..c1282e61540 100644 --- a/.github/workflows/python_bindings.yml +++ b/.github/workflows/python_bindings.yml @@ -24,7 +24,7 @@ jobs: # fail-fast: Default is true, switch to false to allow one platform to fail and still run others fail-fast: false matrix: - name: [Ubuntu, macOS, Windows_py37, Windows_py38, Windows_py39, Windows_py310] + name: [Ubuntu, macOS, Windows_py37, Windows_py38, Windows_py39, Windows_py310, Windows_py311] include: - name: Ubuntu os: ubuntu-20.04 @@ -54,6 +54,10 @@ jobs: - name: Windows_py310 os: windows-2019 python-version: '3.10' + allow_failure: false + - name: Windows_py311 + os: windows-2019 + python-version: '3.11' allow_failure: true # Possible this fails, don't care yet steps: @@ -215,7 +219,7 @@ jobs: elif [ "$RUNNER_OS" == "macOS" ]; then cmake --build . --target package -j 2 fi; - + # We always upload to testpypi - name: Build python wheel shell: bash @@ -252,7 +256,7 @@ jobs: - name: Install Python dependencies run: | python -m pip install --upgrade pip - # urllib3 2.0 breaks + # urllib3 2.0 breaks pip install urllib3==1.26.15 pip install setuptools wheel twine requests packaging mkdir wheels @@ -297,7 +301,7 @@ jobs: # fail-fast: Default is true, switch to false to allow one platform to fail and still run others fail-fast: false matrix: - name: [Ubuntu, macOS, Windows_py37, Windows_py38, Windows_py39, Windows_py310] + name: [Ubuntu, macOS, Windows_py37, Windows_py38, Windows_py39, Windows_py310, Windows_py311] include: - name: Ubuntu os: ubuntu-20.04 @@ -322,6 +326,10 @@ jobs: - name: Windows_py310 os: windows-2019 python-version: '3.10' + allow_failure: false + - name: Windows_py311 + os: windows-2019 + python-version: '3.11' allow_failure: true # Possible this fails, don't care yet steps: From 8c30a2a68aa181f25c4a4de9ceb177dc70d6c874 Mon Sep 17 00:00:00 2001 From: Julien Marrec Date: Wed, 27 Sep 2023 13:25:36 +0200 Subject: [PATCH 2/2] Replace vswhere command which now fails --- .github/workflows/python_bindings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python_bindings.yml b/.github/workflows/python_bindings.yml index c1282e61540..ddaee558070 100644 --- a/.github/workflows/python_bindings.yml +++ b/.github/workflows/python_bindings.yml @@ -110,7 +110,7 @@ jobs: echo "Using chocolatey to install ninja" choco install ninja # C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise - MSVC_DIR=$(cmd.exe /c "vswhere -products * -requires Microsoft.Component.MSBuild -property installationPath -latest") + MSVC_DIR=$(vswhere -products '*' -requires Microsoft.Component.MSBuild -property installationPath -latest) echo "Latest is: $MSVC_DIR" echo "MSVC_DIR=$MSVC_DIR" >> $GITHUB_ENV # add folder containing vcvarsall.bat