Skip to content

Commit 8c0a842

Browse files
committed
fix for M1 building.
1 parent 0d539b8 commit 8c0a842

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

build_scripts/wheels_macOS_M1.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@ export CIBW_BUILD_VERBOSITY=2
55
export CIBW_BUILD="*-macosx_arm64"
66
export CIBW_ARCHS=arm64
77
export CIBW_PLATFORM=macos
8+
export CIBW_ENVIRONMENT="MACOSX_DEPLOYMENT_TARGET=12.0"
9+
810

911
cibuildwheel --platform macos

libheif/build.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@
1313
include_dirs = ["/usr/local/include", "/usr/include", "/opt/local/include"]
1414
library_dirs = ["/usr/local/lib", "/usr/lib", "/lib", "/opt/local/lib"]
1515

16-
if platform.lower() in ("darwin", "win32"):
17-
include_dirs.append(path.dirname(path.dirname(path.abspath(__file__))))
18-
1916
include_path_prefix = ""
2017
if platform.lower() == "darwin":
2118
include_path_prefix = getenv("HOMEBREW_PREFIX")
@@ -33,6 +30,8 @@
3330
if include_path_prefix_lib not in library_dirs:
3431
library_dirs.append(include_path_prefix_lib)
3532

33+
if platform.lower() in ("darwin", "win32"):
34+
include_dirs.append(path.dirname(path.dirname(path.abspath(__file__))))
3635

3736
ffi.set_source(
3837
"pillow_heif.libheif",

0 commit comments

Comments
 (0)