[Scons-users] Single binary SCons and byte-code caching
Bill Deegan
bill at baddogconsulting.com
Thu Mar 10 19:53:03 EST 2022
Brad,
We used to have .exe installer, but we've dropped that in favor of
recommending pypi install.
There'd be a non-trivial amount of work getting pyinstaller working, and
ongoing maintenance.
And we have almost zero users asking for it, so it's unlikely we'll create
a pyinstaller.
If, for your use model, you need such, then feel free to roll your own.
That said:
python -mpip install scons
Is pretty darned easy.
Re byte codes, SCons is unlikely to support this request.
It'd just add to the maintenance effort with so far (in 20 years) 1 user
asking for it... ;)
But as above, nothing stops you from modifying, forking, etc to make SCons
work in whatever way you desire.
-Bill
On Thu, Mar 10, 2022 at 1:32 PM Mats Wichmann <mats at wichmann.us> wrote:
> On 3/10/22 13:25, Brad Kraemer wrote:
> > 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).
>
> pyinstaller can pretty much do this. might need some work - there's a
> hook mechanism you use to teach it about things it can't detect itself,
> and some of the dynamic stuff scons does - umm, Tool importing in
> particular comes to mind - might defeat it. That's just guessing, never
> tried it.
>
> > 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)?
>
> That's on behalf of the Python import system - keeping the bytecode
> together with the source file (thankfully with Python 3 we at least get
> a subdirectory) keeps the logic natural - if you find the .pyc there you
> don't have to first compile the .py, but you don't want to go hunting
> all over the place in the normal case.
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20220310/69cab497/attachment-0001.htm>
More information about the Scons-users
mailing list