Skip to content

Commit

Permalink
more apple fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
david-cortes committed Mar 25, 2023
1 parent 03d1adb commit e3463e4
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,14 @@ def add_openmp_linkage(self):
args_apple_omp2 = ["-Xclang", "-fopenmp", "-L/usr/local/lib", "-lomp", "-I/usr/local/include"]
has_brew_omp = False
if is_apple:
res_brew_pref = subprocess.run(["brew", "--prefix", "libomp"], capture_output=True)
if res_brew_pref.returncode == EXIT_SUCCESS:
has_brew_omp = True
brew_omp_prefix = res_brew_pref.stdout.decode().strip()
args_apple_omp3 = ["-Xclang", "-fopenmp", f"-L{brew_omp_prefix}/lib", "-lomp", f"-I{brew_omp_prefix}/include"]
try:
res_brew_pref = subprocess.run(["brew", "--prefix", "libomp"], capture_output=True)
if res_brew_pref.returncode == EXIT_SUCCESS:
brew_omp_prefix = res_brew_pref.stdout.decode().strip()
args_apple_omp3 = ["-Xclang", "-fopenmp", f"-L{brew_omp_prefix}/lib", "-lomp", f"-I{brew_omp_prefix}/include"]
has_brew_omp = True
except Exception as e:
pass


if self.test_supports_compile_arg(arg_omp1, with_omp=True):
Expand Down Expand Up @@ -345,7 +348,7 @@ def test_supports_clang_reassociate(self):
setup(
name = "cmfrec",
packages = ["cmfrec"],
version = '3.5.1-3',
version = '3.5.1-4',
description = 'Collective matrix factorization',
author = 'David Cortes',
url = 'https://github.com/david-cortes/cmfrec',
Expand Down

0 comments on commit e3463e4

Please sign in to comment.