Support shebang additional arguments
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 52/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- python
- 領域
- cli, operating-systems
研究方向
從 pymanager 的 shebang 處理器開始,將其引數處理方式與連結的 Python 文件中所描述的舊版啟動器行為進行比較。追蹤執行腳本時如何解析並傳遞額外的 shebang 引數,然後確認如 -m uv run --script、timeit 和 -v 之類的模組引數與選項引數都會保留。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Python
- 星號
- 344
- 分支
- 74
- 平均合併
- 1 天 3 小時
- 30 天內合併 PR
- 7
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
python/pymanager 的其他 Issue
-
documentation
難度 1/5 1-3 小時 新手友好度 75/100
-
enhancement
難度 4/5 3-5 天 新手友好度 55/100
-
難度 4/5 3-5 天 新手友好度 45/100
-
enhancement
難度 4/5 3-5 天 新手友好度 45/100
-
難度 3/5 1-2 天 新手友好度 48/100
相似的 Issue
-
bug
難度 2/5 1-3 小時 新手友好度 75/100
stephrobert/dsoxlab#238 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 75/100
sublimehq/package_control#1780 ·
-
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 70/100
nwg-piotr/nwg-displays#145 ·