Skip to content

Commit

Permalink
Drop support for Python 3.6 (#1430)
Browse files Browse the repository at this point in the history
* 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.

* Add release note

* Fix syntax error in job configuration

* Update releasenotes/notes/drop-python36-61553302523fa240.yaml

Co-authored-by: Jake Lishman <jake@binhbar.com>

* 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).

* Fix toml inline table syntax error

* 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.

Co-authored-by: Jake Lishman <jake@binhbar.com>
Co-authored-by: Hiroshi Horii <hhorii@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 21, 2022
1 parent 9f78243 commit 8c400ca
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,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: "*-manylinux_i686 pp* *musllinux*"
CIBW_SKIP: "*-manylinux_i686 pp* cp36* *musllinux*"
CIBW_ENVIRONMENT: QISKIT_AER_PACKAGE_NAME=qiskit-aer-gpu AER_THRUST_BACKEND=CUDA CUDACXX=/usr/local/cuda/bin/nvcc
run: |
python -m cibuildwheel --output-dir wheelhouse
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
timeout-minutes: 60
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
python-version: [3.7, 3.8, 3.9, "3.10"]
os: ["ubuntu-latest"]
env:
AER_THRUST_BACKEND: OMP
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ build-backend = "setuptools.build_meta"
[tool.cibuildwheel]
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2010"
skip = "pp* *musllinux*"
skip = "pp* cp36* *musllinux*"
test-skip = "cp310-win32 cp310-manylinux_i686"
test-command = "python {project}/tools/verify_wheels.py"
# We need to use pre-built versions of Numpy and Scipy in the tests; they have a
Expand All @@ -28,7 +28,7 @@ before-test = "pip install --only-binary=numpy,scipy numpy scipy"
before-all = "yum install -y openblas-devel"

[tool.cibuildwheel.windows]
environment = "CMAKE_GENERATOR='Visual Studio 16 2019'"
environment = { CMAKE_GENERATOR = "Visual Studio 16 2019"}

# For older Pythons we maintain our manylinux2010 support.
[[tool.cibuildwheel.overrides]]
Expand Down
5 changes: 5 additions & 0 deletions releasenotes/notes/drop-python36-61553302523fa240.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
upgrade:
- |
Running qiskit-aer with Python 3.6 is no longer supported. Python >= 3.7
is now required to install and run qiskit-aer.
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,13 @@ 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",
"Programming Language :: Python :: 3.10",
"Topic :: Scientific/Engineering",
],
python_requires=">=3.6",
python_requires=">=3.7",
install_requires=requirements,
setup_requires=setup_requirements,
include_package_data=True,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tox]
minversion = 2.1
envlist = py36, py37, py38, py39, py310, lint
envlist = py37, py38, py39, py310, lint
skipsdist = True

[testenv]
Expand Down

0 comments on commit 8c400ca

Please sign in to comment.