diff --git a/.ado/publish.yml b/.ado/publish.yml index 50d13d7d4c..440052ab29 100644 --- a/.ado/publish.yml +++ b/.ado/publish.yml @@ -34,13 +34,13 @@ parameters: default: - name: linux_x86_64 poolName: 'Azure-Pipelines-DevTools-EO' - imageName: 'ubuntu-20.04' + imageName: 'ubuntu-22.04' os: linux arch: x86_64 additionalTargets: wasm32-unknown-unknown - name: linux_aarch64 poolName: 'Azure-Pipelines-DevTools-EO' - imageName: 'ubuntu-20.04' + imageName: 'ubuntu-22.04' os: linux arch: aarch64 additionalRustTargets: aarch64-unknown-linux-gnu wasm32-unknown-unknown @@ -299,7 +299,7 @@ extends: python -m pip install auditwheel patchelf ls target/wheels ls target/wheels/*.whl | xargs auditwheel show - ls target/wheels/*.whl | xargs auditwheel repair --wheel-dir ./target/wheels/ --plat manylinux_2_31_x86_64 + ls target/wheels/*.whl | xargs auditwheel repair --wheel-dir ./target/wheels/ --plat manylinux_2_35_x86_64 rm target/wheels/*-linux_x86_64.whl ls target/wheels displayName: Run auditwheel for Linux Wheels @@ -313,10 +313,8 @@ extends: condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['arch'], 'aarch64')) - script: | - chmod +x ./docker/linux-aarch64/build.sh chmod +x ./docker/linux-aarch64/run.sh - ./docker/linux-aarch64/build.sh ./docker/linux-aarch64/run.sh displayName: Run auditwheel and python tests for Linux aarch64 Wheels condition: and(eq(variables['Agent.OS'], 'Linux'), eq(variables['arch'], 'aarch64')) diff --git a/docker/linux-aarch64/Dockerfile b/docker/linux-aarch64/Dockerfile deleted file mode 100644 index 9da3e9cf58..0000000000 --- a/docker/linux-aarch64/Dockerfile +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. - -ARG BASE_IMAGE -FROM --platform=linux/arm64/v8 ${BASE_IMAGE} - -# install python and pip -RUN apt-get update && \ - DEBIAN_FRONTEND=noninteractive apt-get install \ - python3-minimal python3-pip python3-venv \ - --no-install-recommends -y && \ - apt-get clean - -# We don't update pip here as we need to update it -# inside the virtual environment. Otherwise, we get two versions -# of pip installed, and the one outside the virtual environment -# causes problems. - -ENTRYPOINT ["sh", "-c", "$*", "--"] diff --git a/docker/linux-aarch64/build.sh b/docker/linux-aarch64/build.sh deleted file mode 100644 index 5bc33ea207..0000000000 --- a/docker/linux-aarch64/build.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash - -# Copyright (c) Microsoft Corporation. -# Licensed under the MIT License. - -set -e - -SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) -echo "SCRIPT_DIR: ${SCRIPT_DIR}" - -BASE_IMAGE="${BASE_IMAGE:-ubuntu:20.04}" -echo "BASE_IMAGE: ${BASE_IMAGE}" - -TAG="${TAG:-qsharp-linux-aarch64-runner}" -echo "TAG: ${TAG}" - -docker build -t ${TAG} --build-arg BASE_IMAGE=${BASE_IMAGE} -f ${SCRIPT_DIR}/Dockerfile ${SCRIPT_DIR} diff --git a/docker/linux-aarch64/entrypoint.sh b/docker/linux-aarch64/entrypoint.sh index 0381036638..3a555b1188 100644 --- a/docker/linux-aarch64/entrypoint.sh +++ b/docker/linux-aarch64/entrypoint.sh @@ -11,7 +11,7 @@ echo "SCRIPT_DIR: ${SCRIPT_DIR}" WHEEL_ARCH="${WHEEL_ARCH:-aarch64}" echo "WHEEL_ARCH: ${WHEEL_ARCH}" -WHEEL_PLATFORM="${WHEEL_PLATFORM:-manylinux_2_31_${WHEEL_ARCH}}" +WHEEL_PLATFORM="${WHEEL_PLATFORM:-manylinux_2_35_${WHEEL_ARCH}}" echo "WHEEL_PLATFORM: ${WHEEL_PLATFORM}" PIP_DIR="${PIP_DIR:-${SCRIPT_DIR}/../../pip}" diff --git a/docker/linux-aarch64/run.sh b/docker/linux-aarch64/run.sh index 5387fba6fa..6b6302f9d9 100644 --- a/docker/linux-aarch64/run.sh +++ b/docker/linux-aarch64/run.sh @@ -8,11 +8,11 @@ set -e SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) echo "SCRIPT_DIR: ${SCRIPT_DIR}" -TAG="${TAG:-qsharp-linux-aarch64-runner}" -echo "TAG: ${TAG}" +BASE_IMAGE="${BASE_IMAGE:-mcr.microsoft.com/cbl-mariner/base/python:3.9}" +echo "BASE_IMAGE: ${BASE_IMAGE}" VOLUME_ROOT=$(realpath ${SCRIPT_DIR}/../..) echo "VOLUME_ROOT: ${VOLUME_ROOT}" -echo "docker run --platform linux/arm64/v8 -v ${VOLUME_ROOT}:/qsharp -e WHEEL_DIR='/qsharp/target/wheels' ${TAG} bash /qsharp/docker/linux-aarch64/entrypoint.sh" -docker run --platform linux/arm64/v8 -v ${VOLUME_ROOT}:/qsharp -e WHEEL_DIR='/qsharp/target/wheels' ${TAG} bash /qsharp/docker/linux-aarch64/entrypoint.sh +echo "docker run --platform linux/arm64/v8 -v ${VOLUME_ROOT}:/qsharp -e WHEEL_DIR='/qsharp/target/wheels' ${BASE_IMAGE} bash /qsharp/docker/linux-aarch64/entrypoint.sh" +docker run --platform linux/arm64/v8 -v ${VOLUME_ROOT}:/qsharp -e WHEEL_DIR='/qsharp/target/wheels' ${BASE_IMAGE} bash /qsharp/docker/linux-aarch64/entrypoint.sh diff --git a/fuzz/README.md b/fuzz/README.md index c010652b91..1c58cb80c0 100644 --- a/fuzz/README.md +++ b/fuzz/README.md @@ -4,7 +4,7 @@ Based on [Fuzzing with cargo-fuzz](https://rust-fuzz.github.io/book/cargo-fuzz.h For running locally you need the following steps. -(**On Windows use [WSL](https://learn.microsoft.com/windows/wsl/).** Tested in WSL Ubuntu 20.04) +(**On Windows use [WSL](https://learn.microsoft.com/windows/wsl/).** Tested in WSL Ubuntu 22.04) ## Prerequisites @@ -329,7 +329,7 @@ See more in [LibFuzzer Corpus](https://llvm.org/docs/LibFuzzer.html#corpus). Based on [Code Coverage](https://rust-fuzz.github.io/book/cargo-fuzz/coverage.html#code-coverage). -Tested in WSL Ubuntu 20.04. +Tested in WSL Ubuntu 22.04. ### Code Coverage Prerequisites diff --git a/jupyterlab/pyproject.toml b/jupyterlab/pyproject.toml index ae838c05d7..8ed1e5bc10 100644 --- a/jupyterlab/pyproject.toml +++ b/jupyterlab/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" name = "qsharp-jupyterlab" version = "0.0.0" readme = "README.md" -requires-python = ">=3.8" +requires-python = ">=3.9" classifiers = [ "Framework :: Jupyter", "Framework :: Jupyter :: JupyterLab", @@ -16,10 +16,10 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ] dependencies = [ ] diff --git a/pip/Cargo.toml b/pip/Cargo.toml index e032dfcfd5..004ed6d939 100644 --- a/pip/Cargo.toml +++ b/pip/Cargo.toml @@ -27,12 +27,12 @@ workspace = true allocator = { path = "../allocator" } [target.'cfg(not(any(target_os = "windows")))'.dependencies] -pyo3 = { workspace = true, features = ["abi3-py38", "extension-module", "num-bigint", "num-complex"] } +pyo3 = { workspace = true, features = ["abi3-py39", "extension-module", "num-bigint", "num-complex"] } [target.'cfg(any(target_os = "windows"))'.dependencies] # generate-import-lib: skip requiring Python 3 distribution # files to be present on the (cross-)compile host system. -pyo3 = { workspace = true, features = ["abi3-py38", "extension-module", "generate-import-lib", "num-bigint", "num-complex"] } +pyo3 = { workspace = true, features = ["abi3-py39", "extension-module", "generate-import-lib", "num-bigint", "num-complex"] } [lib] crate-type = ["cdylib"] diff --git a/pip/pyproject.toml b/pip/pyproject.toml index 62b0393cab..0ca5d6c485 100644 --- a/pip/pyproject.toml +++ b/pip/pyproject.toml @@ -1,15 +1,16 @@ [project] name = "qsharp" version = "0.0.0" -requires-python = ">= 3.8" +requires-python = ">= 3.9" classifiers = [ "License :: OSI Approved :: MIT License", "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Programming Language :: Python", "Programming Language :: Rust", "Operating System :: MacOS",