habrahabr.ru
Но мы используем hg.mperillo.ath.cx поэтому меняем 461 строку в ngx_wsgi_runtime.c
Было:
461 if (clcf->name.len == 1 && clcf->name.data[0] == '/') {
Стало:
461 if (1 || (clcf->name.len == 1 && clcf->name.data[0] == '/')) {
После этого не хотел пересобираться nginx, потому что было указано, что собран с PTH, а pth.h не видел.
Делаем
ln -s /usr/local/include/pth/pth* /usr/local/include/python2.6/
А когда матерится на незнание -lpht
ls -s /usr/local/lib/pth/libpth.so /usr/local/lib/
Но мы используем hg.mperillo.ath.cx поэтому меняем 461 строку в ngx_wsgi_runtime.c
Было:
461 if (clcf->name.len == 1 && clcf->name.data[0] == '/') {
Стало:
461 if (1 || (clcf->name.len == 1 && clcf->name.data[0] == '/')) {
После этого не хотел пересобираться nginx, потому что было указано, что собран с PTH, а pth.h не видел.
Делаем
ln -s /usr/local/include/pth/pth* /usr/local/include/python2.6/
А когда матерится на незнание -lpht
ls -s /usr/local/lib/pth/libpth.so /usr/local/lib/
import socket
from _ssl import SSLError as sslerror
ImportError: cannot import name SSLError
*** Error code 1
Решение найдено тут:
149.20.54.209
В /usr/ports/lang/python26/Makefile меняем off на on для HUGE_STACK_SIZE, SEM и PTH. Т.е. чтобы получилось так:
52 OPTIONS= THREADS "Enable thread support" on \
53 HUGE_STACK_SIZE "Use a larger thread stack" on \
54 SEM "Use POSIX semaphores (experimental)" on \
55 PTH "Use GNU Pth for threading/multiprocessing" on \
2010-08-01T18:09:17 <DasIch> jokey: str vs. bytes
2010-08-01T18:10:43 <DasIch> jokey: one side says everything should be str, the other says everything should be bytes, another side says it should be a mix of the two and all of those sides don't have anything to show which is the best solution
2010-08-01T18:11:33 <DasIch> jokey: then there is also the group of people that says that wsgi was even in python 2.x not that good in certain points and wants to create something else altogether
2010-08-01T18:12:28 <DasIch> jokey: as you can see it's only a slight disagreement which should resolve once we have only one side because everybody else died
blog.dscpl.com.au