openai-python icon indicating copy to clipboard operation
openai-python copied to clipboard

chore(examples): add -S to env shebangs for portability

Open lucky-verma opened this issue 6 months ago • 1 comments

four example shebangs are missing the -S flag:

examples/audio.py
examples/speech_to_text.py
examples/text_to_speech.py
examples/realtime/realtime.py

they currently use #!/usr/bin/env rye run python. CONTRIBUTING.md shows the canonical form as #!/usr/bin/env -S rye run python and other examples (responses/background_streaming.py for instance) already use that. without -S, BSD env on older macOS treats rye run python as a single program name and the script fails. linux env splits args by default since coreutils 8.30 so it works there either way, but the -S form is the portable one.

ran ruff check + format on all four, both clean. only the shebang line changed in each file.

lucky-verma avatar May 08 '26 09:05 lucky-verma

Good portability cleanup. env -S is a subtle but important change here; a brief note in the examples README about the minimum shell/coreutils support would help users on older environments avoid surprises.

DTiming24 avatar Jun 25 '26 19:06 DTiming24

added -S to push_to_talk_app.py. also corrected the linux claim in the description — you were right, it fails there too. PTAL

lucky-verma avatar Aug 04 '26 06:08 lucky-verma