I have a pyobjc app running in a 32-bit only python build that makes use of the gevent library. Everything works great in py2app'ed alias mode, but once I build an app bundle, the gevent module can't find the httplib library, even if it was bundled with the site-packages directory.
File "gevent/monkey.pyo", line 182, in patch_httplib
File "gevent/httplib.pyo", line 8, in <module>
ImportError: No module named httplib
I've tried false importing as suggested (even if the module seems to have been packaged), but to no avail. It can find the gevent.httplib module but not the module it's supposed to monkey patch. could this be a problem with the monkey patching feature?
EDIT: it looks like find_module isn't working properly with my py2app bundle. Is there a workaround to this? I don't think it's a problem with dotted modules as httplib isn't dotted (it's part of the core python libs)
EDIT 2: so it definitely is imp.find_module. Using import('httplib') instead of load_module fixes it, but I had to delete the reference to 'httplib' in sys.modules because it can't monkey patch if it's already loaded. I don't think this is the correct way to do it though, though the built app bundle works properly (httplib is now monkey patched and allows init with HTTPSConnection). Is there any workaround/fix to this py2app problem?