
Perhaps this will sound like a newbie question but IMHO a lot of people would benefit of some clarification and more info.... Here's the point: what if I want to build an executable using pypy (possibly with a GUI)? I'm not a pro of course, but with cpython I'm able to do it quite easily thanks to py2exe and many GUI frameworks (Qt also comes with a designer). Is there or will be there something like a pypy2exe or already exists a step by step guide I missed? May be rpythonic (http://code.google.com/p/rpythonic/) useful? I apologize if this is the wrong place to discuss such a topic, I can post the question in a better context if you redirect me... Cheers, Paolo

Hi Paolo, On Wed, Feb 29, 2012 at 09:57, Paolo Basso <pa.basso@gmail.com> wrote:
May be rpythonic (http://code.google.com/p/rpythonic/) useful?
"rpythonic" is an unrelated project.
Is there or will be there something like a pypy2exe or already exists a step by step guide I missed?
No, there is no specific pypy2exe project right now. The issue is caused in part from the fact that we, the core developers, are not Windows people. PyPy works "as expected" on Linux and to some extent on OS/X in the sense that it is becoming more and more integrated in the normal distributions. The same is not true on Windows, where we only offer a .zip of the latest release. We need someone to seriously care about Windows and adapt py2exe or other tools. A bientôt, Armin.

Thanks Armin for the clarification, I hope a pypy2exe project will take place soon in the future then! I guess that there is nor the possibility to compile pypy code into .so or .dll libraries, right? 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? This would be (to me) a missing feature also in the OS/X and Linux context. Not that I'm looking for a high level of encryption, even a .pyc file would work quite well.... Cheers, Paolo 2012/3/4 Armin Rigo <arigo@tunes.org>

Hi Paolo, On Tue, Mar 6, 2012 at 16:07, Paolo Basso <pa.basso@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. A bientôt, Armin.

Hi Paolo, On Wed, Feb 29, 2012 at 09:57, Paolo Basso <pa.basso@gmail.com> wrote:
May be rpythonic (http://code.google.com/p/rpythonic/) useful?
"rpythonic" is an unrelated project.
Is there or will be there something like a pypy2exe or already exists a step by step guide I missed?
No, there is no specific pypy2exe project right now. The issue is caused in part from the fact that we, the core developers, are not Windows people. PyPy works "as expected" on Linux and to some extent on OS/X in the sense that it is becoming more and more integrated in the normal distributions. The same is not true on Windows, where we only offer a .zip of the latest release. We need someone to seriously care about Windows and adapt py2exe or other tools. A bientôt, Armin.

Thanks Armin for the clarification, I hope a pypy2exe project will take place soon in the future then! I guess that there is nor the possibility to compile pypy code into .so or .dll libraries, right? 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? This would be (to me) a missing feature also in the OS/X and Linux context. Not that I'm looking for a high level of encryption, even a .pyc file would work quite well.... Cheers, Paolo 2012/3/4 Armin Rigo <arigo@tunes.org>

Hi Paolo, On Tue, Mar 6, 2012 at 16:07, Paolo Basso <pa.basso@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. A bientôt, Armin.
participants (2)
-
Armin Rigo
-
Paolo Basso