Skip to content
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

Emscripten: Make python.sh function as proper Python CLI #127503

Closed
hoodmane opened this issue Dec 2, 2024 · 0 comments · Fixed by #127506
Closed

Emscripten: Make python.sh function as proper Python CLI #127503

hoodmane opened this issue Dec 2, 2024 · 0 comments · Fixed by #127506
Labels
OS-emscripten type-bug An unexpected behavior, bug, or error

Comments

@hoodmane
Copy link
Contributor

hoodmane commented Dec 2, 2024

There are several problems with python.sh right now:

  1. It doesn't work correctly on macs with bsd coreutils
  2. It doesn't mount the native file system into the Emscripten file system, so python.sh /some/file.py will fail to find the file
  3. It doesn't set the current directory in the Emscripten file system to the same as the host working directory so python.sh file.py won't look for file.py in the current directory
  4. It doesn't inherit environment variables

@freakboy3742

Linked PRs

@hoodmane hoodmane changed the title Emscripten: Make python.sh function as a proper CLI entrypoint Emscripten: Make python.sh function as proper Python CLI Dec 2, 2024
@picnixz picnixz added the type-bug An unexpected behavior, bug, or error label Dec 2, 2024
freakboy3742 pushed a commit that referenced this issue Dec 5, 2024
…127506)

Modifies the python.sh script to work on macOS, and adapt to recent emscripten changes.
@hoodmane hoodmane reopened this Dec 5, 2024
hoodmane added a commit to hoodmane/cpython that referenced this issue Dec 5, 2024
hoodmane added a commit to hoodmane/cpython that referenced this issue Dec 5, 2024
This makes `shutil.which()` pick up native executables which is inconvenient.
freakboy3742 pushed a commit that referenced this issue Dec 9, 2024
Modifies the handling of PATH to ensure that native executables aren't picked
up when running under node.
freakboy3742 pushed a commit that referenced this issue Dec 9, 2024
Corrects the handling of realpath on Linux.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS-emscripten type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants