3 ms·
Quick how-to: 1. (optional) install PyPy "JIT compiler" binaries [0] 2. get and extract the PyPy source[1] from bitbucket release packages, which includes the
by lloeki 14y ago
Quick how-to:
1. (optional) install PyPy "JIT compiler" binaries [0]
2. get and extract the PyPy source[1] from bitbucket release packages, which includes the RPython translator, written itself in Python and, although working on CPython, best run under PyPy as installed on step 1.
3. write a (R)Python module including a def target returning the entry point function[2], and call the translator upon your module, like so:
python ./pypy/pypy/translator/goal/translate.py example2.py
I wish getting the translator was more 'packaged' and did not involve getting the whole PyPy source but I hear this is in the works, and it is reasonably easy already. The hardest part is actually figuring the translator is not part of PyPy binary release, and that it's available straight from bitbucket.
[0]: http://pypy.org/download.html http://pypy.org/download.html
[1]: https://bitbucket.org/pypy/pypy/get/release-1.9.tar.bz2 https://bitbucket.org/pypy/pypy/get/release-1.9.tar.bz2
[2]: http://morepypy.blogspot.fr/2011/04/tutorial-writing-interpreter-with-pypy.html http://morepypy.blogspot.fr/2011/04/tutorial-writing-interpr...
- fijal 14y agoyeah, working on it, sorry :/