[Scons-users] Single binary SCons and byte-code caching

Brad Kraemer computerpro_58 at hotmail.com
Thu Mar 10 15:25:04 EST 2022


Hello,

I'm not very well versed in the Python ecosystem, but did note that 
their seem to be several projects which allow for a Python application 
to be packaged into a single binary (ELF or PE). Has anyone tried to do 
this with SCons? Perhaps not entirely self-contained (in the static 
sense) but at least a single launch point (where no pre-existing Python 
installation is present).


Somewhat related I've noticed Python byte-code spawning in my Tools 
directories. I realize there is a benefit to this byte-code being cached 
ahead of time, but this does feel like a implementation-from-design 
leak. As a workaround, I can (Python 3.3+) set the environment variable 
PYTHONPYCACHEPREFIX to a better location which isn't within my Tools 
directories. As I look at this as a work around, I'm wondering if this 
couldn't be set by SCons itself when starting up (or equivalent Python 
functionality/variables)?


Thanks,

simplejack-src



More information about the Scons-users mailing list