Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Linux AArch64 wheel build support #18

Closed
wants to merge 1 commit into from

Conversation

odidev
Copy link

@odidev odidev commented Dec 27, 2021

Added linux aarch64 wheel build support.
Related to #17, @bstellato Could you please review this PR?

Signed-off-by: odidev <odidev@puresoftware.com>
@CLAassistant
Copy link

CLAassistant commented Dec 27, 2021

CLA assistant check
All committers have signed the CLA.

@nrontsis
Copy link

nrontsis commented Dec 9, 2022

+1

1 similar comment
@mmiller-max
Copy link

+1

@nrontsis
Copy link

nrontsis commented Feb 20, 2023

Until this gets merged, here's how I generate wheels locally:

Save the following as build-qdldl-wheel.sh in an empty folder

#!/bin/bash
# Builds a wheel for qdldl
set -eu  # Stop script if a line fails
QDLDL_VERSION=${1}
echo "Building qdldl==$QDLDL_VERSION"

# numpy is in "install_requires" of qdldl - perhaps we don't need to install oldest-supported-numpy that is typically
# recommended for build requirements. https://numpy.org/devdocs/dev/depending_on_numpy.html#build-time-dependency
# However we install it here to be conservative, instead of just relying on the latest version.
python3 -m pip install oldest-supported-numpy

git clone --recurse-submodules https://github.com/osqp/qdldl-python --depth=1 --branch v$QDLDL_VERSION
pushd qdldl-python
mkdir dist
# Using constraints.txt might not be necessary if the package specifies build requirements correctly
# However, I prefer to be conservative here and end up with loud errors, rather than generate packages
# that have compatibility issues.
python3 -m pip freeze > constraints.txt
python3 -m pip wheel --constraint constraints.txt --wheel-dir=./dist .
for wheel in dist/qdldl*; do
    auditwheel repair $wheel  # Inject solver's shared libraries to wheel
done
for wheel in wheelhouse/*.whl; do
    cp -rf $wheel /wheels/ # Copy repaired wheel to shared volume
done
popd

popd

and then run from within that folder:

export PYTHON_BIN=/opt/python/cp311-cp311/bin/python
export QDLDL_VERSION=0.1.5.post3
docker run -v $(pwd):/wheels --rm --platform=linux/aarch64 quay.io/pypa/manylinux_2_28_aarch64 /bin/bash -c "\
    ln -s ${PYTHON_BIN} /bin/python3 && \
    bash /wheels/build-qdldl-wheel.sh ${QDLDL_VERSION}"

The generated wheel should appear in the folder the above command was executed from.

@imciner2
Copy link
Member

aarch64 linux wheels are now available on PyPi after the recent refactor of the CI pipelines.

@imciner2 imciner2 closed this Jun 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants