> On 24 May 2019, at 7:51 am, stma137 <[email protected]> wrote: > > Is there a way I can create a bundle using Pyinstaller of a Django > application served by mod_wsgi and Apache? Basically freeze my python source > before sending installers to users. > My application has to work on both Linux and Windows. I have so far been > using fastcgi and flup. But Just dropped support for fastcgi, and recommends > using mod_wsgi with Apache. > > The problem I am facing right now is that the apache configuration is > expecting a name of a Python file `wsgi.py` for both `WSGIScriptAlias` and > in `<Files\>` under `<Directory\>. However, > after running Pyinstaller on my project, I don't have any python file. > > Is there a way around this?
For Linux you might be able to do it. You want to have both 'mod_wsgi-httpd' and 'mod_wsgi' in requirements.txt file. The first is going to build and bundle your own Apache which subsequent mod_wsgi module install will use. Only thing am concerned about is how to ensure that mod_wsgi-httpd is installed first as there is no dependency on it for mod_wsgi and install order by pip may be unpredictable. I don't know how PyInstaller works and how you give it list of modules to install. Next use the Django integration for mod_wsgi-express. http://blog.dscpl.com.au/2015/04/integrating-modwsgi-express-as-django.html <http://blog.dscpl.com.au/2015/04/integrating-modwsgi-express-as-django.html> This approach will not work on Windows. Graham -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. To view this discussion on the web visit https://groups.google.com/d/msgid/modwsgi/F16C059C-DCE2-4783-990B-3D9A918FD0EC%40gmail.com. For more options, visit https://groups.google.com/d/optout.
