Skip to content

Commit 964d7fe

Browse files
committed
Force third party static on Windows
1 parent 8b99a9a commit 964d7fe

File tree

2 files changed

+20
-10
lines changed

2 files changed

+20
-10
lines changed

python/meson.build

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ project(
2020
'cython',
2121
'cpp',
2222
version: run_command(
23-
'python',
23+
'python3',
2424
'-m',
2525
'setuptools_scm',
2626
'--force-write-version-files',
@@ -36,11 +36,21 @@ py = import('python').find_installation(pure: false)
3636

3737
#install_data('../NOTICE.txt', install_dir: py.get_install_dir() / 'pyarrow')
3838

39+
if host_machine.system() == 'windows' or get_option('default_library') == 'static'
40+
cmake_suffix = 'static'
41+
else
42+
cmake_suffix = 'shared'
43+
endif
44+
3945
# https://github.com/mesonbuild/meson-python/issues/647
4046
if get_option('sdist')
4147
arrow_dep = []
4248
else
43-
arrow_dep = dependency('arrow', 'Arrow', modules: ['Arrow::arrow_shared'])
49+
arrow_dep = dependency(
50+
'arrow',
51+
'Arrow',
52+
modules: [f'Arrow::arrow_@cmake_suffix@'],
53+
)
4454
endif
4555

4656
# When NumPy 2.0 becomes the minimum we can remove the

python/pyarrow/meson.build

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ else
6060
arrow_compute_dep = dependency(
6161
'arrow-compute',
6262
'ArrowCompute',
63-
modules: ['ArrowCompute::arrow_compute_shared'],
63+
modules: [f'ArrowCompute::arrow_compute_@cmake_suffix@'],
6464
)
6565
endif
6666

@@ -89,7 +89,7 @@ if needs_acero
8989
arrow_acero_dep = dependency(
9090
'arrow-acero',
9191
'ArrowAcero',
92-
modules: ['ArrowAcero::arrow_acero_shared'],
92+
modules: [f'ArrowAcero::arrow_acero_@cmake_suffix@'],
9393
)
9494
endif
9595
libpyarrow_deps += [arrow_acero_dep]
@@ -107,7 +107,7 @@ if get_option('cuda').enabled()
107107
arrow_cuda_dep = dependency(
108108
'arrow-cuda',
109109
'ArrowCUDA',
110-
modules: ['ArrowCUDA::arrow_cuda_shared'],
110+
modules: [f'ArrowCUDA::arrow_cuda_@cmake_suffix@'],
111111
)
112112
endif
113113
libpyarrow_deps += [arrow_cuda_dep]
@@ -121,7 +121,7 @@ if needs_dataset
121121
arrow_dataset_dep = dependency(
122122
'arrow-dataset',
123123
'ArrowDataset',
124-
modules: ['ArrowDataset::arrow_dataset_shared'],
124+
modules: [f'ArrowDataset::arrow_dataset_@cmake_suffix@'],
125125
)
126126
endif
127127
libpyarrow_deps += [arrow_dataset_dep]
@@ -135,7 +135,7 @@ if needs_flight
135135
arrow_flight_dep = dependency(
136136
'arrow-flight',
137137
'ArrowFlight',
138-
modules: ['ArrowFlight::arrow_flight_shared'],
138+
modules: [f'ArrowFlight::arrow_flight_@cmake_suffix@'],
139139
)
140140
endif
141141
libpyarrow_deps += [arrow_flight_dep]
@@ -148,7 +148,7 @@ if get_option('gandiva').enabled()
148148
gandiva_dep = dependency(
149149
'gandiva',
150150
'Gandiva',
151-
modules: ['Gandiva::gandiva_shared'],
151+
modules: [f'Gandiva::gandiva_@cmake_suffix@'],
152152
)
153153
endif
154154
libpyarrow_deps += [gandiva_dep]
@@ -182,7 +182,7 @@ if needs_substrait
182182
arrow_substrait_dep = dependency(
183183
'arrow-substrait',
184184
'ArrowSubstrait',
185-
modules: ['ArrowSubstrait::arrow_substrait_shared'],
185+
modules: [f'ArrowSubstrait::arrow_substrait_@cmake_suffix@'],
186186
)
187187
endif
188188
libpyarrow_deps += [arrow_substrait_dep]
@@ -208,7 +208,7 @@ if needs_parquet
208208
parquet_dep = dependency(
209209
'parquet',
210210
'Parquet',
211-
modules: ['Parquet::parquet_shared'],
211+
modules: [f'Parquet::parquet_@cmake_suffix@'],
212212
)
213213
endif
214214
libpyarrow_deps += [parquet_dep]

0 commit comments

Comments
 (0)