Skip to content

Commit 20d637c

Browse files
committed
Install Conan manually for CentOS 7 with uv Python
The get-conan action uses pip3 from the system Python, which installs conan to /usr/local/bin. On CentOS 7, this means the old system conan at /usr/bin takes precedence. Changes: - Move 'Fix PATH for local tools' to the top, before all setup steps - Install Conan manually for vfx2021/vfx2022 using python3.11 -m pip This ensures conan gets installed to ~/.local/bin with uv Python - Keep get-conan action for other platforms (vfx2023, Ubuntu, macOS, Windows) This ensures both Python 3.11 and Conan 2.x are in ~/.local/bin, which is now first in PATH, so they're found before system versions. Signed-off-by: Gary Oberbrunner <[email protected]>
1 parent 144d22e commit 20d637c

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ jobs:
189189
fi
190190
echo "RELEASE_NAME=${RELEASE_PREFIX}-${REF_SUFFIX}${OPENGL_BUILD}" >> $GITHUB_ENV
191191
192+
# Ensure ~/.local/bin is first in PATH for all local tools (uv, python, pip, conan)
193+
# This is especially important for old CentOS 7 containers with old system versions
194+
- name: Fix PATH for local tools
195+
run: |
196+
echo "$HOME/.local/bin" >> $GITHUB_PATH
197+
192198
- name: Set up python 3.11
193199
uses: actions/setup-python@v5
194200
if: matrix.ostype == 'mac'
@@ -217,18 +223,21 @@ jobs:
217223
echo -n 'python symlink target: ' && (readlink -f $(which python) || echo "not a symlink")
218224
echo -n 'which uv: ' && (which uv || echo "No uv; continuing")
219225
226+
# Install Conan manually for old CentOS 7 using uv-installed Python
227+
# The get-conan action doesn't know about uv Python and would use system Python
228+
- name: Install Conan manually (CentOS 7)
229+
if: matrix.vfx-cy == 2021 || matrix.vfx-cy == 2022
230+
run: |
231+
python3.11 -m pip install --user conan==${{ matrix.conan_version }}
232+
233+
# Use get-conan action for other platforms
220234
- name: Install Conan
221235
id: conan
236+
if: matrix.vfx-cy != 2021 && matrix.vfx-cy != 2022
222237
uses: turtlebrowser/get-conan@main
223238
with:
224239
version: ${{ matrix.conan_version }}
225240

226-
# Ensure ~/.local/bin is first in PATH for uv-installed Python and pip-installed Conan
227-
# This is especially important for old CentOS 7 containers with old system python/conan
228-
- name: Fix PATH for local tools
229-
run: |
230-
echo "$HOME/.local/bin" >> $GITHUB_PATH
231-
232241
- name: Set up conan
233242
run: |
234243
which conan

0 commit comments

Comments
 (0)