Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Reinecke
pypocketfft
Commits
164959ce
Commit
164959ce
authored
May 20, 2019
by
Martin Reinecke
Browse files
more setup.py cleanup
parent
ebf44663
Changes
1
Hide whitespace changes
Inline
Side-by-side
setup.py
View file @
164959ce
...
...
@@ -11,10 +11,9 @@ class _deferred_pybind11_include(object):
return
pybind11
.
get_include
(
self
.
user
)
extra_compile_args
=
[]
include_dirs
=
[
'./'
,
_deferred_pybind11_include
(
True
),
_deferred_pybind11_include
()]
extra_compile_args
=
[]
python_module_link_args
=
[]
if
sys
.
platform
==
'darwin'
:
...
...
@@ -24,17 +23,18 @@ if sys.platform == 'darwin':
vars
[
'LDSHARED'
]
=
vars
[
'LDSHARED'
].
replace
(
'-bundle'
,
''
)
python_module_link_args
+=
[
'-bundle'
]
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'
,
'-s'
]
extra_compile_args
+=
[
'--std=c++11'
,
'-march=native'
,
'-O3'
,
'-Wfatal-errors'
,
'-Wno-ignored-attributes'
,
'-DPOCKETFFT_OPENMP'
,
'-fopenmp'
,
'-Wfloat-conversion'
,
'-Wsign-conversion'
,
'-Wconversion'
,
'-W'
,
'-Wall'
]
python_module_link_args
+=
[
'-march=native'
,
'-Wl,-rpath,$ORIGIN'
,
'-fopenmp'
]
# if you don't want debugging info, add "-s" to python_module_link_args
def
get_extension_modules
():
pocketfft_library
=
Extension
(
'pypocketfft'
,
sources
=
[
'pypocketfft.cc'
],
include_dirs
=
include_dirs
,
extra_compile_args
=
extra_compile_args
,
extra_link_args
=
python_module_link_args
)
return
[
pocketfft_library
]
return
[
Extension
(
'pypocketfft'
,
sources
=
[
'pypocketfft.cc'
],
include_dirs
=
include_dirs
,
extra_compile_args
=
extra_compile_args
,
extra_link_args
=
python_module_link_args
)]
setup
(
name
=
'pypocketfft'
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment