I have been building a python-based standalone application using py2app (Mac OS X 10.6) and py2exe (Win XP and Win7). Recently I added support for functions that depend on the library patsy. However, when building py2app or py2exe versions of my software, only the "init.pyc" and "origin.pyc" files from patsy are included in the site-packages.zip patsy folder (excluding the 20 additional python module files). When importing patsy, the standalone app throws the error "ImportError: No module named highlevel" (highlevel is patsy module).
An ugly work around for this is to throw the missing .pyd modules into the patsy directory of the site-packages.zip, but this is not ideal. A simple example of this for py2app code is shown, but the same applies for py2exe:
test_import.py
import patsy
print 'hello patsy'
setup.py
includes = ["patsy"]
from distutils.core import setup
import py2app
import patsy
from patsy import highlevel
options = {"py2app":{"includes": includes}}
setup(name='test',app=["test_import.py"],setup_requires=["py2app"])
Any recommendations are greatly appreciated. Thanks.