Skip to content

Commit c882a9f

Browse files
committed
Fix macOS wheel build in CI
1 parent 66da907 commit c882a9f

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/actions/common-wheel-build/action.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,17 @@ runs:
3131
run: |
3232
export PATH="$pythonLocation/bin:$PATH"
3333
export PYO3_PYTHON=$(which python${{ inputs.python-version }} || echo "$pythonLocation/bin/python${{ inputs.python-version }}")
34-
export RUSTFLAGS="-C link-args=-L$pythonLocation/lib -lpython${{ inputs.python-version }}"
35-
$PYO3_PYTHON --version
34+
export RUSTFLAGS="-C link-arg=-undefined -C link-arg=dynamic_lookup"
35+
36+
PYTHON_LIB_DIR=$(dirname $(dirname $PYO3_PYTHON))/lib
37+
export LIBRARY_PATH="$pythonLocation/lib:$PYTHON_LIB_DIR:$LIBRARY_PATH"
38+
export LD_LIBRARY_PATH="$pythonLocation/lib:$PYTHON_LIB_DIR:$LD_LIBRARY_PATH"
39+
export DYLD_LIBRARY_PATH="$pythonLocation/lib:$PYTHON_LIB_DIR:$DYLD_LIBRARY_PATH"
40+
41+
echo "PYO3_PYTHON: $PYO3_PYTHON"
42+
echo "PYTHON_LIB_DIR: $PYTHON_LIB_DIR"
43+
echo "RUSTFLAGS: $RUSTFLAGS"
44+
3645
uv build --wheel
3746
ls -lh dist/
3847

0 commit comments

Comments
 (0)