Tests about a simple python3 fastcgi runner using libfcgi and the Python-C API.
python
c
wsgi
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
Yann Weber 5c42fde3a4 Add ipv6 parse function tests 5 лет назад
include Add ipv6 parse function tests 5 лет назад
src Write some tests for monitor URL parsing functions + bugfixes 5 лет назад
tests Add ipv6 parse function tests 5 лет назад
AUTHORS Add missing am files 5 лет назад
COPYING Add autotools & checks 5 лет назад
ChangeLog Add missing am files 5 лет назад
Doxyfile Start implementing pep333 application support 5 лет назад
Makefile.am Deleted lib dir + autoconf enhancement 5 лет назад
NEWS Add missing am files 5 лет назад
README Bugfix foo_pep333.py for uwsgi 5 лет назад
autogen.sh Start implementing pep333 application support 5 лет назад
benchmarks Add 120s siege benchmarks 5 лет назад
configure.ac Replacing old sysV sem by new POSIX solves #25 5 лет назад
foo.py 1st fonctionnal implementation of both python<->C IPC 5 лет назад
foo_pep333.py Bugfix foo_pep333.py for uwsgi 5 лет назад
includes_python3.7m.patch Initial commit 5 лет назад

README

Patch python3 headers :
-----------------------
# cd /usr/include/python3.7m/
# patch -p1 < PATH_TO/includes_python3.7m.patch

Building & running pyfcgi :
---------------------------
$ ./autogen.sh
$ ./configure
$ make
# To run foo_pep333.entrypoint() PEP333 application
$ spawn-fcgi -d . -n -p 9000 -a 127.0.0.1 -- src/pyfcgi -S -e foo_pep333 -E entrypoint
or
# To run foo.entrypoint() sending to FCGI python stdout
$ spawn-fcgi -d . -n -p 9000 -a 127.0.0.1 -- src/pyfcgi -S -e foo -E entrypoint -A


configure script determine python flags, libs & includes paths using
python3-config programm. The path can be specified using the
PYTHON_CONFIG_PATH environment variable.

Example : linking against a debug build of python :
---------
$ ./configure PYTHON_CONFIG_PATH=/usr/bin/python3dm-config --enable-debug
$ make clean && make
$ valgrind --log-file=/tmp/val.log --trace-children=yes spawn-fcgi -d . -n -p 9000 -a 127.0.0.1 -- src/pyfcgi -S -e foo_pep333 -E entrypoint -L '/tmp/foo.log;0xff;{datetime} {msg} {ident}'

logging to file example :
-------------------------
-L '/tmp/foo.log;0xff;{datetime} {msg} {ident}'

uwsgi equivalent :
------------------
uwsgi_python3 --fastcgi-socket 127.0.0.1:9000 --module foo_pep333:entrypoint --processes=5