Support shebang additional arguments
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 344
- フォーク
- 74
- 平均マージ
- 1日 3時間
- マージ済み PR(30日)
- 7
説明
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.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
pymanager の shebang ハンドラーから始め、リンク先の Python ドキュメントに記載されているレガシーランチャーの動作と、その引数処理を比較します。スクリプトの実行時に追加の shebang 引数がどのように解析され、渡されるかを追跡し、その後、-m uv run --script、timeit、-v などのモジュール引数とオプション引数が保持されることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- python
- 領域
- cli, operating-systems
- issue の種類
- 機能追加
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 52/100