From 314db4f23a901ceff79fc804e17ccc4ab46159b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 7 Aug 2023 13:39:56 +0200 Subject: [PATCH 01/37] CI Build and test Python 3.12 wheels --- .github/workflows/wheels.yml | 17 +++++++++++++++++ build_tools/cirrus/arm_wheel.yml | 20 +++++++++++++++++++- 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 8026996106d8b..e6b31672dadf8 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -67,6 +67,9 @@ jobs: - os: windows-latest python: 311 platform_id: win_amd64 + - os: windows-latest + python: 312 + platform_id: win_amd64 # Linux 64 bit manylinux2014 - os: ubuntu-latest @@ -88,6 +91,10 @@ jobs: python: 311 platform_id: manylinux_x86_64 manylinux_image: manylinux2014 + - os: ubuntu-latest + python: 312 + platform_id: manylinux_x86_64 + manylinux_image: manylinux2014 # MacOS x86_64 - os: macos-latest @@ -114,6 +121,9 @@ jobs: - os: macos-latest python: 310 platform_id: macosx_arm64 + - os: macos-latest + python: 311 + platform_id: macosx_arm64 steps: - name: Checkout scikit-learn @@ -128,8 +138,15 @@ jobs: env: CONFTEST_PATH: ${{ github.workspace }}/conftest.py CONFTEST_NAME: conftest.py + # Temporary for Python 3.12 testing + CIBW_PRERELEASE_PYTHONS: True + # TODO: next lines with PIP_ fetch nightly numpy and scipy releases. + # They can be removed when there are numpy and scipy releases that + # supports Python 3.12 CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=3 + PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + PIP_PRE=1 CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} CIBW_ARCHS: all CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} diff --git a/build_tools/cirrus/arm_wheel.yml b/build_tools/cirrus/arm_wheel.yml index 5616108315fba..f9918bc9b1fd8 100644 --- a/build_tools/cirrus/arm_wheel.yml +++ b/build_tools/cirrus/arm_wheel.yml @@ -4,8 +4,15 @@ macos_arm64_wheel_task: env: CONFTEST_PATH: ${CIRRUS_WORKING_DIR}/conftest.py CONFTEST_NAME: conftest.py + # Temporary for Python 3.12 testing + CIBW_PRERELEASE_PYTHONS: True + # TODO: next lines with PIP_ fetch nightly numpy and scipy releases. They + # can be removed when there are numpy and scipy releases that supports + # Python 3.12 CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=5 + PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + PIP_PRE=1 CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh CIBW_TEST_REQUIRES: pytest pandas threadpoolctl pytest-xdist CIBW_BUILD_VERBOSITY: 1 @@ -19,7 +26,7 @@ macos_arm64_wheel_task: # Only the latest Python version is built and tested on CirrusCI, the other # macos arm64 builds are on GitHub Actions - env: - CIBW_BUILD: cp311-macosx_arm64 + CIBW_BUILD: cp312-macosx_arm64 conda_script: - curl -L -o ~/mambaforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh @@ -46,8 +53,16 @@ linux_arm64_wheel_task: env: CONFTEST_PATH: ${CIRRUS_WORKING_DIR}/conftest.py CONFTEST_NAME: conftest.py + # Temporary for Python 3.12 testing + CIBW_PRERELEASE_PYTHONS: True + # TODO: next lines with PIP_ fetch nightly numpy and scipy releases. They + # can be removed when there are numpy and scipy releases that supports + # Python 3.12 CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=5 + PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + PIP_PRE=1 + CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh CIBW_TEST_REQUIRES: pytest pandas threadpoolctl pytest-xdist CIBW_BUILD_VERBOSITY: 1 @@ -68,6 +83,9 @@ linux_arm64_wheel_task: CIBW_TEST_SKIP: "*_aarch64" - env: CIBW_BUILD: cp311-manylinux_aarch64 + CIBW_TEST_SKIP: "*_aarch64" + - env: + CIBW_BUILD: cp312-manylinux_aarch64 cibuildwheel_script: - apt install -y python3 python-is-python3 From d18954643533ca30d0d4d3d16db6f65e36f286e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 7 Aug 2023 13:40:12 +0200 Subject: [PATCH 02/37] [cd build] [azure parallel] From 3252a611dcf080a0b2338090b400f8512c3a286c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 7 Aug 2023 16:59:10 +0200 Subject: [PATCH 03/37] [cd build] Tweak Windows docker image for Python 3.12 --- build_tools/github/build_minimal_windows_image.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build_tools/github/build_minimal_windows_image.sh b/build_tools/github/build_minimal_windows_image.sh index 4399bfa80704e..4e805915d9bdb 100755 --- a/build_tools/github/build_minimal_windows_image.sh +++ b/build_tools/github/build_minimal_windows_image.sh @@ -14,6 +14,10 @@ cp $WHEEL_PATH $WHEEL_NAME # Dot the Python version for identyfing the base Docker image PYTHON_VERSION=$(echo ${PYTHON_VERSION:0:1}.${PYTHON_VERSION:1:2}) +# TODO: remove this when Python 3.12 is released +if [[ "$PYTHON_VERSION" == "3.12" ]]; then + PYTHON_VERSION=3.12-rc +fi # Build a minimal Windows Docker image for testing the wheels docker build --build-arg PYTHON_VERSION=$PYTHON_VERSION \ --build-arg WHEEL_NAME=$WHEEL_NAME \ From c18cd23f7e1c73d115221933fd431bb117050d12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 09:55:22 +0200 Subject: [PATCH 04/37] Upgrade pip needed for Python 3.12 --- build_tools/github/Windows | 1 + 1 file changed, 1 insertion(+) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index 5ba35f790ca5e..cdbd42ded7b55 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -9,6 +9,7 @@ ARG CIBW_TEST_REQUIRES # Copy and install the Windows wheel COPY $WHEEL_NAME $WHEEL_NAME COPY $CONFTEST_NAME $CONFTEST_NAME +RUN pip install --upgrade pip RUN pip install $env:WHEEL_NAME # Install the testing dependencies From 7a2f3f1b64161de978cb3673af76a9fe29fb0b01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 09:59:23 +0200 Subject: [PATCH 05/37] [cd build] Use development numpy and scipy versions only for Python 3.12 build --- .github/workflows/wheels.yml | 12 +++++------- build_tools/cirrus/arm_wheel.yml | 9 --------- build_tools/wheels/build_wheels.sh | 7 +++++++ 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e6b31672dadf8..6cd41415ecd0e 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -70,6 +70,7 @@ jobs: - os: windows-latest python: 312 platform_id: win_amd64 + prerelease: True # Linux 64 bit manylinux2014 - os: ubuntu-latest @@ -95,6 +96,7 @@ jobs: python: 312 platform_id: manylinux_x86_64 manylinux_image: manylinux2014 + prerelease: True # MacOS x86_64 - os: macos-latest @@ -138,15 +140,11 @@ jobs: env: CONFTEST_PATH: ${{ github.workspace }}/conftest.py CONFTEST_NAME: conftest.py - # Temporary for Python 3.12 testing - CIBW_PRERELEASE_PYTHONS: True - # TODO: next lines with PIP_ fetch nightly numpy and scipy releases. - # They can be removed when there are numpy and scipy releases that - # supports Python 3.12 + # TODO: remove when there are numpy and scipy releases that supports + # Python 3.12 + CIBW_PRERELEASE_PYTHONS: ${{ matrix.prerelease }} CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=3 - PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple - PIP_PRE=1 CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} CIBW_ARCHS: all CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} diff --git a/build_tools/cirrus/arm_wheel.yml b/build_tools/cirrus/arm_wheel.yml index f9918bc9b1fd8..a4bdf1771d76a 100644 --- a/build_tools/cirrus/arm_wheel.yml +++ b/build_tools/cirrus/arm_wheel.yml @@ -6,13 +6,8 @@ macos_arm64_wheel_task: CONFTEST_NAME: conftest.py # Temporary for Python 3.12 testing CIBW_PRERELEASE_PYTHONS: True - # TODO: next lines with PIP_ fetch nightly numpy and scipy releases. They - # can be removed when there are numpy and scipy releases that supports - # Python 3.12 CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=5 - PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple - PIP_PRE=1 CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh CIBW_TEST_REQUIRES: pytest pandas threadpoolctl pytest-xdist CIBW_BUILD_VERBOSITY: 1 @@ -60,9 +55,6 @@ linux_arm64_wheel_task: # Python 3.12 CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=5 - PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple - PIP_PRE=1 - CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh CIBW_TEST_REQUIRES: pytest pandas threadpoolctl pytest-xdist CIBW_BUILD_VERBOSITY: 1 @@ -83,7 +75,6 @@ linux_arm64_wheel_task: CIBW_TEST_SKIP: "*_aarch64" - env: CIBW_BUILD: cp311-manylinux_aarch64 - CIBW_TEST_SKIP: "*_aarch64" - env: CIBW_BUILD: cp312-manylinux_aarch64 diff --git a/build_tools/wheels/build_wheels.sh b/build_tools/wheels/build_wheels.sh index bea9218b3826c..86342bceb311d 100755 --- a/build_tools/wheels/build_wheels.sh +++ b/build_tools/wheels/build_wheels.sh @@ -45,6 +45,13 @@ if [[ $(uname) == "Darwin" ]]; then fi fi +# TODO: remove when there are numpy and scipy releases that supports Python +# 3.12 +if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then + export PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + export PIP_PRE=1 +fi + # The version of the built dependencies are specified # in the pyproject.toml file, while the tests are run # against the most recent version of the dependencies From 860b8d50068b5494578f95afdf2efc900d6c858e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 10:00:28 +0200 Subject: [PATCH 06/37] [cd build] Tweak windows script --- build_tools/github/build_minimal_windows_image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/github/build_minimal_windows_image.sh b/build_tools/github/build_minimal_windows_image.sh index 4e805915d9bdb..bb681207ffa0e 100755 --- a/build_tools/github/build_minimal_windows_image.sh +++ b/build_tools/github/build_minimal_windows_image.sh @@ -15,8 +15,8 @@ cp $WHEEL_PATH $WHEEL_NAME PYTHON_VERSION=$(echo ${PYTHON_VERSION:0:1}.${PYTHON_VERSION:1:2}) # TODO: remove this when Python 3.12 is released -if [[ "$PYTHON_VERSION" == "3.12" ]]; then - PYTHON_VERSION=3.12-rc +if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then + PYTHON_VERSION="$PYTHON_VERSION-rc" fi # Build a minimal Windows Docker image for testing the wheels docker build --build-arg PYTHON_VERSION=$PYTHON_VERSION \ From 5de909cdbaa11230ce1727fac30f371bd54c8b93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 10:13:50 +0200 Subject: [PATCH 07/37] [cd build] Tweak --- build_tools/github/Windows | 2 +- build_tools/wheels/build_wheels.sh | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index cdbd42ded7b55..f274cef1cbf7f 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -9,7 +9,7 @@ ARG CIBW_TEST_REQUIRES # Copy and install the Windows wheel COPY $WHEEL_NAME $WHEEL_NAME COPY $CONFTEST_NAME $CONFTEST_NAME -RUN pip install --upgrade pip +RUN python -m pip install --upgrade pip RUN pip install $env:WHEEL_NAME # Install the testing dependencies diff --git a/build_tools/wheels/build_wheels.sh b/build_tools/wheels/build_wheels.sh index 86342bceb311d..c964e56c61c0b 100755 --- a/build_tools/wheels/build_wheels.sh +++ b/build_tools/wheels/build_wheels.sh @@ -48,8 +48,11 @@ fi # TODO: remove when there are numpy and scipy releases that supports Python # 3.12 if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then - export PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple - export PIP_PRE=1 + ADDITIONAL_CIBW_ENVIRONMENT= "\ + PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + PIP_PRE=1" + export CIBW_ENVIRONMENT="${CIBW_ENVIRONMENT}\n${ADDITIONAL_CIBW_ENVIRONMENT}" + echo $CIBW_ENVIRONMENT fi # The version of the built dependencies are specified From 893d0b4b80cf162ba2136a3d25550d3988cc03b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 10:15:44 +0200 Subject: [PATCH 08/37] [cd build] Temporarily remove pandas install --- build_tools/cirrus/arm_wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/cirrus/arm_wheel.yml b/build_tools/cirrus/arm_wheel.yml index a4bdf1771d76a..51499d41e2799 100644 --- a/build_tools/cirrus/arm_wheel.yml +++ b/build_tools/cirrus/arm_wheel.yml @@ -9,7 +9,7 @@ macos_arm64_wheel_task: CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=5 CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh - CIBW_TEST_REQUIRES: pytest pandas threadpoolctl pytest-xdist + CIBW_TEST_REQUIRES: pytest threadpoolctl pytest-xdist CIBW_BUILD_VERBOSITY: 1 PATH: $HOME/mambaforge/bin/:$PATH CONDA_HOME: $HOME/mambaforge @@ -56,7 +56,7 @@ linux_arm64_wheel_task: CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=5 CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh - CIBW_TEST_REQUIRES: pytest pandas threadpoolctl pytest-xdist + CIBW_TEST_REQUIRES: pytest threadpoolctl pytest-xdist CIBW_BUILD_VERBOSITY: 1 # Upload tokens have been encrypted via the CirrusCI interface: # https://cirrus-ci.org/guide/writing-tasks/#encrypted-variables From 52c6e07358494a9a8ca7f6aff1a67f96f1835b79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 10:19:33 +0200 Subject: [PATCH 09/37] [cd build] Fix --- build_tools/wheels/build_wheels.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/wheels/build_wheels.sh b/build_tools/wheels/build_wheels.sh index c964e56c61c0b..73572df33016b 100755 --- a/build_tools/wheels/build_wheels.sh +++ b/build_tools/wheels/build_wheels.sh @@ -48,7 +48,7 @@ fi # TODO: remove when there are numpy and scipy releases that supports Python # 3.12 if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then - ADDITIONAL_CIBW_ENVIRONMENT= "\ + ADDITIONAL_CIBW_ENVIRONMENT="\ PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple PIP_PRE=1" export CIBW_ENVIRONMENT="${CIBW_ENVIRONMENT}\n${ADDITIONAL_CIBW_ENVIRONMENT}" From e076756b646480bd1db5ad0f6a360a5ab891affb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 10:24:10 +0200 Subject: [PATCH 10/37] [cd build] --- build_tools/wheels/build_wheels.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/wheels/build_wheels.sh b/build_tools/wheels/build_wheels.sh index 73572df33016b..1bb755c345abf 100755 --- a/build_tools/wheels/build_wheels.sh +++ b/build_tools/wheels/build_wheels.sh @@ -49,9 +49,9 @@ fi # 3.12 if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then ADDITIONAL_CIBW_ENVIRONMENT="\ - PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple + PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ PIP_PRE=1" - export CIBW_ENVIRONMENT="${CIBW_ENVIRONMENT}\n${ADDITIONAL_CIBW_ENVIRONMENT}" + export CIBW_ENVIRONMENT="${CIBW_ENVIRONMENT} ${ADDITIONAL_CIBW_ENVIRONMENT}" echo $CIBW_ENVIRONMENT fi From ab63ef2f8327b268e9317b9e00edb452805f8e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 10:31:24 +0200 Subject: [PATCH 11/37] [cd build] --- .github/workflows/wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 6cd41415ecd0e..30b3b4fd3db86 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -70,7 +70,7 @@ jobs: - os: windows-latest python: 312 platform_id: win_amd64 - prerelease: True + prerelease: "True" # Linux 64 bit manylinux2014 - os: ubuntu-latest @@ -96,7 +96,7 @@ jobs: python: 312 platform_id: manylinux_x86_64 manylinux_image: manylinux2014 - prerelease: True + prerelease: "True" # MacOS x86_64 - os: macos-latest From 3c8912f0f52cfa7243e742f1ced8a19b1eea68b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 12:00:39 +0200 Subject: [PATCH 12/37] [cd build] Tweak --- build_tools/github/Windows | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index f274cef1cbf7f..2066a6baa8530 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -9,7 +9,10 @@ ARG CIBW_TEST_REQUIRES # Copy and install the Windows wheel COPY $WHEEL_NAME $WHEEL_NAME COPY $CONFTEST_NAME $CONFTEST_NAME -RUN python -m pip install --upgrade pip +RUN if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then \ + export PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple; \ + export PIP_PRE=1; \ +fi; RUN pip install $env:WHEEL_NAME # Install the testing dependencies From 2056347ab2a89c35cbf93810a961df7a2fbd2cb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 12:01:26 +0200 Subject: [PATCH 13/37] [cd build] temporarily remove lingering pandas --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 30b3b4fd3db86..4480dd4bc2429 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -152,7 +152,7 @@ jobs: CIBW_TEST_SKIP: "*-macosx_arm64" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir} CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }} - CIBW_TEST_REQUIRES: pytest pandas threadpoolctl + CIBW_TEST_REQUIRES: pytest threadpoolctl CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh CIBW_TEST_COMMAND_WINDOWS: bash {project}/build_tools/github/test_windows_wheels.sh ${{ matrix.python }} CIBW_BUILD_VERBOSITY: 1 From 5a7132556b583ac52240c87d08d60c83b697b8af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 13:56:59 +0200 Subject: [PATCH 14/37] [cd build] use powershell --- build_tools/github/Windows | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index 2066a6baa8530..e539dfdbbb230 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -9,10 +9,10 @@ ARG CIBW_TEST_REQUIRES # Copy and install the Windows wheel COPY $WHEEL_NAME $WHEEL_NAME COPY $CONFTEST_NAME $CONFTEST_NAME -RUN if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then \ - export PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple; \ - export PIP_PRE=1; \ -fi; +RUN if ( $Env:CIBW_PRERELEASE_PYTHONS -eq 'True' ) { \ + $Env:PIP_EXTRA_INDEX_URL = 'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'; \ + $Env:PIP_PRE = '1'; \ +} RUN pip install $env:WHEEL_NAME # Install the testing dependencies From 2b85fa04203eac6033bf8b191f6825e006b0d2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 8 Aug 2023 14:14:39 +0200 Subject: [PATCH 15/37] [cd build] add ARG to Dockerfile --- build_tools/github/Windows | 7 ++++--- build_tools/github/build_minimal_windows_image.sh | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index e539dfdbbb230..7ad4985f03a20 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -5,13 +5,14 @@ FROM winamd64/python:$PYTHON_VERSION-windowsservercore ARG WHEEL_NAME ARG CONFTEST_NAME ARG CIBW_TEST_REQUIRES +ARG CIBW_PRERELEASE_PYTHONS # Copy and install the Windows wheel COPY $WHEEL_NAME $WHEEL_NAME COPY $CONFTEST_NAME $CONFTEST_NAME -RUN if ( $Env:CIBW_PRERELEASE_PYTHONS -eq 'True' ) { \ - $Env:PIP_EXTRA_INDEX_URL = 'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'; \ - $Env:PIP_PRE = '1'; \ +RUN if ( $env:CIBW_PRERELEASE_PYTHONS -eq 'True' ) { \ + $env:PIP_EXTRA_INDEX_URL = 'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'; \ + $env:PIP_PRE = '1'; \ } RUN pip install $env:WHEEL_NAME diff --git a/build_tools/github/build_minimal_windows_image.sh b/build_tools/github/build_minimal_windows_image.sh index bb681207ffa0e..d7a9184560b09 100755 --- a/build_tools/github/build_minimal_windows_image.sh +++ b/build_tools/github/build_minimal_windows_image.sh @@ -23,5 +23,6 @@ docker build --build-arg PYTHON_VERSION=$PYTHON_VERSION \ --build-arg WHEEL_NAME=$WHEEL_NAME \ --build-arg CONFTEST_NAME=$CONFTEST_NAME \ --build-arg CIBW_TEST_REQUIRES="$CIBW_TEST_REQUIRES" \ + --build-arg CIBW_PRERELEASE_PYTHONS="$CIBW_PRERELEASE_PYTHONS" \ -f build_tools/github/Windows \ -t scikit-learn/minimal-windows . From 5f00fa09193c151791410a41f149afb972d8472a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 8 Sep 2023 10:50:37 +0200 Subject: [PATCH 16/37] Revert "[cd build] Temporarily remove pandas install" This reverts commit 893d0b4b80cf162ba2136a3d25550d3988cc03b4. --- build_tools/cirrus/arm_wheel.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/cirrus/arm_wheel.yml b/build_tools/cirrus/arm_wheel.yml index 51499d41e2799..a4bdf1771d76a 100644 --- a/build_tools/cirrus/arm_wheel.yml +++ b/build_tools/cirrus/arm_wheel.yml @@ -9,7 +9,7 @@ macos_arm64_wheel_task: CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=5 CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh - CIBW_TEST_REQUIRES: pytest threadpoolctl pytest-xdist + CIBW_TEST_REQUIRES: pytest pandas threadpoolctl pytest-xdist CIBW_BUILD_VERBOSITY: 1 PATH: $HOME/mambaforge/bin/:$PATH CONDA_HOME: $HOME/mambaforge @@ -56,7 +56,7 @@ linux_arm64_wheel_task: CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=5 CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh - CIBW_TEST_REQUIRES: pytest threadpoolctl pytest-xdist + CIBW_TEST_REQUIRES: pytest pandas threadpoolctl pytest-xdist CIBW_BUILD_VERBOSITY: 1 # Upload tokens have been encrypted via the CirrusCI interface: # https://cirrus-ci.org/guide/writing-tasks/#encrypted-variables From 8b273f600142862e5a566b9fabead5cfe1241a05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 8 Sep 2023 10:53:04 +0200 Subject: [PATCH 17/37] [cd build] apply suggestions --- build_tools/cirrus/arm_wheel.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_tools/cirrus/arm_wheel.yml b/build_tools/cirrus/arm_wheel.yml index a4bdf1771d76a..f3e4ae2df2898 100644 --- a/build_tools/cirrus/arm_wheel.yml +++ b/build_tools/cirrus/arm_wheel.yml @@ -4,8 +4,6 @@ macos_arm64_wheel_task: env: CONFTEST_PATH: ${CIRRUS_WORKING_DIR}/conftest.py CONFTEST_NAME: conftest.py - # Temporary for Python 3.12 testing - CIBW_PRERELEASE_PYTHONS: True CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=5 CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh @@ -22,6 +20,8 @@ macos_arm64_wheel_task: # macos arm64 builds are on GitHub Actions - env: CIBW_BUILD: cp312-macosx_arm64 + # Temporary for Python 3.12 testing + CIBW_PRERELEASE_PYTHONS: True conda_script: - curl -L -o ~/mambaforge.sh https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-MacOSX-arm64.sh @@ -48,8 +48,6 @@ linux_arm64_wheel_task: env: CONFTEST_PATH: ${CIRRUS_WORKING_DIR}/conftest.py CONFTEST_NAME: conftest.py - # Temporary for Python 3.12 testing - CIBW_PRERELEASE_PYTHONS: True # TODO: next lines with PIP_ fetch nightly numpy and scipy releases. They # can be removed when there are numpy and scipy releases that supports # Python 3.12 @@ -77,6 +75,8 @@ linux_arm64_wheel_task: CIBW_BUILD: cp311-manylinux_aarch64 - env: CIBW_BUILD: cp312-manylinux_aarch64 + # Temporary for Python 3.12 testing + CIBW_PRERELEASE_PYTHONS: True cibuildwheel_script: - apt install -y python3 python-is-python3 From 97aae361d6018853e2241c02394ea3da93a80124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 8 Sep 2023 16:52:19 +0200 Subject: [PATCH 18/37] [cd build] Windows fix? --- build_tools/github/Windows | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index 7ad4985f03a20..8198a5c10cce4 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -13,8 +13,8 @@ COPY $CONFTEST_NAME $CONFTEST_NAME RUN if ( $env:CIBW_PRERELEASE_PYTHONS -eq 'True' ) { \ $env:PIP_EXTRA_INDEX_URL = 'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'; \ $env:PIP_PRE = '1'; \ -} -RUN pip install $env:WHEEL_NAME +}; \ +pip install $env:WHEEL_NAME # Install the testing dependencies RUN pip install $env:CIBW_TEST_REQUIRES.split(" ") From 22df81186467aab1b1eb4bd2c5aa80fef1d3ce5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Fri, 8 Sep 2023 17:16:22 +0200 Subject: [PATCH 19/37] [cd build] From 5437089c109d8fb615c6eb6ff398ef4cc86e36ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 11 Sep 2023 16:36:48 +0200 Subject: [PATCH 20/37] [cd build] From 5fb173c6d544c491863ff8570c99176f3e8f1f59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 12 Sep 2023 11:48:39 +0200 Subject: [PATCH 21/37] tweak indentation for better readability --- build_tools/github/Windows | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index 8198a5c10cce4..09657f616f3eb 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -11,10 +11,10 @@ ARG CIBW_PRERELEASE_PYTHONS COPY $WHEEL_NAME $WHEEL_NAME COPY $CONFTEST_NAME $CONFTEST_NAME RUN if ( $env:CIBW_PRERELEASE_PYTHONS -eq 'True' ) { \ - $env:PIP_EXTRA_INDEX_URL = 'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'; \ - $env:PIP_PRE = '1'; \ -}; \ -pip install $env:WHEEL_NAME + $env:PIP_EXTRA_INDEX_URL = 'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'; \ + $env:PIP_PRE = '1'; \ + }; \ + pip install $env:WHEEL_NAME # Install the testing dependencies RUN pip install $env:CIBW_TEST_REQUIRES.split(" ") From 29207f759cad5b79a0e1c3d94bf04b0abd4fc1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 12 Sep 2023 11:57:48 +0200 Subject: [PATCH 22/37] [cd build] cleanup --- .github/workflows/wheels.yml | 6 +++--- build_tools/cirrus/arm_wheel.yml | 9 ++++----- build_tools/github/build_minimal_windows_image.sh | 1 - build_tools/wheels/build_wheels.sh | 3 --- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4480dd4bc2429..3691be9e6ff55 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -96,6 +96,8 @@ jobs: python: 312 platform_id: manylinux_x86_64 manylinux_image: manylinux2014 + # TODO: remove when Python 3.12 is released and there are numpy and + # scipy releases that supports Python 3.12 prerelease: "True" # MacOS x86_64 @@ -140,8 +142,6 @@ jobs: env: CONFTEST_PATH: ${{ github.workspace }}/conftest.py CONFTEST_NAME: conftest.py - # TODO: remove when there are numpy and scipy releases that supports - # Python 3.12 CIBW_PRERELEASE_PYTHONS: ${{ matrix.prerelease }} CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=3 @@ -152,7 +152,7 @@ jobs: CIBW_TEST_SKIP: "*-macosx_arm64" CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: bash build_tools/github/repair_windows_wheels.sh {wheel} {dest_dir} CIBW_BEFORE_TEST_WINDOWS: bash build_tools/github/build_minimal_windows_image.sh ${{ matrix.python }} - CIBW_TEST_REQUIRES: pytest threadpoolctl + CIBW_TEST_REQUIRES: pytest pandas threadpoolctl CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh CIBW_TEST_COMMAND_WINDOWS: bash {project}/build_tools/github/test_windows_wheels.sh ${{ matrix.python }} CIBW_BUILD_VERBOSITY: 1 diff --git a/build_tools/cirrus/arm_wheel.yml b/build_tools/cirrus/arm_wheel.yml index 2e2a16f00b449..3d8aedce2331e 100644 --- a/build_tools/cirrus/arm_wheel.yml +++ b/build_tools/cirrus/arm_wheel.yml @@ -20,7 +20,8 @@ macos_arm64_wheel_task: # macos arm64 builds are on GitHub Actions - env: CIBW_BUILD: cp312-macosx_arm64 - # Temporary for Python 3.12 testing + # TODO: remove when Python 3.12 is released and there are numpy and + # scipy releases that supports Python 3.12 CIBW_PRERELEASE_PYTHONS: True conda_script: @@ -48,9 +49,6 @@ linux_arm64_wheel_task: env: CONFTEST_PATH: ${CIRRUS_WORKING_DIR}/conftest.py CONFTEST_NAME: conftest.py - # TODO: next lines with PIP_ fetch nightly numpy and scipy releases. They - # can be removed when there are numpy and scipy releases that supports - # Python 3.12 CIBW_ENVIRONMENT: SKLEARN_SKIP_NETWORK_TESTS=1 SKLEARN_BUILD_PARALLEL=5 CIBW_TEST_COMMAND: bash {project}/build_tools/wheels/test_wheels.sh @@ -75,7 +73,8 @@ linux_arm64_wheel_task: CIBW_BUILD: cp311-manylinux_aarch64 - env: CIBW_BUILD: cp312-manylinux_aarch64 - # Temporary for Python 3.12 testing + # TODO: remove when Python 3.12 is released and there are numpy and + # scipy releases that supports Python 3.12 CIBW_PRERELEASE_PYTHONS: True cibuildwheel_script: diff --git a/build_tools/github/build_minimal_windows_image.sh b/build_tools/github/build_minimal_windows_image.sh index d7a9184560b09..992a0cf8e6bdc 100755 --- a/build_tools/github/build_minimal_windows_image.sh +++ b/build_tools/github/build_minimal_windows_image.sh @@ -14,7 +14,6 @@ cp $WHEEL_PATH $WHEEL_NAME # Dot the Python version for identyfing the base Docker image PYTHON_VERSION=$(echo ${PYTHON_VERSION:0:1}.${PYTHON_VERSION:1:2}) -# TODO: remove this when Python 3.12 is released if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then PYTHON_VERSION="$PYTHON_VERSION-rc" fi diff --git a/build_tools/wheels/build_wheels.sh b/build_tools/wheels/build_wheels.sh index 1bb755c345abf..4e9b8ef3f853d 100755 --- a/build_tools/wheels/build_wheels.sh +++ b/build_tools/wheels/build_wheels.sh @@ -45,14 +45,11 @@ if [[ $(uname) == "Darwin" ]]; then fi fi -# TODO: remove when there are numpy and scipy releases that supports Python -# 3.12 if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then ADDITIONAL_CIBW_ENVIRONMENT="\ PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ PIP_PRE=1" export CIBW_ENVIRONMENT="${CIBW_ENVIRONMENT} ${ADDITIONAL_CIBW_ENVIRONMENT}" - echo $CIBW_ENVIRONMENT fi # The version of the built dependencies are specified From 7dd8b2ba52c554c1e4e905b8ec7a6943b94af71e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 12 Sep 2023 14:10:05 +0200 Subject: [PATCH 23/37] Tweak Windows Dockerfile --- build_tools/github/Windows | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index 09657f616f3eb..4ab7569548506 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -15,6 +15,4 @@ RUN if ( $env:CIBW_PRERELEASE_PYTHONS -eq 'True' ) { \ $env:PIP_PRE = '1'; \ }; \ pip install $env:WHEEL_NAME - -# Install the testing dependencies -RUN pip install $env:CIBW_TEST_REQUIRES.split(" ") + pip install $env:CIBW_TEST_REQUIRES.split(" ") From 4a71c79c26b3f36553ac063bcf698ad387801d03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 12 Sep 2023 15:24:13 +0200 Subject: [PATCH 24/37] [cd build] From f018745f5848a73e30b46f3b8ae1928baea9b797 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 12 Sep 2023 16:18:28 +0200 Subject: [PATCH 25/37] [cd build] fix Windows --- build_tools/github/Windows | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index 4ab7569548506..ff72ce42df8a3 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -14,5 +14,5 @@ RUN if ( $env:CIBW_PRERELEASE_PYTHONS -eq 'True' ) { \ $env:PIP_EXTRA_INDEX_URL = 'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'; \ $env:PIP_PRE = '1'; \ }; \ - pip install $env:WHEEL_NAME + pip install $env:WHEEL_NAME; \ pip install $env:CIBW_TEST_REQUIRES.split(" ") From 51055e24bf7ec06b0a68e79288fc42eb5c40bcc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 19 Sep 2023 14:56:03 +0200 Subject: [PATCH 26/37] [cd build] no need to use prereleases for numpy and scipy --- build_tools/github/Windows | 10 ++++------ build_tools/wheels/build_wheels.sh | 7 ------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index ff72ce42df8a3..25380efee97bf 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -10,9 +10,7 @@ ARG CIBW_PRERELEASE_PYTHONS # Copy and install the Windows wheel COPY $WHEEL_NAME $WHEEL_NAME COPY $CONFTEST_NAME $CONFTEST_NAME -RUN if ( $env:CIBW_PRERELEASE_PYTHONS -eq 'True' ) { \ - $env:PIP_EXTRA_INDEX_URL = 'https://pypi.anaconda.org/scientific-python-nightly-wheels/simple'; \ - $env:PIP_PRE = '1'; \ - }; \ - pip install $env:WHEEL_NAME; \ - pip install $env:CIBW_TEST_REQUIRES.split(" ") + +pip install $env:WHEEL_NAME + +pip install $env:CIBW_TEST_REQUIRES.split(" ") diff --git a/build_tools/wheels/build_wheels.sh b/build_tools/wheels/build_wheels.sh index 4e9b8ef3f853d..bea9218b3826c 100755 --- a/build_tools/wheels/build_wheels.sh +++ b/build_tools/wheels/build_wheels.sh @@ -45,13 +45,6 @@ if [[ $(uname) == "Darwin" ]]; then fi fi -if [[ "$CIBW_PRERELEASE_PYTHONS" == "True" ]]; then - ADDITIONAL_CIBW_ENVIRONMENT="\ - PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple \ - PIP_PRE=1" - export CIBW_ENVIRONMENT="${CIBW_ENVIRONMENT} ${ADDITIONAL_CIBW_ENVIRONMENT}" -fi - # The version of the built dependencies are specified # in the pyproject.toml file, while the tests are run # against the most recent version of the dependencies From 965318f09a28da4feb5ef32c202db3d0a9baf083 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 19 Sep 2023 14:58:04 +0200 Subject: [PATCH 27/37] [cd build] From ad0b5c083b56391ffa643b0b120e03b1830fc6d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 19 Sep 2023 15:15:51 +0200 Subject: [PATCH 28/37] [cd build] trigger CI From 05a7aaf4d4fccf7875570fa81779cd230157b040 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Tue, 19 Sep 2023 17:23:37 +0200 Subject: [PATCH 29/37] [cd build gh] Windows fix --- build_tools/github/Windows | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index 25380efee97bf..401e37c6182ae 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -11,6 +11,7 @@ ARG CIBW_PRERELEASE_PYTHONS COPY $WHEEL_NAME $WHEEL_NAME COPY $CONFTEST_NAME $CONFTEST_NAME -pip install $env:WHEEL_NAME +RUN pip install $env:WHEEL_NAME -pip install $env:CIBW_TEST_REQUIRES.split(" ") +# Install the testing dependencies +RUN pip install $env:CIBW_TEST_REQUIRES.split(" ") From c7d31bd06ac8ea473b980277c7d189391ad749d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Wed, 20 Sep 2023 08:25:43 +0200 Subject: [PATCH 30/37] [cd build] trigger CI From 75779320b8d8168dac19d9e9f17a38834904e0bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 25 Sep 2023 12:35:34 +0200 Subject: [PATCH 31/37] pandas has a release with Python 3.12 wheel --- .github/workflows/wheels.yml | 4 ++-- build_tools/cirrus/arm_wheel.yml | 6 ++---- build_tools/github/Windows | 1 - build_tools/github/build_minimal_windows_image.sh | 1 - 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 3691be9e6ff55..2beaf5cf9af36 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -70,6 +70,7 @@ jobs: - os: windows-latest python: 312 platform_id: win_amd64 + # TODO: remove when Python 3.12 is released prerelease: "True" # Linux 64 bit manylinux2014 @@ -96,8 +97,7 @@ jobs: python: 312 platform_id: manylinux_x86_64 manylinux_image: manylinux2014 - # TODO: remove when Python 3.12 is released and there are numpy and - # scipy releases that supports Python 3.12 + # TODO: remove when Python 3.12 is released prerelease: "True" # MacOS x86_64 diff --git a/build_tools/cirrus/arm_wheel.yml b/build_tools/cirrus/arm_wheel.yml index 3d8aedce2331e..bce780cfafcf5 100644 --- a/build_tools/cirrus/arm_wheel.yml +++ b/build_tools/cirrus/arm_wheel.yml @@ -20,8 +20,7 @@ macos_arm64_wheel_task: # macos arm64 builds are on GitHub Actions - env: CIBW_BUILD: cp312-macosx_arm64 - # TODO: remove when Python 3.12 is released and there are numpy and - # scipy releases that supports Python 3.12 + # TODO: remove when Python 3.12 is released CIBW_PRERELEASE_PYTHONS: True conda_script: @@ -73,8 +72,7 @@ linux_arm64_wheel_task: CIBW_BUILD: cp311-manylinux_aarch64 - env: CIBW_BUILD: cp312-manylinux_aarch64 - # TODO: remove when Python 3.12 is released and there are numpy and - # scipy releases that supports Python 3.12 + # TODO: remove when Python 3.12 is released CIBW_PRERELEASE_PYTHONS: True cibuildwheel_script: diff --git a/build_tools/github/Windows b/build_tools/github/Windows index 401e37c6182ae..fca77b042d01b 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -5,7 +5,6 @@ FROM winamd64/python:$PYTHON_VERSION-windowsservercore ARG WHEEL_NAME ARG CONFTEST_NAME ARG CIBW_TEST_REQUIRES -ARG CIBW_PRERELEASE_PYTHONS # Copy and install the Windows wheel COPY $WHEEL_NAME $WHEEL_NAME diff --git a/build_tools/github/build_minimal_windows_image.sh b/build_tools/github/build_minimal_windows_image.sh index 992a0cf8e6bdc..aa7bfc3e31f9f 100755 --- a/build_tools/github/build_minimal_windows_image.sh +++ b/build_tools/github/build_minimal_windows_image.sh @@ -22,6 +22,5 @@ docker build --build-arg PYTHON_VERSION=$PYTHON_VERSION \ --build-arg WHEEL_NAME=$WHEEL_NAME \ --build-arg CONFTEST_NAME=$CONFTEST_NAME \ --build-arg CIBW_TEST_REQUIRES="$CIBW_TEST_REQUIRES" \ - --build-arg CIBW_PRERELEASE_PYTHONS="$CIBW_PRERELEASE_PYTHONS" \ -f build_tools/github/Windows \ -t scikit-learn/minimal-windows . From ae225d3e3f57cbe4f6538f03f4073d35869366c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 25 Sep 2023 12:36:14 +0200 Subject: [PATCH 32/37] fix --- build_tools/github/Windows | 1 - 1 file changed, 1 deletion(-) diff --git a/build_tools/github/Windows b/build_tools/github/Windows index fca77b042d01b..5ba35f790ca5e 100644 --- a/build_tools/github/Windows +++ b/build_tools/github/Windows @@ -9,7 +9,6 @@ ARG CIBW_TEST_REQUIRES # Copy and install the Windows wheel COPY $WHEEL_NAME $WHEEL_NAME COPY $CONFTEST_NAME $CONFTEST_NAME - RUN pip install $env:WHEEL_NAME # Install the testing dependencies From 5b0e18d0ec24f022d5aa7ef83682c4162aa78eb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 25 Sep 2023 12:38:33 +0200 Subject: [PATCH 33/37] Skip test on Python 3.11 arm --- build_tools/cirrus/arm_wheel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/build_tools/cirrus/arm_wheel.yml b/build_tools/cirrus/arm_wheel.yml index bce780cfafcf5..f5a1a872c93a3 100644 --- a/build_tools/cirrus/arm_wheel.yml +++ b/build_tools/cirrus/arm_wheel.yml @@ -70,6 +70,7 @@ linux_arm64_wheel_task: CIBW_TEST_SKIP: "*_aarch64" - env: CIBW_BUILD: cp311-manylinux_aarch64 + CIBW_TEST_SKIP: "*_aarch64" - env: CIBW_BUILD: cp312-manylinux_aarch64 # TODO: remove when Python 3.12 is released From 1d79d89073c2f272d737e24d6d2d6d4ba9769b59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 25 Sep 2023 12:38:37 +0200 Subject: [PATCH 34/37] [cd build] trigger CI From bc92239586d6daee43a90cd30c7993c27a5a4b7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Thu, 28 Sep 2023 11:25:35 +0200 Subject: [PATCH 35/37] Update metadata for Python 3.12 --- setup.py | 1 + 1 file changed, 1 insertion(+) diff --git a/setup.py b/setup.py index f9ae13c94502b..ae2a2f9ea41f6 100755 --- a/setup.py +++ b/setup.py @@ -593,6 +593,7 @@ def setup_package(): "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ], From dd0d4f8edb610f202f90c5afd5377ecf0acdc0e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 2 Oct 2023 12:40:23 +0200 Subject: [PATCH 36/37] Update build_tools/cirrus/arm_wheel.yml Co-authored-by: Olivier Grisel --- build_tools/cirrus/arm_wheel.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/build_tools/cirrus/arm_wheel.yml b/build_tools/cirrus/arm_wheel.yml index f5a1a872c93a3..c5f5a34afa490 100644 --- a/build_tools/cirrus/arm_wheel.yml +++ b/build_tools/cirrus/arm_wheel.yml @@ -16,8 +16,13 @@ macos_arm64_wheel_task: # See `maint_tools/update_tracking_issue.py` for details on the permissions the token requires. BOT_GITHUB_TOKEN: ENCRYPTED[9b50205e2693f9e4ce9a3f0fcb897a259289062fda2f5a3b8aaa6c56d839e0854a15872f894a70fca337dd4787274e0f] matrix: - # Only the latest Python version is built and tested on CirrusCI, the other - # macos arm64 builds are on GitHub Actions + # Only the latest Python version is built and tested on Cirrus CI, the other + # macOS arm64 builds are on GitHub Actions. The reason is that macOS time is + # 5x more expensive than Linux times on Cirrus CI and the credits are limited + # (for free accounts). + # Note that the macOS arm64 builds are cross compiled on GitHub Actions (without + # running the tests) and while the macOS arm64 build for the latest Python version + # is actually tested on Cirrus CI. - env: CIBW_BUILD: cp312-macosx_arm64 # TODO: remove when Python 3.12 is released From 12078b28441e78e29d2a3190e6f0f25d4d2d9c0e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Est=C3=A8ve?= Date: Mon, 2 Oct 2023 12:41:38 +0200 Subject: [PATCH 37/37] Add comment --- .github/workflows/wheels.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2beaf5cf9af36..42f35362a5739 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -115,7 +115,10 @@ jobs: platform_id: macosx_x86_64 # MacOS arm64 - # The latest Python version is built and tested on CirrusCI + # The wheel for the latest Python version is built and tested on + # Cirrus CI but due to limited build time for free accounts on Cirrus + # CI, we build the macOS arm64 wheels for the other Python versions on + # Github Actions via cross-compilation (without running the tests). - os: macos-latest python: 38 platform_id: macosx_arm64