Skip to content

Make the python.sh script more discoverable #133259

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mdboom opened this issue May 1, 2025 · 1 comment
Closed

Make the python.sh script more discoverable #133259

mdboom opened this issue May 1, 2025 · 1 comment
Assignees
Labels
OS-wasi type-feature A feature request or enhancement

Comments

@mdboom
Copy link
Contributor

mdboom commented May 1, 2025

Feature or enhancement

Proposal:

(As discussed offline with @brettcannon)...

It might be helpful to display the path to the python.sh script after a successful run of py Tools/wasm/wasi.py make-host.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

@mdboom mdboom added type-feature A feature request or enhancement OS-wasi labels May 1, 2025
@mdboom mdboom self-assigned this May 1, 2025
@brettcannon
Copy link
Member

Should be nothing more than changing the following line:

subprocess.check_call([exec_script, "--version"])

to use:

cpython/Tools/wasm/wasi.py

Lines 92 to 109 in e5e51bd

def call(command, *, quiet, **kwargs):
"""Execute a command.
If 'quiet' is true, then redirect stdout and stderr to a temporary file.
"""
print("❯", " ".join(map(str, command)))
if not quiet:
stdout = None
stderr = None
else:
stdout = tempfile.NamedTemporaryFile("w", encoding="utf-8",
delete=False,
prefix="cpython-wasi-",
suffix=".log")
stderr = subprocess.STDOUT
print(f"📝 Logging output to {stdout.name} (--quiet)...")
subprocess.check_call(command, **kwargs, stdout=stdout, stderr=stderr)

with quiet=False.

mdboom added a commit to mdboom/cpython that referenced this issue May 1, 2025
mdboom added a commit that referenced this issue May 1, 2025
* gh-133259: Show path to python.sh script on successful build

* wasmtime -> (generic) wasm runtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-wasi type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

2 participants