Skip to content

Commit

Permalink
Use prebuild wheel for zxing-cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Apr 30, 2024
1 parent 968c9fe commit c306c1c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions build-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,21 +34,15 @@ if [ "$OS" = "macos" ]; then
rm -rf $HELPER
mkdir -p $HELPER

# Needed to build zxing-cpp properly
export CMAKE_OSX_ARCHITECTURES="arm64;x86_64"

# Export exact versions
poetry export --without-hashes > $HELPER/requirements.txt
grep cryptography $HELPER/requirements.txt > $HELPER/cryptography.txt
grep cffi $HELPER/requirements.txt > $HELPER/cffi.txt
grep pillow $HELPER/requirements.txt > $HELPER/pillow.txt
grep zxing-cpp $HELPER/requirements.txt > $HELPER/zxing-cpp.txt
# Remove non-universal packages
poetry run pip uninstall -y cryptography cffi pillow zxing-cpp
poetry run pip uninstall -y cryptography cffi pillow
# Build cffi from source to get universal build
poetry run pip install --upgrade -r $HELPER/cffi.txt --no-binary cffi
# Build zxing-cpp from source to get universal build
poetry run pip install --upgrade -r $HELPER/zxing-cpp.txt --no-binary zxing-cpp
# Explicitly install pre-build universal build of cryptography
poetry run pip download -r $HELPER/cryptography.txt --platform macosx_10_12_universal2 --only-binary :all: --no-deps --dest $HELPER
poetry run pip install -r $HELPER/cryptography.txt --no-cache-dir --no-index --find-links $HELPER
Expand Down

0 comments on commit c306c1c

Please sign in to comment.