Skip to content

Commit

Permalink
Cleanup of setup.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
EricEngle-NOAA committed Aug 1, 2024
1 parent 5c10662 commit b79f86b
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,15 @@ def find_library(name, dirs=None, static=False):

# According to the ctypes documentation Mac and Windows ctypes_find_library
# returns the full path.
#
# IMPORTANT: The following does not work at this time (Jan. 2024) for macOS on
# Apple Silicon.
print(f'{out = }')
print(os.name, sys.platform)
print(sys.platform, platform.machine())
if (os.name, sys.platform) != ("posix", "linux"):
out.append(ctypes_find_library(name))
#if (sys.platform, platform.machine()) == ("darwin", "arm64"):
# pass
#else:
# out.append(ctypes_find_library(name))

print(f'{out = }')

# For Linux and macOS (Apple Silicon), we have to search ourselves.
libext = _libext_by_platform[sys.platform]
libext = ".a" if static else libext
if dirs is None:
if 'CONDA_PREFIX' in os.environ:
dirs = [os.environ["CONDA_PREFIX"]]
#if sys.platform == "darwin":
# libext = ".so" # If in conda and macos, then use ".so"
else:
dirs = ["/usr/local", "/sw", "/opt", "/opt/local", "/opt/homebrew", "/usr"]
if os.environ.get("LD_LIBRARY_PATH"):
Expand Down

0 comments on commit b79f86b

Please sign in to comment.