<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On 9 Sep, 2012, at 20:34, Paul Wiseman <<a href="mailto:poalman@gmail.com">poalman@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Hey,</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">When building an app that is using sqlalchemy I get this error:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><div><font face="courier new, monospace">creating python loader for extension 'sqlalchemy.cprocessors'</font></div>
<div><font face="courier new, monospace">error: /Users/paul/Source/Python/build/bdist.macosx-10.6-intel/python2.7-standalone/app/temp/sqlalchemy/cprocessors.py: No such file or directory</font></div></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I took a look in site packages and there is no cprocessors.py, but a cprocessors.so - so maybe it is just looking for the wrong extension</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
I tried adding "sqlalchemy.cprocessors" to the includes list in py2app but that hasn't helped.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">I was wondering if I can fool it by dropping an empty cprocessors.py so it will build, then swap it out afterwards for the so, but I'm sure there's a better way and I'm not convinced that could even work.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">
Surely py2app doesn't assume every extension is .py, or if it does can it be changed?</div></blockquote><div><br></div>Py2app does not assume that every extension is a python file. Given the messasge I'd say that the error occurs in the code path that creates a helper python file that actually loads the exention.</div><div><br></div><div>A little background information: when py2app creates the application bundle all modules are stored in a zipfile and loaded using python's zipimporter. Extensions cannot be stored in the zipfiles because the zipimporter doesn't support that. Py2app therefore creates a placeholder python module in the zipfile that loads the extensions from a directory in the application bundle. </div><div><br></div><div>BTW. could you please create a sample project that demonstrates the problem? I've tried to reproduce your problem on my machine and failed to do so. I did run into another problem, py2app generated an incomplete bundle due to confusion between a _collections submodule in SQLAlchemy and the _collections extension in the stdlib; that's something I'm currently trying to fix.</div><div><br></div><div>Ronald</div><div><blockquote type="cite">
_______________________________________________<br>Pythonmac-SIG maillist  -  <a href="mailto:Pythonmac-SIG@python.org">Pythonmac-SIG@python.org</a><br><a href="http://mail.python.org/mailman/listinfo/pythonmac-sig">http://mail.python.org/mailman/listinfo/pythonmac-sig</a><br>unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG<br></blockquote></div><br></body></html>