From 3438161f9dbaf1642ca246bcf0fb86f4264d0739 Mon Sep 17 00:00:00 2001 From: Alexandre Drouin Date: Thu, 30 May 2019 22:16:54 -0400 Subject: [PATCH 1/2] Fixed compilation issues on macOS --- cppext/setup.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/cppext/setup.py b/cppext/setup.py index 2769ab4..5ef30ea 100644 --- a/cppext/setup.py +++ b/cppext/setup.py @@ -1,6 +1,15 @@ -from distutils.core import setup, Extension import numpy as np +from distutils.core import setup, Extension +from platform import system as get_os_name + + +# Configure the compiler based on the OS +if get_os_name().lower() == "darwin": + os_compile_flags = ["-mmacosx-version-min=10.9"] +else: + os_compile_flags = [] + cppext_module = Extension( 'cppext', sources=['src/cppextmodule.cpp'], @@ -12,7 +21,7 @@ extra_compile_args=['-O3', # '-march=corei7-avx', # uncomment if available '-std=c++11', - '-Wno-parentheses'], + '-Wno-parentheses'] + os_compile_flags, # uncomment if available # extra_link_args=['-framework', # 'accelerate', From 84779b2cdc85f9a4eae69a45d4d53802d3acb9b5 Mon Sep 17 00:00:00 2001 From: ignavier Date: Tue, 17 Sep 2019 14:57:06 -0400 Subject: [PATCH 2/2] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index c6973eb..180ace3 100644 --- a/README.md +++ b/README.md @@ -173,3 +173,4 @@ Select *Kernel --> Restart & Run All*. ## Other implementations - Python: https://github.com/jmoss20/notears +- Tensorflow with Python: https://github.com/ignavier/notears-tensorflow