Re: Single binary SCons and byte-code caching
Mats Wichmann <[email protected]>
| Newsgroups | gmane.comp.programming.tools.scons.user |
|---|---|
| Message-ID | <[email protected]> |
On 3/10/22 19:31, Brad Kraemer wrote: > Hi Fellows, > > That makes sense. I don't currently have a need for an installer or > self-contained binary (just a nice warm-fuzzy feeling thought about it). > Judging from your response's though, it sounds like it would be a > non-trivial amount of experimenting to get it to work (with all the > potential corner-cases and whatnot). If I find myself in need of another > side-project though I might do some experimenting and get back to you > about any positive results. Well, my shorter-than-Bill's experience is there do seem to be people who want a self-contained install - basically on Windows, where Python is not default, and some places have somewhat or very locked-down policies, and sometimes the developer just doesn't want to have to require her users to have to install something separate. > Just for my future memory (and again not having a good grasp on the > Python ecosystem), is PyInstaller the go-to project for making > self-contained Python project? Long diversion coming (be warned, many of these things probably don't map well to an SCons use-case): pyinstaller is probably the most famous of the approaches, but it's far from the only one. There's a project called py2exe, which targets Windows only AFAIR (pyinstaller can build a bundle or single-executable for the system on which it's running, so it covers other targets - but it doesn't "cross-compile"). There's something called PyOxidizer which I just heard about recently and is comparatively quite new. For a not-just-plug-and-play approach there is Cython - some projects benefit greatly by building pieces using Cython, where you start with Python source code but end up producing compiled object code (dll on windows, etc.). And there's a project with somewhat similar aims called Nuitka, which is relatively SCons-friendly as it uses SCons itself and their folks show up here from time to time. But probably I'd classify those two approaches (Cython and Nuitka) as more oriented to squeezing performance out of Python apps than to trying to solve the problem of seamless distribution of Python apps. I'm sure I've missed some, this is certainly a topic people (meaning in general, not specifically SCons users) care about. For an example you can look here for a keynote at a Python conference a few years ago: https://www.youtube.com/watch?v=ftP5BQh1-YM that video has a lot of material from before the actual keynote starts, and some intro stuff from the speaker, you can look about 28 minutes in for when the discussion of Black Swans actually gets rolling. He mentions yet another approach, BeeWare - although maybe its focus isn't necessarily something that would apply to a build tool like SCons.