Ronald,<br><br>Great to hear that you&#39;re working on better tests for PyObjCTools.&nbsp; After struggling for hours, I think I finally found the problem with the latest py2app-devel (0.4.2) + pyobjc-cocoa (2.0.1) from MacPorts.&nbsp; I found the __init__.py file was missing from:<br>

<br>/opt/local/lib/python2.5/site-packages/PyObjCTools/<br><br>I downloaded the __init__.py file from the pyobjc SVN and plopped it in that directory.&nbsp; For reference, this file contains the following one line:<br><br>__import__(&#39;pkg_resources&#39;).declare_namespace(__name__)<br>

<br>Then, I modified my setup file so that it looks more like install_requires=[&quot;pyobjc-core&quot;].&nbsp; Apparently PyObjC 2.0 broke the project up into smaller packages and the name changed as well.&nbsp; &quot;pyobjc-core&quot; and I think &quot;pyobjc-framework-cocoa&quot; are the packages required to build the PyObjC examples that were of interest to me.<br>

<br>Phew, I&#39;m so glad this is finally working.&nbsp; Good luck with the py2app tests.&nbsp; I for one will be grateful for your work<br><br>Thanks,<br>Jacob<br><br><br><div class="gmail_quote">On Tue, Feb 10, 2009 at 2:40 AM, Ronald Oussoren <span dir="ltr">&lt;<a href="mailto:ronaldoussoren@mac.com" target="_blank">ronaldoussoren@mac.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><br>
On 8 Feb, 2009, at 17:25, s s wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I have had similar problems with the &quot;ImportError: No module named PyObjCTools&quot; and actually sent my entire project to someone who was distributing a (beta) commercial product for some help.<br>
<br>
He spent 4 hours on it, hacked the hell out of the startup modules and everything else and got it to build on his machine, then I couldn&#39;t duplicate his results on mine.<br>
<br>
py2app needs some serious attention on the 10.5.6 stack and I&#39;m willing to help get it going -- I just don&#39;t have the domain knowledge to get the ball rolling though I&#39;m sure I could help keep it rolling once I knew where to poke the stick.<br>


</blockquote>
<br></div>
One of the things I&#39;d like to see is a set of functional tests for py2app, even if that only consists of a collection of sample applications that use the various libraries in common use, such as:<br>
<br>
* A PyObjC application<br>
* A wxWidgets application<br>
* ...<br>
* Applications using matplotlib<br>
* Applications using other libraries that sometimes cause problems.<br>
<br>
Lack of a proper testing infrastructure is a major issue for py2app at the moment, it is way to easy to accidently break something when &nbsp;changing the py2app code base. Having a set of test applications would at least make it easier to ensure that nothing gets accidently broken.<br>


<br>
W.r.t. PyObjCTools issue: I&#39;m currently working on better tests for the core functionality and framework wrappers for PyObjC and will work on fixing issues related to the examples when that&#39;s done (including fixing py2app where needed).<br>

<font color="#888888">
<br>
Ronald</font><div><div></div><div><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
<br>
S<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
</blockquote>
On Feb 8, 2009, at 2:32 AM, Jacob wrote:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi guys,<br>
<br>
I&#39;m have a little trouble with py2app when building an app for distribution. &nbsp;I&#39;ll give an example using one of the py2app/pyobjc2 examples, ICSharingWatcher. &nbsp;I setup Python 2.5.4 using MacPorts 1.7.0, along with the following packages:<br>


<br>
py25-bdist_mpkg @0.4.3_0 (active)<br>
py25-macholib-devel @1.2_0 (active)<br>
py25-modulegraph-devel @0.7.2_0 (active)<br>
py25-py2app-devel @0.4.2_1 (active)<br>
py25-pyobjc2 @2.0_1 (active)<br>
py25-pyobjc2-cocoa @2.0_1 (active)<br>
py25-setuptools @0.6c9_0 (active)<br>
py25-zlib @2.5.4_0 (active)<br>
python25 @2.5.4_0+darwin_9+macosx (active)<br>
python_select @0.2.1_0+darwin_9 (active)<br>
* Some other modules were removed for brevity.<br>
<br>
With the MacPorts version selected, in the ICSharingWatcher example, if I execute &quot;python setup.py py2app&quot;, I get the following error message:<br>
<br>
pkg_resources.DistributionNotFound: pyobjc<br>
<br>
If I modify &quot;setup.py&quot; and change &quot;install_requires=[&quot;pyobjc&quot;],&quot; to &quot;install_requires=[&quot;pyobjc-core&quot;],&quot; or just comment out the line, then I can successfully build the example. &nbsp;However, on startup it complains &quot;ImportError: No module named PyObjCTools&quot;.<br>


<br>
I can clean up the build and dist directories, execute &quot;python setup.py py2app -A&quot; with this modified setup.py and the example runs just fine. &nbsp;I can run MacPort&#39;s python and import PyObjCTools without a problem. &nbsp;So, it seems that I&#39;m just not telling py2app how to correctly include PyObjCTools.<br>


<br>
Any ideas why the &quot;pyobjc&quot; package cannot be found? &nbsp;I&#39;m running 10.5.6 and have XCode 3.1.2 installed.<br>
<br>
Thanks,<br>
Jacob<br>
<br>
--------------------------------------------------<br>
For reference, the setup.py in the example looks like:<br>
<br>
from setuptools import setup<br>
<br>
setup(<br>
 &nbsp;data_files=[&#39;MainMenu.nib&#39;],<br>
 &nbsp;app=[&#39;ICSharingWatcher.py&#39;],<br>
 &nbsp;install_requires=[&quot;pyobjc&quot;],<br>
 &nbsp;setup_requires=[&quot;py2app&quot;],<br>
)<br>
_______________________________________________<br>
Pythonmac-SIG maillist &nbsp;- &nbsp;<a href="mailto:Pythonmac-SIG@python.org" target="_blank">Pythonmac-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/pythonmac-sig" target="_blank">http://mail.python.org/mailman/listinfo/pythonmac-sig</a><br>
</blockquote>
<br>
_______________________________________________<br>
Pythonmac-SIG maillist &nbsp;- &nbsp;<a href="mailto:Pythonmac-SIG@python.org" target="_blank">Pythonmac-SIG@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/pythonmac-sig" target="_blank">http://mail.python.org/mailman/listinfo/pythonmac-sig</a><br>
</blockquote>
<br>
</div></div></blockquote></div><br>