singlestore-labs / python-wasi

Utilities for building CPython for the WASI platform
Apache License 2.0
97 stars 14 forks source link

How to own the file descriptor when feeding file into python3.wasm? #10

Closed Yifei-yang7 closed 1 year ago

Yifei-yang7 commented 1 year ago

https://github.com/python/cpython/issues/96005 reports a bug which gives[Errno 76] Capabilities insufficient. Currently what I can do is to put my python script under 'opt/wasi-python/lib/python3.12/test/' and open from that. The bug report said it's because the process needs to own the file descriptor, is there a way to make my file works then?

kesmit13 commented 1 year ago

Is this simply a matter of the fact that Python can't compile the file into the __pycache__ directory? You can disable this behavior bad adding the -B options to your Python options.

Yifei-yang7 commented 1 year ago

I realized that this is also relevant to file directory mapping, which is addressed in https://github.com/singlestore-labs/python-wasi/issues/9, thanks!