-
Notifications
You must be signed in to change notification settings - Fork 13
/
setup.py
32 lines (27 loc) · 936 Bytes
/
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
#python setup.py build_ext --inplace
from numpy.distutils.core import setup
from numpy.distutils.extension import Extension
def gen_ext(module,fortran_options):
src = module.replace('.','/')+'.f90'
ext = Extension(name=module,
sources=[src], # <- should be a list type
extra_f90_compile_args=fortran_options)
return ext
fortran_options = ['-O3', '-fPIC']
fortran_modules = ['core.fortran_advection',
'core.fortran_diag',
'core.fortran_operators',
'core.gmg.fortran_multigrid']
extensions = []
for m in fortran_modules:
extensions.append( gen_ext(m,fortran_options) )
setup(
name='Fluid2d',
version='1.42',
author='Guillaume Roullet',
author_email='roullet@univ-brest.fr',
license='GPL3',
packages = ['core',
'core.gmg',
'exp'],
ext_modules = extensions )