Skip to content

Commit e487a0f

Browse files
committed
Fixed xcb setup
1 parent 0204e70 commit e487a0f

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/workflows/wheels-dependencies.sh

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,25 @@ function build {
6767
fi
6868
build_new_zlib
6969

70-
if [ -n "$IS_MACOS" ]; then
70+
if [[ -n "$IS_MACOS" ]] && [[ "$CIBW_ARCHS" == "arm64" ]]; then
7171
ORIGINAL_BUILD_PREFIX=$BUILD_PREFIX
7272
ORIGINAL_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
7373
BUILD_PREFIX=`dirname $(dirname $(which python))`
7474
PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig"
7575
fi
7676
build_simple xcb-proto 1.16.0 https://xorg.freedesktop.org/archive/individual/proto
7777
if [ -n "$IS_MACOS" ]; then
78-
build_simple xorgproto 2023.2 https://www.x.org/pub/individual/proto
79-
build_simple libXau 1.0.11 https://www.x.org/pub/individual/lib
80-
build_simple libpthread-stubs 0.5 https://xcb.freedesktop.org/dist
81-
cp venv/share/pkgconfig/xcb-proto.pc venv/lib/pkgconfig/xcb-proto.pc
78+
if [[ "$CIBW_ARCHS" == "arm64" ]]; then
79+
build_simple xorgproto 2023.2 https://www.x.org/pub/individual/proto
80+
build_simple libXau 1.0.11 https://www.x.org/pub/individual/lib
81+
build_simple libpthread-stubs 0.5 https://xcb.freedesktop.org/dist
82+
cp /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc /Library/Frameworks/Python.framework/Versions/Current/lib/pkgconfig/xcb-proto.pc
83+
fi
8284
else
8385
sed s/\${pc_sysrootdir\}// /usr/local/share/pkgconfig/xcb-proto.pc > /usr/local/lib/pkgconfig/xcb-proto.pc
8486
fi
8587
build_simple libxcb $LIBXCB_VERSION https://www.x.org/releases/individual/lib
86-
if [ -n "$IS_MACOS" ]; then
88+
if [[ -n "$IS_MACOS" ]] && [[ "$CIBW_ARCHS" == "arm64" ]]; then
8789
BUILD_PREFIX=$ORIGINAL_BUILD_PREFIX
8890
PKG_CONFIG_PATH=$ORIGINAL_PKG_CONFIG_PATH
8991
fi

0 commit comments

Comments
 (0)