Skip to content

Commit

Permalink
talipot-core/PluginLibraryLoader: Fix compilation on macOS 14
Browse files Browse the repository at this point in the history
  • Loading branch information
anlambert committed Nov 27, 2024
1 parent 01cd817 commit 103d9a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/talipot-core/src/PluginLibraryLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ bool PluginLibraryLoader::initPluginDir(PluginLoader *loader, bool recursive,
struct dirent **namelist;
int n = scandir(_pluginPath.c_str(), &namelist,
#if !(defined(__APPLE__) || defined(__FreeBSD__)) || \
(defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
(defined(__APPLE__) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 || defined(__arm64__)))
reinterpret_cast<int (*)(const dirent *)>(__talipot_select_libs),
#else
__talipot_select_libs,
Expand Down Expand Up @@ -420,7 +420,7 @@ bool PluginLibraryLoader::initPluginDir(PluginLoader *loader, bool recursive,

n = scandir(_pluginPath.c_str(), &namelist,
#if !(defined(__APPLE__) || defined(__FreeBSD__)) || \
(defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080)
(defined(__APPLE__) && (__MAC_OS_X_VERSION_MIN_REQUIRED >= 1080 || defined(__arm64__)))
reinterpret_cast<int (*)(const dirent *)>(__talipot_select_dirs),
#else
__talipot_select_dirs,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,17 @@ elif platform.system() == 'Linux':
class CustomWheel(bdist_wheel):
"""Override platform tags when building a wheel."""

def initialize_options(self):
super().initialize_options()

def finalize_options(self):
platform_name = get_platform("_")
if "universal2" in platform_name:
self.plat_name = platform_name.replace("universal2", platform.uname().machine)

def run(self):
super().run()



here = path.abspath(path.dirname(__file__))
Expand Down

0 comments on commit 103d9a7

Please sign in to comment.