summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Flamary <remi.flamary@gmail.com>2018-10-23 10:49:17 +0200
committerGitHub <noreply@github.com>2018-10-23 10:49:17 +0200
commitc48be436f984eba910b838c1586a208e3fe3d91f (patch)
tree9adebbcbf6cb5cfbff8a45c97747cd438c54272a
parentc26314937affdb648bcc2314a302332d21b9de27 (diff)
parent15a062d55ad5a14d351a4f0c57d4d7359011f510 (diff)
Merge pull request #72 from rflamary/osx-issue
add -tdlib=libc++ argument
-rwxr-xr-xsetup.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index c895034..bbcaf04 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__,
@@ -39,7 +45,9 @@ setup(name='POT',
sources=["ot/lp/emd_wrap.pyx", "ot/lp/EMD_wrapper.cpp"], # the Cython source and
# additional C++ source files
language="c++", # generate and compile C++ code,
- include_dirs=[numpy.get_include(),os.path.join(ROOT,'ot/lp')])),
+ include_dirs=[numpy.get_include(),os.path.join(ROOT,'ot/lp')],
+ extra_compile_args=opt_arg
+ )),
platforms=['linux','macosx','windows'],
download_url='https://github.com/rflamary/POT/archive/{}.tar.gz'.format(__version__),
license = 'MIT',