From 93a5b8f4b27056501c6004a540bef5827a8fd1a7 Mon Sep 17 00:00:00 2001 From: Patrick Hoefler <61934744+phofl@users.noreply.github.com> Date: Mon, 28 Aug 2023 14:13:33 +0200 Subject: [PATCH 1/3] Revert "MAINT: small simplification of meson.build following best practices (#54737)" This reverts commit ca429943c70cee2077941f052281b92afc0c2054. --- meson.build | 9 +++++++-- pandas/_libs/window/meson.build | 2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index e16f565d491fe..a927b59abeaf9 100644 --- a/meson.build +++ b/meson.build @@ -2,10 +2,13 @@ project( 'pandas', 'c', 'cpp', 'cython', - version: run_command(['python3', 'generate_version.py', '--print'], check: true).stdout().strip(), + version: run_command(['python', 'generate_version.py', '--print'], check: true).stdout().strip(), license: 'BSD-3', meson_version: '>=1.0.1', default_options: [ + # TODO: investigate, does meson try to compile against debug Python + # when buildtype = debug, this seems to be causing problems on CI + # where provided Python is not compiled in debug mode 'buildtype=release', # TODO: Reactivate werror, some warnings on Windows #'werror=true', @@ -13,8 +16,10 @@ project( ] ) +py_mod = import('python') fs = import('fs') -py = import('python').find_installation() +py = py_mod.find_installation('python') +py_dep = py.dependency() tempita = files('generate_pxi.py') versioneer = files('generate_version.py') diff --git a/pandas/_libs/window/meson.build b/pandas/_libs/window/meson.build index 85aa060a26406..b83d8730f9447 100644 --- a/pandas/_libs/window/meson.build +++ b/pandas/_libs/window/meson.build @@ -3,6 +3,7 @@ py.extension_module( ['aggregations.pyx'], cython_args: ['-X always_allow_keywords=true'], include_directories: [inc_np, inc_pd], + dependencies: [py_dep], subdir: 'pandas/_libs/window', override_options : ['cython_language=cpp'], install: true @@ -13,6 +14,7 @@ py.extension_module( ['indexers.pyx'], cython_args: ['-X always_allow_keywords=true'], include_directories: [inc_np, inc_pd], + dependencies: [py_dep], subdir: 'pandas/_libs/window', install: true ) From 9a8b987df4549b81360fb7a0625851a51fa50227 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Mon, 28 Aug 2023 09:39:14 -0400 Subject: [PATCH 2/3] Update meson.build --- meson.build | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/meson.build b/meson.build index a927b59abeaf9..09a1494135af4 100644 --- a/meson.build +++ b/meson.build @@ -6,9 +6,6 @@ project( license: 'BSD-3', meson_version: '>=1.0.1', default_options: [ - # TODO: investigate, does meson try to compile against debug Python - # when buildtype = debug, this seems to be causing problems on CI - # where provided Python is not compiled in debug mode 'buildtype=release', # TODO: Reactivate werror, some warnings on Windows #'werror=true', @@ -16,10 +13,8 @@ project( ] ) -py_mod = import('python') fs = import('fs') -py = py_mod.find_installation('python') -py_dep = py.dependency() +py = import('python').find_installation() tempita = files('generate_pxi.py') versioneer = files('generate_version.py') From fd7a4ccd6fe82ebaca10bc874ca6d596e6e7f049 Mon Sep 17 00:00:00 2001 From: Thomas Li <47963215+lithomas1@users.noreply.github.com> Date: Mon, 28 Aug 2023 09:39:28 -0400 Subject: [PATCH 3/3] Update meson.build --- pandas/_libs/window/meson.build | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandas/_libs/window/meson.build b/pandas/_libs/window/meson.build index b83d8730f9447..85aa060a26406 100644 --- a/pandas/_libs/window/meson.build +++ b/pandas/_libs/window/meson.build @@ -3,7 +3,6 @@ py.extension_module( ['aggregations.pyx'], cython_args: ['-X always_allow_keywords=true'], include_directories: [inc_np, inc_pd], - dependencies: [py_dep], subdir: 'pandas/_libs/window', override_options : ['cython_language=cpp'], install: true @@ -14,7 +13,6 @@ py.extension_module( ['indexers.pyx'], cython_args: ['-X always_allow_keywords=true'], include_directories: [inc_np, inc_pd], - dependencies: [py_dep], subdir: 'pandas/_libs/window', install: true )