arigo at tunes.org
Wed Mar 21 19:03:23 CET 2012
On Tue, Mar 6, 2012 at 16:07, Paolo Basso <pa.basso at gmail.com> wrote:
> I mean, I know I'm probably going to say something which is not completely
> in the spirit of an open source project but, no way to hide the code?
There is no official support for that, but you can try to play around.
You can edit the file pypy/translator/goal/app_main.py: this file is
"pre-imported" at translation time. So far the only global import is
"import sys". But if you add more imports, the corresponding files
will also be pre-imported when you start "translate.py". This means
that in this way you create a "pypy-c" binary that contains a frozen
live image of your modules, already present in sys.modules when you
start this particular "pypy-c" binary. In this way you can distribute
a "bloated pypy-c" that can run without even looking for some or all
the .py or .pyc files.
More information about the pypy-dev