Skip to content

Commit

Permalink
fix(ci): install python dependencies with --only-binary :all: in ma…
Browse files Browse the repository at this point in the history
…nylinux (#6120)

### Description
Only install python dependencies from wheels in manylinux.

### Motivation and Context
The latest version of google-re2 dropped support for manylinux2014.
google-re2 fails to build from sources thus failing the Linux release
pipelines.

This PR forces installation from wheels on manylinux which thus fallback
on the latest version of google-re2 with a wheel for manylinux2014.

Another solution would be to bump the manylinux images to manylinux_2_28
but that could have impact on downstream users (e.g. impossible to
install wheel from rh7, amazon linux 2, ubuntu 18.04).

Signed-off-by: mayeut <mayeut@users.noreply.github.com>
Co-authored-by: Justin Chu <justinchuby@users.noreply.github.com>
  • Loading branch information
mayeut and justinchuby committed May 4, 2024
1 parent 013eb5e commit 9f6f3a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/manylinux/entrypoint.sh
Expand Up @@ -16,12 +16,12 @@ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib
# Compile wheels
# Need to be updated if there is a new Python Version
if [ "$(uname -m)" == "aarch64" ]; then
PIP_INSTALL_COMMAND="$PY_VERSION -m pip install --no-cache-dir -q"
PIP_INSTALL_COMMAND="$PY_VERSION -m pip install --only-binary :all: --no-cache-dir -q"
PYTHON_COMMAND="$PY_VERSION"
else
declare -A python_map=( ["3.8"]="cp38-cp38" ["3.9"]="cp39-cp39" ["3.10"]="cp310-cp310" ["3.11"]="cp311-cp311" ["3.12"]="cp312-cp312")
PY_VER=${python_map[$PY_VERSION]}
PIP_INSTALL_COMMAND="/opt/python/${PY_VER}/bin/pip install --no-cache-dir -q"
PIP_INSTALL_COMMAND="/opt/python/${PY_VER}/bin/pip install --only-binary :all: --no-cache-dir -q"
PYTHON_COMMAND="/opt/python/${PY_VER}/bin/python"
fi

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_linux_aarch64.yml
Expand Up @@ -50,7 +50,7 @@ jobs:
${{ env.img }} \
bash -exc '${{ env.py }} -m pip install -q virtualenv && ${{ env.py }} -m venv .env && \
source .env/bin/activate && \
${{ env.py }} -m pip install -q -r requirements-release.txt && \
${{ env.py }} -m pip install --only-binary :all: -q -r requirements-release.txt && \
yum install -y protobuf-compiler protobuf-devel
deactivate'
Expand All @@ -74,7 +74,7 @@ jobs:
bash -exc '\
source .env/bin/activate && \
python -m pip install -q --upgrade pip && \
python -m pip install -q -r requirements-release.txt && \
python -m pip install --only-binary :all: -q -r requirements-release.txt && \
pip install dist/*manylinux2014_aarch64.whl && \
pytest && \
deactivate'
Expand Down

0 comments on commit 9f6f3a0

Please sign in to comment.