Skip to content

Commit 343f452

Browse files
tomasMizerawonder-sk
authored andcommitted
Add arm64 suffix for M-chips builds
1 parent 071ec5b commit 343f452

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

geodiff/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ IF(SKBUILD)
3131
IF (CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
3232
SET(GEODIFF_NAME "${GEODIFF_NAME}-win32")
3333
ENDIF (CMAKE_GENERATOR_PLATFORM STREQUAL "Win32")
34+
IF (APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
35+
SET(GEODIFF_NAME "${GEODIFF_NAME}-arm64")
36+
ENDIF (APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
3437
ELSE(SKBUILD)
3538
SET(GEODIFF_NAME geodiff)
3639
ENDIF(SKBUILD)

pygeodiff/geodifflib.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,10 @@ def package_libname(self):
190190
suffix = ".pyd"
191191
elif platform.system() == "Darwin":
192192
prefix = "lib"
193-
suffix = ".dylib"
193+
if platform.machine() == "arm64":
194+
suffix = "-arm64.dylib"
195+
else:
196+
suffix = ".dylib"
194197
else:
195198
prefix = "lib"
196199
suffix = ".so"

scripts/fetch_dist_for_all_platforms.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
plats = ["win32",
2727
"win_amd64",
2828
"macosx_10_9_x86_64",
29+
"macosx_14_0_arm64",
2930
"manylinux_2_24_x86_64"
3031
]
3132

@@ -47,6 +48,7 @@
4748
(not os.path.exists(FINALDIR + "/pygeodiff-" + VERSION + "-python.pyd")) or
4849
(not os.path.exists(FINALDIR + "/pygeodiff-" + VERSION + "-python-win32.pyd")) or
4950
(not os.path.exists(FINALDIR + "/libpygeodiff-" + VERSION + "-python.dylib")) or
51+
(not os.path.exists(FINALDIR + "/libpygeodiff-" + VERSION + "-python-arm64.dylib")) or
5052
(not os.path.exists(FINALDIR + "/libpygeodiff-" + VERSION + "-python.so"))
5153
):
5254
print ("ERROR")

0 commit comments

Comments
 (0)