IssueRaiser

Suggestion: `uv bundle`, `uv build --release` or similar to create a contained executable a la pyinstaller, py2exe

I regularly use pyinstaller for a project, and the frequency of questions about it - or the task more generally of "compiling" an executable for distribution - around the web indicates to me that it's widely popular. It would be incredibly cool if uv offered a `uv bundle` command (or whatever name) that essentially did what pyinstaller does and bundles together everything to afford an executable that contains the dependencies and interpreter and can be distributed to users as-is. And I think this falls into the realm of what things a "Cargo for Python" might be expected to be able to do. I assume that pyinstaller, py2exe etc. are complex projects and implementing such functionality would be not trivial in the slightest, so I would have thought it would be a case of using `pyinstaller` itself in the background like the way that build backends are used. Presumably there will one day be a `uv build` command but I assume that will be similar to `rye build` in that it will create an sdist or wheel. Maybe there could be a `uv build --executable` option, or `uv build --release` (by analogy to `cargo build --release`)?

Posted by matterhorn103 on Aug 5, 2024, 11:26 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Other)

Suggestion: `uv bundle`, `uv build --release` or similar to create a contained executable a la pyinstaller, py2exe

matterhorn103Aug 5, 2024, 11:26 PM

I regularly use pyinstaller for a project, and the frequency of questions about it - or the task more generally of "compiling" an executable for distribution - around the web indicates to me that it's widely popular. It would be incredibly cool if uv offered a `uv bundle` command (or whatever name) that essentially did what pyinstaller does and bundles together everything to afford an executable that contains the dependencies and interpreter and can be distributed to users as-is. And I think this falls into the realm of what things a "Cargo for Python" might be expected to be able to do. I assume that pyinstaller, py2exe etc. are complex projects and implementing such functionality would be not trivial in the slightest, so I would have thought it would be a case of using `pyinstaller` itself in the background like the way that build backends are used. Presumably there will one day be a `uv build` command but I assume that will be similar to `rye build` in that it will create an sdist or wheel. Maybe there could be a `uv build --executable` option, or `uv build --release` (by analogy to `cargo build --release`)?

Comments (0)

No comments yet. Start the discussion.

Comment on this issue