forked from capytaine/capytaine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
99 lines (87 loc) · 3 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/usr/bin/env python
# coding: utf-8
import os
from numpy.distutils.core import Extension, setup
########################
# Fortran extensions #
########################
Delhommeau_source = [
"capytaine/green_functions/Delhommeau_f90/constants.f90",
"capytaine/green_functions/Delhommeau_f90/old_Prony_decomposition.f90",
"capytaine/green_functions/Delhommeau_f90/Green_Rankine.f90",
"capytaine/green_functions/Delhommeau_f90/Initialize_Green_wave.f90",
"capytaine/green_functions/Delhommeau_f90/Green_wave.f90",
"capytaine/green_functions/Delhommeau_f90/matrices.f90",
]
Delhommeau_extension = Extension(
name="capytaine.green_functions.Delhommeau_f90",
sources=Delhommeau_source,
extra_compile_args=['-O2', '-fopenmp', '-cpp'],
extra_f90_compile_args=['-O2', '-fopenmp', '-cpp'],
extra_link_args=['-fopenmp'],
# # Uncomment the following lines to get more verbose output from f2py.
# define_macros=[
# ('F2PY_REPORT_ATEXIT', 1),
# ('F2PY_REPORT_ON_ARRAY_COPY', 1),
# ],
)
XieDelhommeau_extension = Extension(
name="capytaine.green_functions.XieDelhommeau_f90",
sources=Delhommeau_source,
extra_compile_args=['-O2', '-fopenmp', '-cpp', '-DXIE_CORRECTION'],
extra_f90_compile_args=['-O2', '-fopenmp', '-cpp', '-DXIE_CORRECTION'],
extra_link_args=['-fopenmp'],
# # Uncomment the following lines to get more verbose output from f2py.
# define_macros=[
# ('F2PY_REPORT_ATEXIT', 1),
# ('F2PY_REPORT_ON_ARRAY_COPY', 1),
# ],
)
########################################################
# Read version number and other info in __about__.py #
########################################################
base_dir = os.path.dirname(__file__)
src_dir = os.path.join(base_dir, "capytaine")
about = {}
with open(os.path.join(src_dir, "__about__.py")) as f:
exec(f.read(), about)
##########
# Main #
##########
if __name__ == "__main__":
setup(name=about["__title__"],
version=about["__version__"],
description=about["__description__"],
author=about["__author__"],
license=about["__license__"],
url=about["__uri__"],
packages=[
'capytaine',
'capytaine.meshes',
'capytaine.matrices',
'capytaine.bodies',
'capytaine.bodies.predefined',
'capytaine.bem',
'capytaine.green_functions',
'capytaine.post_pro',
'capytaine.ui',
'capytaine.ui.vtk',
'capytaine.io',
'capytaine.tools',
],
install_requires=[
'numpy',
'scipy',
'pandas',
'xarray',
],
entry_points={
'console_scripts': [
'capytaine=capytaine.ui.cli:main',
],
},
ext_modules=[
Delhommeau_extension,
XieDelhommeau_extension,
],
)