[Pythonmac-SIG] py2app and Django

Bob Ippolito bob at redivi.com
Fri Aug 4 21:31:46 CEST 2006


On Aug 4, 2006, at 12:09 PM, Rob Hudson wrote:

> I appreciate the explanation and feedback.  I tried what you  
> suggest and I can see that it does pull in the full django tree  
> which is much easier and better.
>
> This looks close but not quite there...
>
> Here's the latest py2app-setup.py:
>
> #!/usr/bin/env python
> from setuptools import setup
> setup(
>         app=["run.py"],
>         setup_requires=["py2app"],
>         options=dict(py2app=dict(packages=["django","Quotes"],)),
> )
>
> Now I simply run this from within the Django-0.95 directory:
> python py2app-setup.py py2app
>
> And then launch Django:
> # /dist/run.app/Contents/MacOS/run
> Validating models...
> Skipping validation because things aren't configured properly.
> Django version 0.95, using settings 'Quotes.settings'
> Development server is running at http://127.0.0.1:8000/
> Quit the server with CONTROL-C.
>
> Everytime the first page hit always produces the following error yet
> concurrent page requests do not show this error.  This seems very odd
> to me and suggests something strange is happening in Django...

At this point, using the packages option, you've got nearly the same  
filesystem layout as you would normally, so it's highly unlikely  
py2app has anything to do with the problems you've experiencing.

Are you sure all of this stuff works outside of a packaged  
environment? It sounds like your problems don't really have anything  
to do with py2app at this point. The django list would be more  
appropriate; these errors won't make any sense to anyone that doesn't  
have intimate knowledge of django's source.

-bob



More information about the Pythonmac-SIG mailing list