qiskit/pyproject.toml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
773 B
TOML
Raw Normal View History

[build-system]
requires = ["Cython>=0.27.1", "setuptools", "wheel"]
[tool.black]
line-length = 100
target-version = ['py37', 'py38', 'py39', 'py310']
[tool.cibuildwheel]
manylinux-x86_64-image = "manylinux2014"
manylinux-i686-image = "manylinux2014"
Add cross-build wheel jobs for ppc64le and s390x (#7549) * Add cross-build wheel jobs for ppc64le and s390x This commit adds a new CI job at release time to build precompiled binaries for s390x and ppc64le linux platforms. These platforms do not have precompiled wheels for any upstream dependencies (except for retworkx and tweedledum, which both publish binaries for both platforms). Since the only publically available CI service that has native s390x and ppc64le environments available is travis which doesn't provide sufficient quota to open source projects anymore to make it usable we have to rely on either cross compilation or emulation. Cross compiling with python wheels while possible is quite tricky to setup and configure in practice so emulation is used here. This is a much simpler path configure, especially because cibuildwheel has support for emulating non-x86 architectures via QEMU to build wheels. While QEMU emulation of other architectures is exceedingly slow, we have a 6 hour job time limit with github actions which should hopefully be sufficient to compile the binary and build wheels for all our supported python versions. This was previously attempted in #5844 but we hit a timout issue reliably every time trying to build scipy from source. Compiling scipy is slow on a native system and it's an order of magnitude slower under qemu emulation. In #5844 we exceeded the 6 hour job time limit just compiling scipy once for testing. To avoid this issue (since scipy doesn't publish s390x or ppc64le wheels) this commit skips the test runs on these jobs. This means we're solely building the wheels and not testing if they're valid. This also means installing scipy and other dependencies is still an exercise for the s390x and ppc64le users. But, if this works it will mean that at least for Qiskit there will not be a need to compile anything from source. * DNM: Test builds in CI This commit should not be merged without being reverted first. It is changing the CI trigger to run on open pull requests and removing the twine upload step to trigger the wheel builds for testing and iteratively fixing issues. Once the builds work this will be reverted and the PR is ready for final review/merging. * Skip musl libc wheel builds * Fix ppc64le job name * Revert "DNM: Test builds in CI" Testing shows this works well and we can build and publish ppc64le and s390x wheels on release. This reverts commit f06c0b6176d5578f4c6c58e3510d768c1751bea3 and opens up the PR for review. * Add release note
2022-01-22 01:54:03 +08:00
skip = "pp* cp36-* *musllinux*"
test-skip = "cp310-win32 cp310-manylinux_i686"
test-command = "python {project}/examples/python/stochastic_swap.py"
# We need to use pre-built versions of Numpy and Scipy in the tests; they have a
# tendency to crash if they're installed from source by `pip install`, and since
# Numpy 1.22 there are no i686 wheels, so we force pip to use older ones without
# restricting any dependencies that Numpy and Scipy might have.
before-test = "pip install --only-binary=numpy,scipy numpy scipy"