Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit bdcdf47

Browse files
authored
Fix CI for macOS (#78)
Use the unversioned bin directory
1 parent 42e0828 commit bdcdf47

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

package/build-wheels-macos.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,11 @@ brew upgrade gcc
3939
brew info gcc
4040

4141
# Get the python version numbers only by splitting the string
42-
PYBIN="/usr/local/opt/$PYTHON_VERSION/bin"
42+
PYBIN="/usr/local/opt/$PYTHON_VERSION/libexec/bin"
43+
INTERPRETER="$PYBIN/python"
4344
ls -ltr /usr/local/opt/python*
4445
ls -ltr $PYBIN
46+
ls -ltr $INTERPRETER
4547
export PATH=$PYBIN:/usr/local/bin:$PATH
4648
echo "Python bin path: $PYBIN"
4749

@@ -77,7 +79,7 @@ done
7779
# Install `delocate` -- OSX equivalent of `auditwheel`
7880
# see https://pypi.org/project/delocate/ for more details
7981
cd $CURRDIR
80-
"${PYBIN}/pip3" install delocate==0.10.0
82+
$INTERPRETER -m pip install delocate==0.10.0
8183

8284
ls -ltrh /usr/local
8385
ls -ltrh /usr/local/opt
@@ -107,7 +109,7 @@ cd $CURRDIR
107109
cat setup.py
108110
# flags must be passed, to avoid the issue: `Unsupported compiler -- pybind11 requires C++11 support!`
109111
# see https://github.com/quantumlib/qsim/issues/242 for more details
110-
CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ LDFLAGS=-L/usr/local/opt/libomp/lib "${PYBIN}/python3" setup.py bdist_wheel
112+
CC=/usr/local/opt/llvm/bin/clang CXX=/usr/local/opt/llvm/bin/clang++ LDFLAGS=-L/usr/local/opt/libomp/lib $INTERPRETER setup.py bdist_wheel
111113
cp ./dist/*.whl $CURRDIR/wheelhouse_unrepaired
112114

113115
# Bundle external shared libraries into the wheels

0 commit comments

Comments
 (0)