Fedora Account System
Red Hat Associate
Red Hat Customer
mod_wsgi-express is currently only available when mod_wsgi is installed from PyPi. Would be nice to have it also as an rpm, especially as it's the recommended way of running mod_wsgi in containers [0]. [0] <https://modwsgi.readthedocs.io/en/develop/>
So I had a bit of a look at this. It turns out the mod_wsgi source tree has basically two (totally separate?) pieces, the Apache module written in C and a Python package providing some management functionality (stuff like installing the module into an Apache installation, which is irrelevant for a packaged copy of mod_wsgi) as well as the mod_wsgi-express convenience script. As a first attempt, I tried just building+installing the Python modules. It seems to work pretty much as expected. It wants to ship a copy of the built HTML docs as package data (to be served up by mod_wsgi-express) so I added a step to build the Sphinx docs too. Patch to be attached. The only downside I can see is that it ends up building the Apache module two extra times (once in the Python 2 package and once in the Python 3 package) and then including the Apache module .so as part of the Python package so that it can load it into the server started by mod_wsgi-express. It seems like it should just be using the existing version of the module which is already built and installed, instead of including a separate copy. But that might be an upstream RFE rather than something that should be fixed in the package.
Created attachment 1310972 [details] proposed patch
Btw it would be very helpful for us if you could also backport this to Fedora stable releases. The mod_wsgi-express script has existed since mod_wsgi 4.1.0.
Commit: http://pkgs.fedoraproject.org/rpms/mod_wsgi/c/241a680c246d91f55a733aa1f45a480697c28ff4
Dan, I applied your patch, though I haven't tested it. Is it necessary to package all of /usr/lib64/python2.7/site-packages/mod_wsgi/docs/_static/fonts - this looks huge and is just a bunch of ttf fonts.
Package: mod_wsgi-4.5.20-1.fc28 Build: https://koji.fedoraproject.org/koji/buildinfo?buildID=987036
Package: mod_wsgi-4.5.20-1.fc27 Build: https://koji.fedoraproject.org/koji/buildinfo?buildID=987041
Package: mod_wsgi-4.5.20-1.fc26 Build: https://koji.fedoraproject.org/koji/buildinfo?buildID=987045
(In reply to Joe Orton from comment #5) > Is it necessary to package all of > /usr/lib64/python2.7/site-packages/mod_wsgi/docs/_static/fonts - this looks > huge and is just a bunch of ttf fonts. Well, that's just normal Sphinx doc output. They bundle jQuery usually too... There are plenty of other Python packages in Fedora which contain Sphinx output like that, for example `ls -d /usr/share/doc/*/html/_static/` finds 14 directories on my system here. Although none of those seem to include a fonts subdirectory, so I guess that is something mod_wsgi upstream has added specifically. Probably in their Sphinx theme. I don't think it's *necessary* to build and ship the Sphinx output -- it's just what upstream intends as the default configuration for mod_wsgi-express. If you don't want to ship all that stuff, then it would just mean that mod_wsgi-express wouldn't necessarily work straight out of the box (without telling it what application to run). But that doesn't seem like a big deal.