Skip to content

Commit

Permalink
shot in the dark for mac os
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Jun 18, 2024
1 parent 3432e66 commit 926de05
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyflct/setup_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from glob import glob
from collections import defaultdict
from distutils.core import Extension

import subprocess
import numpy as np
from extension_helpers import get_compiler

Expand All @@ -26,6 +26,9 @@ def get_extensions():
cfg["library_dirs"].append(os.path.join(sys.prefix, "Library", "lib"))
else:
cfg["libraries"].append("m")
if sys.platform == "darwin":
brew_path = subprocess.run(['brew', '--prefix'], stdout=subprocess.PIPE).stdout.decode('utf-8')
cfg["include_dirs"].append(f"{brew_path}/include/")
cfg["include_dirs"].append("/usr/include/")
cfg["extra_compile_args"].extend(["-O3", "-Wall", "-fomit-frame-pointer", "-fPIC"])

Expand Down

0 comments on commit 926de05

Please sign in to comment.