From 7fdb5249d8adfa2ce278fbf78f459682ee39846f Mon Sep 17 00:00:00 2001 From: Robert Bartel Date: Tue, 15 Oct 2024 13:32:34 -0400 Subject: [PATCH] Change Action numpy fix to use constraints. Using pip constraints to ensure any downstream `input.additional_python_requirements` that may be installed also are prevented from installing a problematic version. --- .github/actions/ngen-build/action.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/actions/ngen-build/action.yaml b/.github/actions/ngen-build/action.yaml index 1b0bdc3b97..04a693d7f5 100644 --- a/.github/actions/ngen-build/action.yaml +++ b/.github/actions/ngen-build/action.yaml @@ -120,6 +120,13 @@ runs: tar xjf boost_1_79_0.tar.bz2 shell: bash + - name: Set Pip Constraints + run: | + echo "numpy<2.0" > constraints.txt + sudo mv constraints.txt /constraints.txt + echo "PIP_CONSTRAINT=/constraints.txt" >> $GITHUB_ENV + shell: bash + - name: Cache Python Dependencies id: cache-py3-dependencies uses: actions/cache@v3 @@ -144,7 +151,7 @@ runs: python3 -m venv .venv . .venv/bin/activate pip install pip - pip install numpy<2.0.0 + pip install numpy deactivate shell: bash