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

How to build a python3.7-abi wheel for ppc64le? #1022

Open
3 tasks done
mgiessing opened this issue Aug 24, 2024 · 0 comments
Open
3 tasks done

How to build a python3.7-abi wheel for ppc64le? #1022

mgiessing opened this issue Aug 24, 2024 · 0 comments

Comments

@mgiessing
Copy link

mgiessing commented Aug 24, 2024

Expected behaviour

I want to build a opencv_python-4.10.0.84-cp37-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl but the abi3 part is missing (i.e. I need to built it manually for py37,38,39,310,311,312,313)

It works generally fine, but I just get:

opencv_python-4.10.0.84-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

...

opencv_python-4.10.0.84-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl

Actual behaviour

It doesn't build the abi3 part - I guess I'm missing a flag etc.?

Steps to reproduce

Be on a ppc64le system to reproduce:

a) Build the build-image

cd /tmp
wget https://raw.githubusercontent.com/opencv/opencv-python/4.x/docker/manylinux2014/Dockerfile_aarch64 -O Dockerfile.ppc64le

sed -i "s/aarch64/ppc64le/g" Dockerfile.ppc64le

docker build -t quay.io/mgiessing/opencv-build:4x -f Dockerfile.ppc64le .

b) Run the build image and build the ppc64le manylinux2014 wheel

# Build manually using Dockerfile.aarch64 and adopted minimally for ppc64le (based off the official quay.io/pypa/manylinux2014_ppc64le)
docker run -ti --rm quay.io/mgiessing/opencv-build:4x

# Repo that has manylinux2014 numpy ppc64le wheels
mkdir ~/.pip
echo "[global]" > ~/.pip/pip.conf
echo "extra-index-url = https://repo.fury.io/mgiessing" >> ~/.pip/pip.conf

cd $HOME
ver=cp37-cp37m

export CMAKE_ARGS="-G Ninja -DPYTHON3_LIMITED_API=ON"

git clone -b 84 --recursive https:/opencv/opencv-python.git && cd opencv-python

# Needed as ppc64le has numpy 1.19.5 prebuilt wheel
sed -i "s/numpy==1.17.0/numpy==1.19.5/g" pyproject.toml

/opt/python/${ver}/bin/pip3 install ninja
export PATH=$PATH:/home/ci/.local/lib/python3.7/site-packages/ninja/data/bin
/opt/python/${ver}/bin/pip3 wheel . --verbose
auditwheel repair opencv_python*whl
Issue submission checklist
  • This is not a generic OpenCV usage question (looking for help for coding, other usage questions, homework etc.)
  • I have read the README of this repository and understand that this repository provides only an automated build toolchain for OpenCV Python packages (there is no actual OpenCV code here)
  • The issue is related to the build scripts in this repository, to the pre-built binaries or is a feature request (such as "please enable this additional dependency")
  • [] I'm using the latest version of opencv-python ==> No, I'm using version 84
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

No branches or pull requests

1 participant