Skip to content

Commit a452adf

Browse files
committed
Work around Pillow build failures on Linux
The work around works like this: we pip-install a version of Pillow < 11.3 using the `before-test` option of cibuildwheel, so that when cibuildwheel does its pip-install of the qsimcirq package that it built, the Pillow dependency is satisfied. This works because the requirement of Pillow in Matplotlib does not require 11.3; it just requires a version higher than 9, which our pre-installation of Pillow satisfies. This should be a temporary workaround only. We should update qsim to use cibuildwheel 3 and manylinux_2_28 – this problem may go away at that point.
1 parent 4826525 commit a452adf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
[tool.cibuildwheel]
1616
test-extras = "dev"
1717
dependency-versions = "latest"
18-
# Due to package & module name conflict, temporarily move it away to run tests:
18+
# Due to package & module name conflict, temporarily move qsimcirq away.
1919
before-test = "mv {package}/qsimcirq /tmp"
2020
test-command = "pytest -s -v {package}/qsimcirq_tests/qsimcirq_test.py && mv /tmp/qsimcirq {package}"
2121

@@ -27,3 +27,6 @@ repair-wheel-command = "delocate-listdeps {wheel} && delocate-wheel --verbose --
2727
manylinux-x86_64-image = "manylinux2014"
2828
manylinux-i686-image = "manylinux2014"
2929
skip = "*musllinux*"
30+
# Pillow version 11.3.0 causes failures during wheel testing on Linux.
31+
# TODO: remove after the Pillow install no longer fails.
32+
before-test = "pip install 'pillow<11.3' && mv {package}/qsimcirq /tmp"

0 commit comments

Comments
 (0)