如何使用替代构建配置'pip install uwsgi'?

ger*_*ijk 5 python pip uwsgi

我正在尝试使用pip 安装uWSGI来部署Django项目:

$ pip install uwsgi
[...]
################# uWSGI configuration #################

pcre = False
kernel = Linux
malloc = libc
execinfo = False
ifaddrs = True
ssl = True
zlib = True
locking = pthread_mutex
plugin_dir = .
timer = timerfd
yaml = embedded
json = False
filemonitor = inotify
routing = False
debug = False
capabilities = False
xml = expat
event = epoll

############## end of uWSGI configuration #############
[...]
Run Code Online (Sandbox Code Playgroud)

我看到显示的构建配置中有一些我想要更改的选项.

  • ssl(在nginx中完成,我不希望uwsgi二进制文件链接到OpenSSL)
  • 对于开发机器,我想启用routingpcre快速设置嵌入式HTTP服务器.

我该怎么做pip install uwsgi

Jas*_*n S 11

设置过程检查UWSGI_PROFILE_OVERRIDE可以覆盖这些配置的环境变量.它由key=value;(分号)分隔的对组成.值truefalse必须为小写,其绊倒我在第一.

所以你可以试试 UWSGI_PROFILE_OVERRIDE=ssl=false;routing=true;pcre=true

但是,也有一堆自动检测功能,所以当你试图强制选项时,它可能会抱怨库.

  • 来源潜水.它确实似乎被排除在其他广泛的文档之外. (3认同)