我正在使用 uwsgi 在 heroku 上提供我的应用程序。部署时似乎不支持路由,因为不知何故 uwsgi 是在没有正则表达式功能的情况下构建的。日志说:
!!! no internal routing support, rebuild with pcre support !!!
我从https://github.com/piotras/heroku-buildpack-pcre启用了 buildpacks,它似乎支持在 heroku 机器上安装 pcre(perl 兼容的正则表达式)。
但是 uwsgi 仍然无法使用 pcre/routing 进行编译:
>heroku run pip install -I uwsgi
.. wall of text ..
################# uWSGI configuration #################
locking = pthread_mutex
json = False
zlib = True
kernel = Linux
debug = False
capabilities = False
xml = libxml2
routing = False
ssl = True
execinfo = False
malloc = libc
filemonitor = inotify
pcre = False
plugin_dir = .
yaml = embedded
event = epoll
ifaddrs = True
timer = timerfd
############## end of uWSGI configuration #############
total build time: 23 seconds
*** uWSGI is ready, launch it with /app/.heroku/python/bin/uwsgi ***
如何在heroku上的uwsgi中启用路由?