-
Notifications
You must be signed in to change notification settings - Fork 47
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
PyInstaller #288
PyInstaller #288
Conversation
@@ -48,3 +48,6 @@ jobs: | |||
|
|||
- name: Check docs are up to date | |||
run: poetry run poe docs && [ $(git status --porcelain docs/ | wc -l) -eq "0" ] | |||
|
|||
- name: Check PyInstaller compilation | |||
run: poetry run poe build |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably want this in the python-build workflow rather than the python-check workflow. And then probably should add it as an artifact?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just wanted to have it here as an initial smoke test but yeah I agree, before we merge we should make an action for automatically building it and including zips in the release.
I'd like to bring this into consideration again. Main thing missing that should be here before merge is integrating into workflows. Also, I did some benchmarking for the PyInstaller folder build vs Nuitka vs pipx install. They all seem to be pretty close with eachother so we don't loose much going from pipx > pyinstaller. PyInstaller is marginally faster than Nuitka, but since PyInstaller is more popular probably makes sense to stick with it even if we find there are other commands that Nuitka outperform it. Note that this is for the directory distribution. It can be compiled to a single binary, but performance is much worse. This is totally fine for
|
@joe-p thanks again for all the work on this PR so far! Just fyi, i moved your latest and merged latest from main into #382. @negar-abbasi will be spiking an ADR to asses pyinstaller and few other alternatives - there are still some limitations with pyinstaller+gh actions when it comes to apple silicon builds and linux distros with glib dependency - will be assessing how to address those as part of ADR. As for this PR we might revisit and close it once we get to implementation (cc @neilcampbell ) |
Adds PyInstaller to the dependencies and a poe task for building the binary. This allows us to distribute a binary without needing users to install python and pipx first, which is particularly useful for devs not using Python in their development stack but still want to use algokit.
I still need to do some more testing, but so far things seem to be working on Mac (ARM) and Ubuntu.