Tests about a simple python3 fastcgi runner using libfcgi and the Python-C API.
python
c
wsgi
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
Yann Weber 7004f544e4 Add a todo + some commented debug lines + foo_pep333.py enhancement il y a 5 ans
include Add a todo + some commented debug lines + foo_pep333.py enhancement il y a 5 ans
src Add a todo + some commented debug lines + foo_pep333.py enhancement il y a 5 ans
tests Start implementing pep333 application support il y a 5 ans
AUTHORS Add missing am files il y a 5 ans
COPYING Add autotools & checks il y a 5 ans
ChangeLog Add missing am files il y a 5 ans
Doxyfile Start implementing pep333 application support il y a 5 ans
Makefile.am Deleted lib dir + autoconf enhancement il y a 5 ans
NEWS Add missing am files il y a 5 ans
README Deleted loglines, updated README + add check on FCGX_PutStr calls il y a 5 ans
autogen.sh Start implementing pep333 application support il y a 5 ans
configure.ac Deleted lib dir + autoconf enhancement il y a 5 ans
foo.py 1st fonctionnal implementation of both python<->C IPC il y a 5 ans
foo_pep333.py Add a todo + some commented debug lines + foo_pep333.py enhancement il y a 5 ans
includes_python3.7m.patch Initial commit il y a 5 ans

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}'