As far as I can tell, DevPI currently supports two deployment scenarios: running
devpi-sever from the command-line interactively (with its built-in webserver) or running
devpi-server from supervisord with nginx in front of it.
Unfortunately, I'm using DevPI inside a large organisation, and while I could campaign for supervisord and nginx, it would be much easier for me if I could just deploy DevPI with Apache and
mod_wsgi like all our other internal websites.
Currently I have a WSGI script that calls
main.XOM.create_app() to build the application object, but there's some delicate and undocumented configuration that needs to happen before calling that method. For DevPI 1.2 it wasn't too difficult to get something working, but DevPI 2.0 adds setuptools plugins into the mix.
Ideally, my WSGI script would look something like this:
VIRTENV_PATH = "/path/to/devpi-virtenv" # Make sure all DevPI's requirements are available import site site.addsitedir(VIRTENV_PATH) # Log everything to a handy location import logging logging.basicConfig(filename="/var/log/devpi.log") # Build our application object from devpi_server import wsgi application = wsgi.create_app( serverdir="/var/local/devpi", refresh=60, debug=False, )