Repair wheels on macOS correctly

This commit is contained in:
Nguyễn Gia Phong 2020-05-02 18:03:57 +07:00 committed by GitHub
parent 7ff1d8f1d7
commit 5406740517
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 25 additions and 7 deletions

View File

@ -1,7 +1,7 @@
#!/bin/sh
set -ev
set -ex
git clone --depth 1 https://github.com/kcat/alure /tmp/alure
cd /tmp/alure/build
OPENALDIR=$(brew --prefix openal-soft) cmake -DCMAKE_FIND_FRAMEWORK=NEVER ..
cmake --build . --config Release
sudo cmake --install .
OPENALDIR=$(brew --prefix openal-soft) cmake -DCMAKE_FIND_FRAMEWORK=NEVER \
-S /tmp/alure -B /tmp/alure/build
sudo cmake --build /tmp/alure/build --parallel $(sysctl -n hw.ncpu) \
--config Release --target install

View File

@ -1,5 +1,5 @@
#!/bin/sh
set -ev
set -ex
yum install -y git cmake pulseaudio \
alsa-lib-devel pulseaudio-libs-devel jack-audio-connection-kit-devel \
libvorbis-devel opusfile-devel libsndfile-devel

12
.ci/repair-whl-macos Executable file
View File

@ -0,0 +1,12 @@
#!/bin/sh
set -ex
cd $(mktemp -d)
unzip $1
DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib delocate-path -L palace.dylibs .
wheel=$(basename $1)
zip -r $wheel *
mkdir -p $2
mv $wheel $2
tempdir=$(pwd)
cd -
rm -rf $tempdir

View File

@ -12,7 +12,9 @@ env:
- CIBW_MANYLINUX_X86_64_IMAGE=manylinux2014
- CIBW_BEFORE_BUILD_LINUX=.ci/before-build-manylinux2014
- CIBW_BEFORE_BUILD_MACOS=.ci/before-build-macos
- CIBW_TEST_REQUIRES_LINUX=tox
- CIBW_REPAIR_WHEEL_COMMAND_MACOS=".ci/repair-whl-macos {wheel} {dest_dir}"
- CIBW_TEST_REQUIRES=tox
# CIBW_TEST_COMMAND_MACOS="tox -c /Users/travis/build/McSinyx/palace"
- CIBW_TEST_COMMAND_LINUX="tox -c /project"
addons:
@ -35,6 +37,10 @@ jobs:
osx_image: xcode11.3
language: shell
env: CIBW_BUILD=cp37-macosx_x86_64
- os: osx
osx_image: xcode11.3
language: shell
env: CIBW_BUILD=cp38-macosx_x86_64
- services: docker
env: CIBW_BUILD=cp36-manylinux_x86_64
- services: docker