Skip to content

Commit

Permalink
🐛 Fix broken manylinux wheels (#310)
Browse files Browse the repository at this point in the history
## Description

Due to the way Linux wheels are built by cibuildwheel (in a manylinux
docker container), environment varaiables are not passed down to the
container. As a result the `CI` environment variable is not defined in
the docker container, which is used to flip on the `DEPLOY` CMake
setting automatically.
This has lead to manylinux wheels being built with `-march=native` that
might produce errors like
```console
Illegal instruction (core dumped)
```
when trying to import the respective packages.

This PR fixes this by making sure that `DEPLOY="ON"` within
cibuildwheel.

## Checklist:

<!---
This checklist serves as a reminder of a couple of things that ensure
your pull request will be merged swiftly.
-->

- [x] The pull request only contains commits that are related to it.
- [x] I have added appropriate tests and documentation.
- [x] I have made sure that all CI jobs on GitHub pass.
- [x] The pull request introduces no new warnings and follows the
project's style guidelines.

Signed-off-by: burgholzer <[email protected]>
  • Loading branch information
burgholzer committed Sep 13, 2023
1 parent 87cf42e commit 4c66dd9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ test-skip = "cp312-*" # Qiskit Terra does not support Python 3.12 yet
build-frontend = "build"

[tool.cibuildwheel.linux]
environment = { DEPLOY="ON" }

[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET = "10.15" }
Expand Down

0 comments on commit 4c66dd9

Please sign in to comment.