From f995a9ec2886e8f17bd41a5714d64293fb43a998 Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 28 Jun 2020 14:57:13 +1000 Subject: [PATCH 1/2] Added macOS PyPy --- .travis.yml | 15 +++++++++++++++ config.sh | 10 ++++++++++ 2 files changed, 25 insertions(+) diff --git a/.travis.yml b/.travis.yml index b92aa50c2..a7cf2e9fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -84,6 +84,13 @@ jobs: - MB_PYTHON_VERSION=3.8 - PLAT=i686 + - name: "3.6 macOS PyPy" + os: osx + osx_image: xcode9.3 + language: generic + env: + - MB_PYTHON_VERSION=pypy3.6-7.3 + - MB_PYTHON_OSX_VER=10.9 - name: "3.6 Xenial 64-bit PyPy" os: linux env: @@ -167,6 +174,14 @@ jobs: - PLAT=i686 - LATEST="true" + - name: "3.6 macOS PyPy latest" + os: osx + osx_image: xcode9.3 + language: generic + env: + - MB_PYTHON_VERSION=pypy3.6-7.3 + - MB_PYTHON_OSX_VER=10.9 + - LATEST="true" - name: "3.6 Xenial 64-bit PyPy latest" os: linux env: diff --git a/config.sh b/config.sh index 1ce61ed76..26b647b05 100644 --- a/config.sh +++ b/config.sh @@ -27,6 +27,12 @@ function pre_build { build_new_zlib fi + if [ -n "$IS_OSX" ]; 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 $LIBXCB_VERSION https://xcb.freedesktop.org/dist if [ -n "$IS_OSX" ]; then build_simple xproto 7.0.31 https://www.x.org/pub/individual/proto @@ -36,6 +42,10 @@ function pre_build { sed -i s/\${pc_sysrootdir\}// /usr/local/lib/pkgconfig/xcb-proto.pc fi build_simple libxcb $LIBXCB_VERSION https://xcb.freedesktop.org/dist + if [ -n "$IS_OSX" ]; then + BUILD_PREFIX=$ORIGINAL_BUILD_PREFIX + PKG_CONFIG_PATH=$ORIGINAL_PKG_CONFIG_PATH + fi # Custom flags to include both multibuild and jpeg defaults ORIGINAL_CFLAGS=$CFLAGS From 505e915516def3757a6b627f6e8907a73a36cb0f Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sun, 28 Jun 2020 14:57:57 +1000 Subject: [PATCH 2/2] Install NumPy with OpenBLAS on macOS --- .travis.yml | 2 +- config.sh | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a7cf2e9fd..55464bac0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,7 @@ env: - PLAT=x86_64 - UNICODE_WIDTH=32 - BUILD_DEPENDS="" - - TEST_DEPENDS="pytest pytest-cov numpy" + - TEST_DEPENDS="pytest pytest-cov" - MACOSX_DEPLOYMENT_TARGET=10.10 - WHEELHOUSE_UPLOADER_USERNAME=travis-worker # Following generated with diff --git a/config.sh b/config.sh index 26b647b05..17e64542b 100644 --- a/config.sh +++ b/config.sh @@ -91,6 +91,12 @@ EXP_MODULES="freetype2 littlecms2 pil tkinter webp" EXP_FEATURES="transp_webp webp_anim webp_mux xcb" function run_tests { + if [ -n "$IS_OSX" ]; then + brew install openblas + echo -e "[openblas]\nlibraries = openblas\nlibrary_dirs = /usr/local/opt/openblas/lib" >> ~/.numpy-site.cfg + fi + pip install numpy + # Runs tests on installed distribution from an empty directory (cd ../Pillow && run_tests_in_repo) # Test against expected codecs, modules and features