Running twistd with pypy

I try Pypy because it shows impressive tests on CPython. In addition, I mainly use the Twisted library in my code. Now I can run a test script that uses a Twisted reactor, so I think my setup is good. However, I do not know how to run Twisted daemonizer (twistd) using Pypy.

+6
source share
1 answer

You can either do this explicitly at runtime:

~$ /usr/bin/pypy /usr/bin/twistd ... 

This works because it specifically launches PyPy and tells it to start interpreting the twistd script.

Or you can do it persistently during installation:

 ~/Twisted-11.0.0$ /usr/bin/pypy setup.py install 

This works because distutils (which uses setup.py) overwrites the line #! each script that it installs to point to the interpreter used for installation. Thus, #! / Usr / bin / env python in the installation source becomes #! / Usr / bin / pypy in the installed copy.

+6
source

Source: https://habr.com/ru/post/895828/


All Articles