-
-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can Rye support installer packaging for end users (like PyInstaller)? #325
Comments
Fwiw https://github.com/ofek/pyapp might be relevant |
One of the reasons I really like hanging close to the indygreg Python builds is that they are also the base of PyOxidizer. Long term I would love to see that you can directly build binaries via PyOxidizer's infrastructure. |
Hi, is there any update to this issue? It would be a nice feature to have, especially when I need to build a desktop application |
@sandangel the issue with supporting redistributable Python executables is not the lack of ambition, but that Python's ecosystem really does not support this well. You can look into the history of PyOxidizer and what it ran into. I do not expect there to be progress made for a year or two just because there is a lot that needs to be addressed first. |
I see hatch already has support for pyapp, which also work well. Can we consider adding it to rye? |
This would be fantastic to see, especially since PyOxidizer was essentially deprecated a few weeks ago. |
As an alternative to this, I'm now looking into embedding Python in a Go binary. Putting aside the particulars of that process, is it possible to run a Python app created with Rye on a system where Rye is not installed? Like, can you just copy the project directory that contains the Python standalone build and run the application without Or is it necessary to have Rye installed in order to make use of the Python standalone build etc...? |
@sandangel PyApp and PyOxidizer/PyInstaller are quite different: PyApp takes a python version and bundles it along with your code. Upon first installation, the binary puts the python binary into its own environment, gets the required dependencies, and runs your code. When you run a CLI, these differences are not very visible to the user in the day-to-day usage, however, if your program is a GUI, you will for example see that the PyApp executable just starts python in the background and then runs the GUI (see ofek/pyapp#96 and explanation in ofek/pyapp#97). Thus, the running program and the binary are not associated with each other anymore, resulting in icon/executable mismatches. However, PyApp is really powerful, since it works really well for what it does and it is very simple to use! For my own projects, I started writing a simple CLI (repo, docs) that allows you to package |
I don't have a direct use-case at the moment, and feel free to close if out of scope, but I think it would be pretty useful to have the equivalent of
cargo build
in Rye, that produces a binary that an end-user can use without installing Python separately. I think this was mentioned earlier in discussion but I didn't find an existing issue so I figured I'd make one.I think PyInstaller does a lot of work (i.e. source analysis) that is maybe subsumed by modern
pyproject.toml
s (i.e. PEP 518), and since Rye already manages downloads of indygreg's Python binaries, it can probably figure out binary management here.I think one design decision that would need to be made is whether to do full app packaging (e.g. .msi vs.exe, .app vs Mach-O executable, etc.).
Caveat: unfortunately I don't have a lot of time to attempt to implement it right now, but I might in a few months (sorry for a drive-by request).
The text was updated successfully, but these errors were encountered: