diff options
author | tvayer <titouan.vayer@gmail.com> | 2019-05-29 14:24:05 +0200 |
---|---|---|
committer | tvayer <titouan.vayer@gmail.com> | 2019-05-29 14:24:05 +0200 |
commit | 63bbeb34e48f02c97a762dab5232158d90a5cffc (patch) | |
tree | 853026b5854b6e4b01fdf750db139985b3dd596f /setup.py | |
parent | f70aabfcc11f92181e0dc987b341bad8ec030d75 (diff) | |
parent | f66ab58c7c895011fd37bafd3e848828399c56c4 (diff) |
Merge remote-tracking branch 'rflamary/master'
merge pot
Diffstat (limited to 'setup.py')
-rwxr-xr-x | setup.py | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -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', @@ -55,7 +63,7 @@ setup(name='POT', 'Operating System :: MacOS', 'Operating System :: POSIX', 'Programming Language :: Python', - 'Topic :: Utilities' + 'Topic :: Utilities', 'Programming Language :: Python :: 2', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', |