]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-90473: Define HOSTRUNNER for WASI (GH-93606)
authorChristian Heimes <christian@python.org>
Wed, 8 Jun 2022 18:18:46 +0000 (20:18 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jun 2022 18:18:46 +0000 (20:18 +0200)
configure
configure.ac

index 34c43b9dde31661861eb02ff17f99d290efbe023..601089cd44c204b7713b29d243b4222018706d45 100755 (executable)
--- a/configure
+++ b/configure
@@ -6688,6 +6688,8 @@ else
 
 fi
      ;; #(
+              WASI/*) :
+    HOSTRUNNER='wasmtime run --env PYTHONPATH=$$(realpath --relative-to $(abs_srcdir) $(abs_builddir))/$$(cat pybuilddir.txt) --mapdir /::$(srcdir) --' ;; #(
   *) :
     HOSTRUNNER=''
    ;;
index 07a178a996c194992460630f0836afd384bfb20f..4c540ec52b4d867ec134a45a3d8683648ec68206 100644 (file)
@@ -1424,6 +1424,10 @@ then
         HOSTRUNNER='node'
       ])
     ],
+    dnl TODO: support other WASI runtimes
+    dnl wasmtime starts the proces with "/" as CWD. For OOT builds add the
+    dnl directory containing _sysconfigdata to PYTHONPATH.
+    [WASI/*], [HOSTRUNNER='wasmtime run --env PYTHONPATH=$$(realpath --relative-to $(abs_srcdir) $(abs_builddir))/$$(cat pybuilddir.txt) --mapdir /::$(srcdir) --'],
     [HOSTRUNNER='']
   )
 fi