Skip to content

Commit

Permalink
checkdetection
Browse files Browse the repository at this point in the history
  • Loading branch information
radarhere committed Nov 14, 2023
1 parent 8e7e16b commit a9d2e3e
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 1 deletion.
59 changes: 59 additions & 0 deletions .github/workflows/wheels-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,71 @@ if [[ -n "$IS_MACOS" ]]; then
fi
fi

build_xz
if [ -z "$IS_ALPINE" ] && [ -z "$IS_MACOS" ]; then
yum remove -y zlib-devel
fi
build_new_zlib

if [ -n "$IS_MACOS" ]; then
ORIGINAL_BUILD_PREFIX=$BUILD_PREFIX
ORIGINAL_PKG_CONFIG_PATH=$PKG_CONFIG_PATH
BUILD_PREFIX=`dirname $(dirname $(which python))`
PKG_CONFIG_PATH="$BUILD_PREFIX/lib/pkgconfig"
fi
build_simple xcb-proto 1.16.0 https://xorg.freedesktop.org/archive/individual/proto
if [ -n "$IS_MACOS" ]; then
build_simple xorgproto 2023.2 https://www.x.org/pub/individual/proto
build_simple libXau 1.0.11 https://www.x.org/pub/individual/lib
build_simple libpthread-stubs 0.5 https://xcb.freedesktop.org/dist
ls -la /Library/Frameworks/Python.framework/Versions
ls -la /Library/Frameworks/Python.framework/Versions/Current
ls -la /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc
cp /Library/Frameworks/Python.framework/Versions/Current/share/pkgconfig/xcb-proto.pc /Library/Frameworks/Python.framework/Versions/Current/lib/pkgconfig
else
sed s/\${pc_sysrootdir\}// /usr/local/share/pkgconfig/xcb-proto.pc > /usr/local/lib/pkgconfig/xcb-proto.pc
fi
build_simple libxcb $LIBXCB_VERSION https://www.x.org/releases/individual/lib
if [ -n "$IS_MACOS" ]; then
BUILD_PREFIX=$ORIGINAL_BUILD_PREFIX
PKG_CONFIG_PATH=$ORIGINAL_PKG_CONFIG_PATH
fi

build_libjpeg_turbo
if [[ -n "$IS_MACOS" ]]; then
rm /usr/local/lib/libjpeg.dylib
fi
build_tiff
build_libpng
build_lcms2
build_openjpeg

ORIGINAL_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -O3 -DNDEBUG"
if [[ -n "$IS_MACOS" ]]; then
CFLAGS="$CFLAGS -Wl,-headerpad_max_install_names"
fi
build_libwebp
CFLAGS=$ORIGINAL_CFLAGS

build_brotli

if [ -n "$IS_MACOS" ]; then
# Custom freetype build
build_simple freetype $FREETYPE_VERSION https://download.savannah.gnu.org/releases/freetype tar.gz --with-harfbuzz=no
else
build_freetype
fi

if [ -z "$IS_MACOS" ]; then
export FREETYPE_LIBS=-lfreetype
export FREETYPE_CFLAGS=-I/usr/local/include/freetype2/
fi
build_simple harfbuzz $HARFBUZZ_VERSION https://github.com/harfbuzz/harfbuzz/releases/download/$HARFBUZZ_VERSION tar.xz --with-freetype=yes --with-glib=no
if [ -z "$IS_MACOS" ]; then
export FREETYPE_LIBS=''
export FREETYPE_CFLAGS=''
fi

# Append licenses
for filename in wheels/dependency_licenses/*; do
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/wheels-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@ EXP_CODECS="jpg jpg_2000 libtiff zlib"
EXP_MODULES="freetype2 littlecms2 pil tkinter webp"
EXP_FEATURES="fribidi harfbuzz libjpeg_turbo raqm transp_webp webp_anim webp_mux xcb"

echo "torch"
if [ -n "$IS_MACOS" ]; then
echo "mac"
fi
if [[ "$OSTYPE" == "darwin"* ]]; then
echo "mac2"
brew install fribidi
export PKG_CONFIG_PATH="/usr/local/opt/openblas/lib/pkgconfig"
elif [ "${AUDITWHEEL_POLICY:9}" == "musllinux" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, macos-latest]
archs: [ x86_64 ]
steps:
- uses: actions/checkout@v4
Expand Down

0 comments on commit a9d2e3e

Please sign in to comment.