From 77f2ebccbf8a8e306702b6c846fdeaf8ae2fdc44 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 18 Jan 2022 10:00:10 -0500 Subject: [PATCH 1/7] Drop support for Python 3.6 Now that Qiskit Aer 0.10.0 has been released that Qiskit no longer supports python 3.6 (in the lead up to adding support for python 3.10). This commit officially drops the support for python 3.6 and makes python 3.7 required to install qiskit-aer. It also removes all the ci jobs still using 3.6 both for testing and building wheels. --- .github/workflows/build.yml | 2 +- .github/workflows/deploy.yml | 6 +++--- .github/workflows/tests_linux.yml | 3 +-- setup.py | 3 +-- tox.ini | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e027621500..1cfefe7263 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -136,7 +136,7 @@ jobs: - name: Build Wheels env: CIBW_BEFORE_ALL_LINUX: "yum install -y openblas-devel" - CIBW_SKIP: "cp310-* pp*" + CIBW_SKIP: "cp36-*" "cp310-* pp*" CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" CIBW_ENVIRONMENT_WINDOWS: "CMAKE_GENERATOR='Visual Studio 16 2019'" run: cibuildwheel --output-dir wheelhouse diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f35926f9c2..17601d04f2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: - name: Build wheels env: CIBW_BEFORE_ALL_LINUX: "yum install -y openblas-devel" - CIBW_SKIP: "cp310-* pp*" + CIBW_SKIP: "cp36-*" "cp310-* pp*" CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" CIBW_ENVIRONMENT_WINDOWS: "CMAKE_GENERATOR='Visual Studio 16 2019'" run: | @@ -65,7 +65,7 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_BEFORE_ALL_LINUX: "yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel" - CIBW_SKIP: "cp310-* pp*" + CIBW_SKIP: "cp36-*" "cp310-* pp*" CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" CIBW_ARCHS_LINUX: aarch64 - uses: actions/upload-artifact@v2 @@ -117,7 +117,7 @@ jobs: - name: Build wheels env: CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && rpm -i cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && yum clean all && yum -y install cuda-10-1 openblas-devel" - CIBW_SKIP: "cp310-* *-manylinux_i686 pp*" + CIBW_SKIP: "cp36-*" "cp310-* *-manylinux_i686 pp*" CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" run: | diff --git a/.github/workflows/tests_linux.yml b/.github/workflows/tests_linux.yml index ea94fb0986..7c4c36a7dd 100644 --- a/.github/workflows/tests_linux.yml +++ b/.github/workflows/tests_linux.yml @@ -89,7 +89,7 @@ jobs: timeout-minutes: 60 strategy: matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9] os: ["ubuntu-latest"] env: AER_THRUST_BACKEND: OMP @@ -113,7 +113,6 @@ jobs: run: python -m pip install -U -c constraints.txt -r requirements-dev.txt wheel - name: Install terra from source run: python -m pip install -U -c constraints.txt git+https://github.com/Qiskit/qiskit-terra - if: matrix.python-version != '3.6' - name: Install openblas run: | set -e diff --git a/setup.py b/setup.py index 69e04f24f3..d9447cb24c 100644 --- a/setup.py +++ b/setup.py @@ -131,13 +131,12 @@ def install_needed_req(import_name, package_name=None, min_version=None, max_ver "Operating System :: POSIX :: Linux", "Programming Language :: C++", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Topic :: Scientific/Engineering", ], - python_requires=">=3.6", + python_requires=">=3.7", install_requires=requirements, setup_requires=setup_requirements, include_package_data=True, diff --git a/tox.ini b/tox.ini index 1145705ef6..7c86405c8a 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] minversion = 2.1 -envlist = py36, py37, py38, py39, lint +envlist = py37, py38, py39, lint skipsdist = True [testenv] From f1c65be25e98f7198a123dd0688854a2d5f29add Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 18 Jan 2022 16:08:03 -0500 Subject: [PATCH 2/7] Add release note --- releasenotes/notes/drop-python36-61553302523fa240.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 releasenotes/notes/drop-python36-61553302523fa240.yaml diff --git a/releasenotes/notes/drop-python36-61553302523fa240.yaml b/releasenotes/notes/drop-python36-61553302523fa240.yaml new file mode 100644 index 0000000000..863e24af04 --- /dev/null +++ b/releasenotes/notes/drop-python36-61553302523fa240.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Running qiskit-aer with Python 3.6 is no longer supported. Python >= 3.7 + is no required to install and run qiskit-aer. From dff553a15e6213b1137251b2159cedc9e8a373be Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 18 Jan 2022 16:09:45 -0500 Subject: [PATCH 3/7] Fix syntax error in job configuration --- .github/workflows/build.yml | 2 +- .github/workflows/deploy.yml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1cfefe7263..5eb1b0f60f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -136,7 +136,7 @@ jobs: - name: Build Wheels env: CIBW_BEFORE_ALL_LINUX: "yum install -y openblas-devel" - CIBW_SKIP: "cp36-*" "cp310-* pp*" + CIBW_SKIP: "cp36-* cp310-* pp*" CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" CIBW_ENVIRONMENT_WINDOWS: "CMAKE_GENERATOR='Visual Studio 16 2019'" run: cibuildwheel --output-dir wheelhouse diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 17601d04f2..1e4a5e4372 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,7 +22,7 @@ jobs: - name: Build wheels env: CIBW_BEFORE_ALL_LINUX: "yum install -y openblas-devel" - CIBW_SKIP: "cp36-*" "cp310-* pp*" + CIBW_SKIP: "cp36-* cp310-* pp*" CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" CIBW_ENVIRONMENT_WINDOWS: "CMAKE_GENERATOR='Visual Studio 16 2019'" run: | @@ -65,7 +65,7 @@ jobs: python -m cibuildwheel --output-dir wheelhouse env: CIBW_BEFORE_ALL_LINUX: "yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel" - CIBW_SKIP: "cp36-*" "cp310-* pp*" + CIBW_SKIP: "cp36-* cp310-* pp*" CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" CIBW_ARCHS_LINUX: aarch64 - uses: actions/upload-artifact@v2 @@ -117,7 +117,7 @@ jobs: - name: Build wheels env: CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && rpm -i cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && yum clean all && yum -y install cuda-10-1 openblas-devel" - CIBW_SKIP: "cp36-*" "cp310-* *-manylinux_i686 pp*" + CIBW_SKIP: "cp36-* cp310-* *-manylinux_i686 pp*" CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" run: | From 2c5c6539920a2d1c02a415f624ca2b668016a73c Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 18 Jan 2022 16:13:15 -0500 Subject: [PATCH 4/7] Update releasenotes/notes/drop-python36-61553302523fa240.yaml Co-authored-by: Jake Lishman --- releasenotes/notes/drop-python36-61553302523fa240.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/releasenotes/notes/drop-python36-61553302523fa240.yaml b/releasenotes/notes/drop-python36-61553302523fa240.yaml index 863e24af04..0d590b6231 100644 --- a/releasenotes/notes/drop-python36-61553302523fa240.yaml +++ b/releasenotes/notes/drop-python36-61553302523fa240.yaml @@ -2,4 +2,4 @@ upgrade: - | Running qiskit-aer with Python 3.6 is no longer supported. Python >= 3.7 - is no required to install and run qiskit-aer. + is now required to install and run qiskit-aer. From 532b8a1d676a9fb5d39344cb6c3b62a2509bdf66 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 18 Jan 2022 16:23:48 -0500 Subject: [PATCH 5/7] Unify cibuildwheel configuration to pyproject.toml This commit removes all the environment variable usage for default configuration of cibuildwheel and switches to use the pyproject.toml to centralize the configuration for all the jobs. Environment variables are still used for per job custom overrides which don't really fit in the configuration of the pyproject.toml (mainly cross-build overrides and GPU configuration). --- .github/workflows/build.yml | 7 +------ .github/workflows/deploy.yml | 18 ++++-------------- pyproject.toml | 12 ++++++++++++ 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5eb1b0f60f..e8a66a0b53 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -132,13 +132,8 @@ jobs: uses: microsoft/setup-msbuild@v1.0.2 if: runner.os == 'Windows' - name: Install deps - run: python -m pip install -U cibuildwheel==2.1.2 + run: python -m pip install -U cibuildwheel==2.2.2 - name: Build Wheels - env: - CIBW_BEFORE_ALL_LINUX: "yum install -y openblas-devel" - CIBW_SKIP: "cp36-* cp310-* pp*" - CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" - CIBW_ENVIRONMENT_WINDOWS: "CMAKE_GENERATOR='Visual Studio 16 2019'" run: cibuildwheel --output-dir wheelhouse - uses: actions/upload-artifact@v2 with: diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 1e4a5e4372..e7ab4f12df 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -18,15 +18,9 @@ jobs: python-version: '3.7' - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==2.1.2 + python -m pip install cibuildwheel==2.2.2 - name: Build wheels - env: - CIBW_BEFORE_ALL_LINUX: "yum install -y openblas-devel" - CIBW_SKIP: "cp36-* cp310-* pp*" - CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" - CIBW_ENVIRONMENT_WINDOWS: "CMAKE_GENERATOR='Visual Studio 16 2019'" - run: | - python -m cibuildwheel --output-dir wheelhouse + run: python -m cibuildwheel --output-dir wheelhouse - uses: actions/upload-artifact@v2 with: path: ./wheelhouse/*.whl @@ -59,14 +53,12 @@ jobs: platforms: all - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==2.1.2 twine + python -m pip install cibuildwheel==2.2.2 twine - name: Build wheels run: | python -m cibuildwheel --output-dir wheelhouse env: CIBW_BEFORE_ALL_LINUX: "yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel" - CIBW_SKIP: "cp36-* cp310-* pp*" - CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" CIBW_ARCHS_LINUX: aarch64 - uses: actions/upload-artifact@v2 with: @@ -113,13 +105,11 @@ jobs: if: runner.os == 'Windows' - name: Install cibuildwheel run: | - python -m pip install cibuildwheel==2.1.2 + python -m pip install cibuildwheel==2.2.2 - name: Build wheels env: CIBW_BEFORE_ALL: "yum install -y yum-utils wget && wget https://developer.download.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && rpm -i cuda-repo-rhel6-10-1-local-10.1.243-418.87.00-1.0-1.x86_64.rpm && yum clean all && yum -y install cuda-10-1 openblas-devel" - CIBW_SKIP: "cp36-* cp310-* *-manylinux_i686 pp*" CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc - CIBW_TEST_COMMAND: "python {project}/tools/verify_wheels.py" run: | python -m cibuildwheel --output-dir wheelhouse - uses: actions/upload-artifact@v2 diff --git a/pyproject.toml b/pyproject.toml index ac7e9224c4..722f243b63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,3 +11,15 @@ requires = [ "numpy==1.16.3; python_version<='3.7' and platform_machine!='aarch64' or platform_python_implementation=='PyPy'", ] build-backend = "setuptools.build_meta" + +[tool.cibuildwheel] +manylinux-x86_64-image = "manylinux2010" +manylinux-i686-image = "manylinux2010" +skip = "pp* cp36-* cp310-*" +test-command = "python {project}/tools/verify_wheels.py" + +[tool.cibuildwheel.linux] +before-all = "yum install -y openblas-devel" + +[tool.cibuildwheel.windows] +environment = {"CMAKE_GENERATOR": "Visual Studio 16 2019"} From 2bccaf0faa5086cd6d89671648e11d760a8f4e38 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Tue, 18 Jan 2022 16:42:23 -0500 Subject: [PATCH 6/7] Fix toml inline table syntax error --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 722f243b63..0de18bf70b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,4 +22,4 @@ test-command = "python {project}/tools/verify_wheels.py" before-all = "yum install -y openblas-devel" [tool.cibuildwheel.windows] -environment = {"CMAKE_GENERATOR": "Visual Studio 16 2019"} +environment = { CMAKE_GENERATOR = "Visual Studio 16 2019"} From 45af2f920b03a70c6240cfda126da237eff6f9e9 Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Wed, 19 Jan 2022 11:31:18 -0500 Subject: [PATCH 7/7] Add musllinux wheels to skip list too Newer versions of cibuildwheel support building musllinux wheels for musl libc based linux distros, such as alpine linux, in addition to manylinux wheels (which are not compatible with musl libc based linux distros and only work with glibc distros). The musllinux build environments are different and not centos based so builds fail in them. Since we're not supporting musl platforms in qiskit-aer we don't need to attempt to build wheels for that platform. This commit adds musllinux builds to the skip list in the common cibuildwheel configuration accordingly. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0de18bf70b..1a500421f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,7 @@ build-backend = "setuptools.build_meta" [tool.cibuildwheel] manylinux-x86_64-image = "manylinux2010" manylinux-i686-image = "manylinux2010" -skip = "pp* cp36-* cp310-*" +skip = "pp* cp36-* cp310-* *musllinux*" test-command = "python {project}/tools/verify_wheels.py" [tool.cibuildwheel.linux]