Skip to content

Commit 1d69e0a

Browse files
committed
static/target_type reversals
1 parent 7b19793 commit 1d69e0a

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

python/meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ 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'
39+
if get_option('default_library') == 'static'
4040
cmake_suffix = 'static'
4141
else
4242
cmake_suffix = 'shared'

python/pyarrow/meson.build

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -225,23 +225,15 @@ endif
225225

226226
gnu_symbol_visibility = host_machine.system() == 'darwin' ? 'default' : 'inlineshidden'
227227

228-
# Windows requirements for shared libraries are complex - see
229-
# https://mesonbuild.com/meson-python/how-to-guides/shared-libraries.html
230228
if get_option('default_library') == 'static'
231-
target_type = 'static_library'
232-
else
233-
target_type = 'shared_library'
234-
endif
235-
236-
if target_type == 'static_library'
237229
pyarrow_private_args = ['-DARROW_PYTHON_STATIC']
238230
pyarrow_public_args = ['-DARROW_PYTHON_STATIC']
239231
else
240232
pyarrow_private_args = ['-DARROW_PYTHON_EXPORTING']
241233
pyarrow_public_args = []
242234
endif
243235

244-
pyarrow_lib = build_target(
236+
pyarrow_lib = library(
245237
'arrow_python',
246238
sources: pyarrow_srcs,
247239
include_directories: ['src'],
@@ -255,23 +247,22 @@ pyarrow_lib = build_target(
255247
install_dir: py.get_install_dir() / 'pyarrow',
256248
gnu_symbol_visibility: gnu_symbol_visibility,
257249
override_options: ['b_lundef=false'],
258-
target_type: target_type,
259250
)
260251
pyarrow_lib_dep = declare_dependency(
261252
link_with: [pyarrow_lib],
262253
compile_args: pyarrow_public_args,
263254
)
264255

265256
if needs_flight
266-
if target_type == 'static_library'
257+
if get_option('default_library') == 'static'
267258
pyarrow_flight_private_args = ['-DARROW_PYFLIGHT_STATIC']
268259
pyarrow_flight_public_args = ['-DARROW_PYFLIGHT_STATIC']
269260
else
270261
pyarrow_flight_private_args = ['-DARROW_PYFLIGHT_EXPORTING']
271262
pyarrow_flight_public_args = []
272263
endif
273264

274-
pyarrow_flight_lib = build_target(
265+
pyarrow_flight_lib = library(
275266
'arrow_flight_lib',
276267
sources: ['src/arrow/python/flight.cc'],
277268
dependencies: [arrow_flight_dep, pyarrow_lib_dep, py.dependency()],
@@ -281,7 +272,6 @@ if needs_flight
281272
install_dir: py.get_install_dir() / 'pyarrow',
282273
gnu_symbol_visibility: gnu_symbol_visibility,
283274
override_options: ['b_lundef=false'],
284-
target_type: target_type,
285275
)
286276

287277
pyarrow_flight_dep = declare_dependency(
@@ -293,7 +283,7 @@ if needs_flight
293283
endif
294284

295285
if needs_parquet_encryption
296-
if target_type == 'static_library'
286+
if get_option('default_library') == 'static'
297287
pyarrow_pq_enc_private_args = [
298288
'-DARROW_PYTHON_PARQUET_ENCRYPTION_STATIC',
299289
]
@@ -307,7 +297,7 @@ if needs_parquet_encryption
307297
pyarrow_pq_enc_public_args = []
308298
endif
309299

310-
pyarrow_encryption_lib = build_target(
300+
pyarrow_encryption_lib = library(
311301
'arrow_python_parquet_encryption',
312302
sources: ['src/arrow/python/parquet_encryption.cc'],
313303
include_directories: ['src'],
@@ -317,7 +307,6 @@ if needs_parquet_encryption
317307
install_dir: py.get_install_dir() / 'pyarrow',
318308
gnu_symbol_visibility: gnu_symbol_visibility,
319309
override_options: ['b_lundef=false'],
320-
target_type: target_type,
321310
)
322311

323312
pyarrow_parquet_encryption_dep = declare_dependency(

0 commit comments

Comments
 (0)