Skip to content

Commit 3766560

Browse files
committed
Use project_name functions
1 parent f22c240 commit 3766560

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

meson.build

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ numpy_inc = run_command(
1818
).stdout().strip()
1919
incs = include_directories(
2020
[
21-
'pymt_heatf/lib',
21+
meson.project_name() / 'lib',
2222
python_inc,
2323
numpy_inc,
2424
]
@@ -36,31 +36,31 @@ deps = [
3636
]
3737

3838
srcs = [
39-
'pymt_heatf/lib/bmi_interoperability.f90',
40-
'pymt_heatf/lib/heatmodelf.pyx',
39+
meson.project_name() / 'lib/bmi_interoperability.f90',
40+
meson.project_name() / 'lib/heatmodelf.pyx',
4141
]
4242

4343
# Files get copied to <python directory>/site-packages/<subdir>
4444
install_pkg_srcs = [
45-
'pymt_heatf/__init__.py',
46-
'pymt_heatf/_bmi.py',
45+
meson.project_name() / '__init__.py',
46+
meson.project_name() / '_bmi.py',
4747
]
4848
py.install_sources(
4949
install_pkg_srcs,
50-
subdir: 'pymt_heatf',
50+
subdir: meson.project_name(),
5151
)
5252
install_lib_srcs = [
53-
'pymt_heatf/lib/__init__.py',
54-
'pymt_heatf/lib/heatmodelf.pyx',
53+
meson.project_name() / 'lib/__init__.py',
54+
meson.project_name() / 'lib/heatmodelf.pyx',
5555
]
5656
py.install_sources(
5757
install_lib_srcs,
58-
subdir: 'pymt_heatf/lib',
58+
subdir: meson.project_name() / 'lib',
5959
)
6060

6161
install_subdir(
6262
'meta/HeatModelF',
63-
install_dir: py.get_install_dir() / 'pymt_heatf/data',
63+
install_dir: py.get_install_dir() / meson.project_name() / 'data',
6464
)
6565

6666
py.extension_module(
@@ -69,8 +69,8 @@ py.extension_module(
6969
dependencies: deps,
7070
include_directories: incs,
7171
install: true,
72-
subdir: 'pymt_heatf/lib',
72+
subdir: meson.project_name() / 'lib',
7373
)
7474

7575
# This is a temporary fix for editable installs.
76-
run_command('cp', '-r', 'pymt_heatf/data', 'build', check: false)
76+
run_command('cp', '-r', meson.project_name() / 'data', 'build', check: false)

0 commit comments

Comments
 (0)