Skip to content

Commit

Permalink
.# Please enter the commit message for your changes. Lines starting
Browse files Browse the repository at this point in the history
  • Loading branch information
kiyoon committed Oct 16, 2024
1 parent 4075b04 commit 44a810c
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions python/src/apbs_binary/executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,16 @@ def process_run(
def process_run(
bin_name, *args: str, return_completed_process: bool = False, **kwargs: Any
) -> int | subprocess.CompletedProcess[str | bytes]:
# if mac arm64, set DYLD_LIBRARY_PATH
if sys.platform == "darwin" and platform.processor() == "arm":
my_env = os.environ.copy()
my_env["DYLD_LIBRARY_PATH"] = str(LIB_DIR)
complete_process = subprocess.run(
[bin_path(bin_name), *args], env=my_env, **kwargs
)
else:
complete_process = subprocess.run([bin_path(bin_name), *args], **kwargs)
# # if mac arm64, set DYLD_LIBRARY_PATH
# if sys.platform == "darwin" and platform.processor() == "arm":
# my_env = os.environ.copy()
# my_env["DYLD_LIBRARY_PATH"] = str(LIB_DIR)
# complete_process = subprocess.run(
# [bin_path(bin_name), *args], env=my_env, **kwargs
# )
# else:
# complete_process = subprocess.run([bin_path(bin_name), *args], **kwargs)
complete_process = subprocess.run([bin_path(bin_name), *args], **kwargs)

if return_completed_process:
return complete_process
Expand Down

0 comments on commit 44a810c

Please sign in to comment.