-
-
Notifications
You must be signed in to change notification settings - Fork 357
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 binaries #768
Pyinstaller binaries #768
Conversation
Codecov Report
@@ Coverage Diff @@
## 2.x #768 +/- ##
=======================================
Coverage 91.68% 91.68%
=======================================
Files 122 122
Lines 7605 7605
=======================================
Hits 6973 6973
Misses 632 632 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
0749928
to
ed0b6ee
Compare
ed0b6ee
to
7e23554
Compare
7e23554
to
d442edb
Compare
d442edb
to
f60d488
Compare
This makes it possible to build executable and portable (within OS/arch) `pyinfra` binaries, at the cost of being rather slow compared to the installed Python package.
In theory this should yield a startup speed improvement.
9a38669
to
0517696
Compare
should be doable with |
For now I'm killing this, I do wish to revisit probably using |
If you revisit this I would recommend taking a look at what PyApp, by Ofek Lev, has to offer. Hatch (by the same author) has a simple integration with PyApp via it's Binary Builder Plugin. I use this at work to build an internal utility that is written in Python and has mulitple 3rd-party dependencies (e.g. rich, requests, psutils). It produces a single (Linux ELF) executable that I can just copy an any machine and run. A good usage example might be Hatch itself. One can download it as a single executable. PyApp provides the executable with a nice "self" subcommand. E.g.: |
Sometimes it's desirable to have a single binary instead of a
pip
/whatever package. Unfortunately in the Python world this isn't a simple task and the resulting binary is pretty slow to execute (10s to start cold). But it works!