Commit ebf44663 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

more setup.py cleanup

parent 9c2568a9
from setuptools import setup, Extension from setuptools import setup, Extension
import sys import sys
import sysconfig
import os.path
import distutils.sysconfig
class _deferred_pybind11_include(object): class _deferred_pybind11_include(object):
...@@ -16,20 +12,19 @@ class _deferred_pybind11_include(object): ...@@ -16,20 +12,19 @@ class _deferred_pybind11_include(object):
extra_compile_args = [] extra_compile_args = []
include_dirs = ['./', _deferred_pybind11_include(), include_dirs = ['./', _deferred_pybind11_include(True),
_deferred_pybind11_include(True)] _deferred_pybind11_include()]
python_module_link_args = [] python_module_link_args = []
base_library_link_args = []
if sys.platform == 'darwin': if sys.platform == 'darwin':
import distutils.sysconfig
extra_compile_args += ['--std=c++11', '--stdlib=libc++', '-mmacosx-version-min=10.9'] extra_compile_args += ['--std=c++11', '--stdlib=libc++', '-mmacosx-version-min=10.9']
vars = distutils.sysconfig.get_config_vars() vars = distutils.sysconfig.get_config_vars()
vars['LDSHARED'] = vars['LDSHARED'].replace('-bundle', '') vars['LDSHARED'] = vars['LDSHARED'].replace('-bundle', '')
python_module_link_args+=['-bundle'] python_module_link_args+=['-bundle']
base_library_link_args+=['-dynamiclib']
else: else:
extra_compile_args += ['--std=c++11', '-march=native', '-O3', '-Wfatal-errors', '-Wno-ignored-attributes', '-DPOCKETFFT_OPENMP', '-fopenmp', '-Wfloat-conversion' ,'-Wsign-conversion', '-Wconversion' ,'-W', '-Wall'] extra_compile_args += ['--std=c++11', '-march=native', '-O3', '-Wfatal-errors', '-Wno-ignored-attributes', '-DPOCKETFFT_OPENMP', '-fopenmp', '-Wfloat-conversion' ,'-Wsign-conversion', '-Wconversion' ,'-W', '-Wall', '-s']
python_module_link_args += ['-march=native', '-Wl,-rpath,$ORIGIN', '-fopenmp'] python_module_link_args += ['-march=native', '-Wl,-rpath,$ORIGIN', '-fopenmp']
...@@ -49,7 +44,7 @@ setup(name='pypocketfft', ...@@ -49,7 +44,7 @@ setup(name='pypocketfft',
author='Martin Reinecke', author='Martin Reinecke',
author_email='martin@mpa-garching.mpg.de', author_email='martin@mpa-garching.mpg.de',
packages=[], packages=[],
setup_requires=['numpy>=1.10.4', 'pybind11>=2.2.1'], setup_requires=['numpy>=1.15.0', 'pybind11>=2.2.4'],
ext_modules=get_extension_modules(), ext_modules=get_extension_modules(),
install_requires=['numpy>=1.10.4', 'pybind11>=2.2.1'] install_requires=['numpy>=1.15.0', 'pybind11>=2.2.4']
) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment