From 1838776e64ce43ca775c678e063251364a210b51 Mon Sep 17 00:00:00 2001 From: Daniele Nicolodi Date: Mon, 28 Aug 2023 13:44:35 +0200 Subject: [PATCH 1/2] Backport PR #54737: MAINT: small simplification of meson.build following best practices --- meson.build | 9 ++------- pandas/_libs/window/meson.build | 2 -- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/meson.build b/meson.build index a927b59abeaf9..e16f565d491fe 100644 --- a/meson.build +++ b/meson.build @@ -2,13 +2,10 @@ project( 'pandas', 'c', 'cpp', 'cython', - version: run_command(['python', 'generate_version.py', '--print'], check: true).stdout().strip(), + version: run_command(['python3', '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', @@ -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') 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 ) From dbb7ffda4c47e6318adcdd539a5e4915404bca6c Mon Sep 17 00:00:00 2001 From: Patrick Hoefler <61934744+phofl@users.noreply.github.com> Date: Mon, 28 Aug 2023 19:36:49 +0200 Subject: [PATCH 2/2] Update meson.build --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index e16f565d491fe..09a1494135af4 100644 --- a/meson.build +++ b/meson.build @@ -2,7 +2,7 @@ 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: [