]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-90473: Define HOSTRUNNER for WASI (GH-93606) (GH-93612)
authorChristian Heimes <christian@python.org>
Wed, 8 Jun 2022 20:21:04 +0000 (22:21 +0200)
committerGitHub <noreply@github.com>
Wed, 8 Jun 2022 20:21:04 +0000 (22:21 +0200)
(cherry picked from commit 22df2e0322300d25c1255ceb73cacc0ebd96b20e)

Co-authored-by: Christian Heimes <christian@python.org>
configure
configure.ac

index e91d04b3b6621fed9cc0409c8796b66d22a3f0f6..2ad709ca5492b484de2d6a568c0197a22c8e0fbe 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 2e2e24ceca93b1f25854e55a2fbd9fd24899823e..c1ea163e4461e500d78cef001d0cca6a5d3626d4 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