Skip to content

Commit

Permalink
Tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis committed Jul 2, 2024
1 parent 52d1a9f commit 5d7842e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyflct/setup_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,17 @@ def get_extensions():
cfg["sources"].extend(sorted(glob(os.path.join(ROOT, "flct.pyx"))))
if sys.platform not in ["win32", "darwin"]:
cfg["libraries"].append("fftw3")
if get_compiler() == "msvc":
if get_compiler().lower() == "msvc":
# Anaconda paths
cfg["include_dirs"].append(os.path.join(sys.prefix, "Library", "include"))
cfg["library_dirs"].append(os.path.join(sys.prefix, "Library", "lib"))
else:
cfg["libraries"].append("m")
if sys.platform == "darwin":
if sys.platform.lower() == "darwin":
brew_path = (
subprocess.run(["brew", "--prefix"], stdout=subprocess.PIPE).stdout.decode("utf-8").replace("\n", "")
)
cfg["include_dirs"].append(f"{brew_path}/include/")
cfg["include_dirs"].append("/usr/include/")
cfg["include_dirs"].append(f"{brew_path}/include")
cfg["include_dirs"].append("/usr/include")
cfg["extra_compile_args"].extend(["-O3", "-w", "-fomit-frame-pointer", "-fPIC"])
return [Extension("pyflct._flct", **cfg)]

0 comments on commit 5d7842e

Please sign in to comment.