Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to 'pip install uwsgi' with alternative build configuration?

Tags:

python

pip

uwsgi

I'm trying to install uWSGI with pip for deploying a Django project:

$ 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 #############
[...]

I see the build configuration there being shown with some options I'd like to change.

  • ssl (done in nginx, I don't want the uwsgi binary to link to OpenSSL)
  • For a development machine I'd like to enable routing and pcre to quickly set up the embedded HTTP server.

How do I do that with pip install uwsgi?

like image 831
gertvdijk Avatar asked Aug 12 '14 09:08

gertvdijk


People also ask

Where does pip install uWSGI?

The uwsgi binary is placed in /usr/bin/uwsgi when installing uwsgi this way.

How do I know if uWSGI is installed?

If there are no socket files in /run/uwsgi , it generally means that the uwsgi process was unable to create it. Check the status of the uwsgi process to find out whether it was able to start: sudo systemctl status uwsgi.

Does uWSGI work on Windows?

uWSGI doesn't work on bare Windows. (It might work on Cygwin, but that's probably not something you want to pursue.)


1 Answers

The setup process checks an environment variable UWSGI_PROFILE_OVERRIDE which can override these configurations. It consists of key=value pairs separated by ; (semicolons). The values true and false must be lowercase which tripped me up at first.

So you could try UWSGI_PROFILE_OVERRIDE=ssl=false;routing=true;pcre=true

However, there's a bunch of auto-detection of capabilities happening too, so it might be that it complains about libraries when you try to force options on.

like image 105
Jason S Avatar answered Oct 03 '22 06:10

Jason S