chore: update examples to use python 3.12 (#1919)

This commit is contained in:
Matthieu Darbois
2024-07-09 09:15:44 -04:00
committed by GitHub
parent 604da878cb
commit cac121a67d
6 changed files with 36 additions and 26 deletions
+4 -3
View File
@@ -11,10 +11,11 @@ macos_task:
name: Build macOS x86_64 and arm64 wheels. name: Build macOS x86_64 and arm64 wheels.
macos_instance: macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode image: ghcr.io/cirruslabs/macos-sonoma-xcode
env: env:
PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
CIBW_ARCHS_MACOS: x86_64 arm64 CIBW_ARCHS_MACOS: x86_64 arm64
install_pre_requirements_script: install_pre_requirements_script:
- brew install python@3.10 - brew install python@3.12
- python3.12 -m venv ${VENV_ROOT}
<<: *BUILD_AND_STORE_WHEELS <<: *BUILD_AND_STORE_WHEELS
+19 -8
View File
@@ -15,9 +15,14 @@ linux_x86_task:
platform: linux platform: linux
cpu: 4 cpu: 4
memory: 4G memory: 4G
env:
VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
install_pre_requirements_script: install_pre_requirements_script:
- apt install -y python3-venv python-is-python3 - add-apt-repository -y ppa:deadsnakes/ppa
- apt-get update
- apt-get install -y python3.12-venv
- python3.12 -m venv ${VENV_ROOT}
<<: *BUILD_AND_STORE_WHEELS <<: *BUILD_AND_STORE_WHEELS
linux_aarch64_task: linux_aarch64_task:
@@ -29,9 +34,14 @@ linux_aarch64_task:
platform: linux platform: linux
cpu: 4 cpu: 4
memory: 4G memory: 4G
env:
VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
install_pre_requirements_script: install_pre_requirements_script:
- apt install -y python3-venv python-is-python3 - add-apt-repository -y ppa:deadsnakes/ppa
- apt-get update
- apt-get install -y python3.12-venv
- python3.12 -m venv ${VENV_ROOT}
<<: *BUILD_AND_STORE_WHEELS <<: *BUILD_AND_STORE_WHEELS
windows_x86_task: windows_x86_task:
@@ -42,7 +52,7 @@ windows_x86_task:
memory: 4G memory: 4G
install_pre_requirements_script: install_pre_requirements_script:
- choco install -y --no-progress python3 --version 3.10.6 - choco install -y --no-progress python3 --version 3.12.4
- refreshenv - refreshenv
- echo PATH=%PATH% >> "%CIRRUS_ENV%" - echo PATH=%PATH% >> "%CIRRUS_ENV%"
<<: *BUILD_AND_STORE_WHEELS <<: *BUILD_AND_STORE_WHEELS
@@ -51,9 +61,10 @@ macos_arm64_task:
name: Build macOS arm64 wheels. name: Build macOS arm64 wheels.
macos_instance: macos_instance:
image: ghcr.io/cirruslabs/macos-sonoma-xcode image: ghcr.io/cirruslabs/macos-sonoma-xcode
env: env:
PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH VENV_ROOT: ${HOME}/venv-cibuildwheel
PATH: ${VENV_ROOT}/bin:${PATH}
install_pre_requirements_script: install_pre_requirements_script:
- brew install python@3.10 - brew install python@3.12
- python3.12 -m venv ${VENV_ROOT}
<<: *BUILD_AND_STORE_WHEELS <<: *BUILD_AND_STORE_WHEELS
+1 -1
View File
@@ -1,5 +1,5 @@
linux: linux:
image: python:3.8 image: python:3.12
# make a docker daemon available for cibuildwheel to use # make a docker daemon available for cibuildwheel to use
services: services:
- name: docker:dind - name: docker:dind
+4 -4
View File
@@ -4,7 +4,7 @@
os: linux os: linux
dist: focal dist: focal
language: python language: python
python: "3.9" python: "3.12"
jobs: jobs:
include: include:
@@ -14,10 +14,10 @@ jobs:
- os: windows - os: windows
language: shell language: shell
before_install: before_install:
- choco upgrade python -y --version 3.8.6 - choco upgrade python -y --version 3.12.4
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH" - export PATH="/c/Python312:/c/Python312/Scripts:$PATH"
# make sure it's on PATH as 'python3' # make sure it's on PATH as 'python3'
- ln -s /c/Python38/python.exe /c/Python38/python3.exe - ln -s /c/Python312/python.exe /c/Python312/python3.exe
install: install:
- python3 -m pip install cibuildwheel==2.19.2 - python3 -m pip install cibuildwheel==2.19.2
+4 -4
View File
@@ -1,7 +1,7 @@
os: linux os: linux
dist: focal dist: focal
language: python language: python
python: "3.9" python: "3.12"
jobs: jobs:
include: include:
@@ -20,10 +20,10 @@ jobs:
- os: windows - os: windows
language: shell language: shell
before_install: before_install:
- choco upgrade python -y --version 3.8.6 - choco upgrade python -y --version 3.12.4
- export PATH="/c/Python38:/c/Python38/Scripts:$PATH" - export PATH="/c/Python312:/c/Python312/Scripts:$PATH"
# make sure it's on PATH as 'python3' # make sure it's on PATH as 'python3'
- ln -s /c/Python38/python.exe /c/Python38/python3.exe - ln -s /c/Python312/python.exe /c/Python312/python3.exe
install: install:
- python3 -m pip install cibuildwheel==2.19.2 - python3 -m pip install cibuildwheel==2.19.2
+4 -6
View File
@@ -8,17 +8,15 @@
os: linux os: linux
dist: focal dist: focal
language: python language: python
python: python: "3.12"
- 3.7
- 3.8
before_install: before_install:
- | - |
if [[ "$TRAVIS_OS_NAME" = windows ]]; then if [[ "$TRAVIS_OS_NAME" = windows ]]; then
choco upgrade python -y --version 3.8.6 choco upgrade python -y --version 3.12.4
export PATH="/c/Python38:/c/Python38/Scripts:$PATH" export PATH="/c/Python312:/c/Python312/Scripts:$PATH"
# make sure it's on PATH as 'python3' # make sure it's on PATH as 'python3'
ln -s /c/Python38/python.exe /c/Python38/python3.exe ln -s /c/Python312/python.exe /c/Python312/python3.exe
fi fi
install: install: