changeset 52915:53ae4495e5f0

setup: set PYO3_PYTHON to ensure PyO3 uses the right Python We're already setting PYTHON_SYS_EXECUTABLE to ensure that rust-cpython uses the correct Python interpreter. We should do the same for PyO3 now that Mercurial is migrating to it.
author Arun Kulshreshtha <akulshreshtha@janestreet.com>
date Thu, 13 Feb 2025 15:55:31 -0500
parents 3e8a3db5f5e8
children cc18de9d1a71
files setup.py
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/setup.py	Fri Feb 07 23:00:31 2025 +0100
+++ b/setup.py	Thu Feb 13 15:55:31 2025 -0500
@@ -1326,6 +1326,7 @@
         env['PYTHON_SYS_EXECUTABLE'] = sys.executable
         env['PYTHONEXECUTABLE'] = sys.executable
         env['PYTHON'] = sys.executable
+        env['PYO3_PYTHON'] = sys.executable
 
         cargocmd = ['cargo', 'rustc', '--release']