Support shebang additional arguments
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 344
- Forks
- 74
- Ø Merge
- 1 T. 3 Std.
- Gemergte PRs (30 T.)
- 7
Beschreibung
Is your feature request related to a problem? Please describe.
I'm trying to set up a self contained script as discussed here. This works great on unix systems, but doesn't quite work on windows. One can almost create a shebang line that works on both with #!/usr/bin/env -S python3 -m uv run --script, except pymanager doesn't propagate the additional arguments.
Describe the solution you'd like
I would like the pymanager shebang handler to propagte additional arguments in the same way as the legacy launcher (reference).
Describe alternatives you've considered
One alternative would be to have pymanager support uv as a target directly, but that would require bespoke handling, and only work for this exact use-case. Handling additional arguments more generally would allow for running script through any sort of module (such as the built-in timeit module) or with any other arguments (such as -v).
Additional context
As mentioned above, the legacy launcher does support additional arguments, but doesn't support #!/usr/bin/env -S, so a cross-platform shebang line is not possible with either the legacy launcher or pymanager.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginnen Sie mit pymanager's Shebang-Handler und vergleichen Sie seine Argumentbehandlung mit dem Verhalten des Legacy-Launchers, das in der verlinkten Python-Dokumentation beschrieben wird. Verfolgen Sie, wie zusätzliche Shebang-Argumente beim Ausführen eines Skripts geparst und übergeben werden, und überprüfen Sie anschließend, dass Modul- und Optionsargumente wie -m uv run --script, timeit und -v erhalten bleiben.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- python
- Bereich
- cli, operating-systems
- Issue-Typ
- Feature
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 52/100