@@ -110,18 +110,38 @@ else
110110 exit 1
111111fi
112112
113- pip3 install conan==${CONAN_VERSION} # C/C++ package manager
114-
115- pip3 install -U setuptools
116- # wheel must be installed before bfloat16: bfloat16 has no pre-built wheel
117- # for Python 3.8, so pip builds from source. Without the wheel package, pip
118- # uses PEP 517 build isolation which can't see the installed numpy.
119- pip3 install wheel ' numpy<2'
120- pip3 install bfloat16 # wheel: bfloat16 dtype support for PyKnowhere
121- pip3 install auditwheel # wheel: manylinux wheel repair
113+ if [[ " ${OS} " == " Mac" ]]; then
114+ # macOS Homebrew Python (PEP 668) blocks system-wide pip install;
115+ # use pipx for conan. Wheel-building packages (setuptools, wheel,
116+ # bfloat16, auditwheel) are Linux-only for the swig-build job.
117+ brew install pipx
118+ pipx ensurepath
119+ pipx install conan==${CONAN_VERSION}
120+ export PATH=" $HOME /.local/bin:$PATH "
121+ # In GitHub Actions each step spawns a new shell, so the PATH export above
122+ # only affects install_deps.sh itself. Persist ~/.local/bin to GITHUB_PATH
123+ # so subsequent steps (Build, Test) can find the conan command.
124+ if [[ -n " ${GITHUB_PATH:- } " ]]; then
125+ echo " $HOME /.local/bin" >> " ${GITHUB_PATH} "
126+ fi
127+ else
128+ pip3 install conan==${CONAN_VERSION} # C/C++ package manager
129+
130+ pip3 install -U setuptools
131+ # wheel must be installed before bfloat16: bfloat16 has no pre-built wheel
132+ # for Python 3.8, so pip builds from source. Without the wheel package, pip
133+ # uses PEP 517 build isolation which can't see the installed numpy.
134+ pip3 install wheel ' numpy<2'
135+ pip3 install bfloat16 # wheel: bfloat16 dtype support for PyKnowhere
136+ pip3 install auditwheel # wheel: manylinux wheel repair
137+ fi
122138
123139echo " [install_deps] Configuring conan profile and remote..."
124140conan profile detect --force || true
125141conan remote add default-conan-local2 ${CONAN_REMOTE_URL} || true
126142
143+ # Remove stale libelf cache from previous runs (uploaded with --only-recipe,
144+ # missing exports_sources content). Let it be fetched from conancenter instead.
145+ conan remove libelf/0.8.13 -c 2> /dev/null || true
146+
127147echo " [install_deps] Done."
0 commit comments