[Pythonmac-SIG] py2app and Django

Bob Ippolito bob at redivi.com
Fri Aug 4 02:48:53 CEST 2006


On Aug 2, 2006, at 1:43 PM, Rob Hudson wrote:

> I'm trying to bundle up a Django built website.  Using SQLite and
> Django's built-in WSGI webserver, my thinking was that this would be
> 100% Python and would be straight forward to use py2app or py2exe  
> on it.
>
> I'm not familiar enough with py2app to know whether the error I'm
> getting is related to py2app or related to Django.  So I thought I'd
> post what I've done so far here for the list's guidance...
>
> I've followed the guide located here:
> http://svn.pythonmac.org/py2app/py2app/trunk/doc/index.html

Django can not be packaged normally because it has in-package data  
files. It won't work with either py2exe or py2app without tweaking.

It may Just Work (or come close to that) with the --packages option.  
It will definitely not work using any number of --includes options,  
because that's not the issue.

--packages is not applicable to py2exe though. In that case, you'll  
need to place the django package next to your .exe and --exclude it  
so that it doesn't get picked up in the zip.

-bob


More information about the Pythonmac-SIG mailing list