-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathmeson.build
More file actions
38 lines (31 loc) · 798 Bytes
/
Copy pathmeson.build
File metadata and controls
38 lines (31 loc) · 798 Bytes
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
project('pyhwm2014', 'fortran',
version: '1.1.0',
meson_version: '>=0.63.0'
)
# Find Python and NumPy
py_mod = import('python')
py = py_mod.find_installation()
py_dep = py.dependency(embed: true)
# Find NumPy
numpy_inc = run_command(
py,
'-c',
'import numpy; print(numpy.get_include())',
check: true
).stdout().strip()
# Fortran compiler settings
fc = meson.get_compiler('fortran')
# Build f2py extension
f2py = py_mod.find_installation().get_path('scripts') / 'f2py'
# Compile Fortran source to extension module
hwm14_f90_src = 'source/hwm14.f90'
# Create f2py signature file if it exists (optional)
# For now, we'll use direct f2py compilation
executable(
'gen_hwm14',
hwm14_f90_src,
fortran_args: ['-w'],
install: false,
)
# Install Python package
subdir('pyhwm2014')