summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorNicolas Courty <ncourty@irisa.fr>2018-10-20 01:11:41 +0200
committerNicolas Courty <ncourty@irisa.fr>2018-10-20 01:11:41 +0200
commit0702dbccf08d333b668aeab5621a2db0c8d33deb (patch)
treeb1feb6dc9a146b1df9002a44d8b0847edccb8430 /setup.py
parent47daf05106a99b8e1278e1b77328e9e4542c0c32 (diff)
platform dependant check
Diffstat (limited to 'setup.py')
-rwxr-xr-xsetup.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 7d42d8e..a19255c 100755
--- a/setup.py
+++ b/setup.py
@@ -24,6 +24,12 @@ ROOT = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(ROOT, 'README.md'), encoding="utf-8") as f:
README = f.read()
+# add platform dependant optional compilation argument
+opt_arg=["O3"]
+import platform
+if platform.system()=='Darwin':
+ if platform.release()=='18.0.0':
+ opt_arg.append("-stdlib=libc++") # correspond to a compilation problem with Mojave and XCode 10
setup(name='POT',
version=__version__,
@@ -40,7 +46,7 @@ setup(name='POT',
# additional C++ source files
language="c++", # generate and compile C++ code,
include_dirs=[numpy.get_include(),os.path.join(ROOT,'ot/lp')],
- extra_compile_args=["-stdlib=libc++"]
+ extra_compile_args=opt_arg
)),
platforms=['linux','macosx','windows'],
download_url='https://github.com/rflamary/POT/archive/{}.tar.gz'.format(__version__),