Ronald,<br><br>Great to hear that you're working on better tests for PyObjCTools. 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. 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. For reference, this file contains the following one line:<br><br>__import__('pkg_resources').declare_namespace(__name__)<br>
<br>Then, I modified my setup file so that it looks more like install_requires=["pyobjc-core"]. Apparently PyObjC 2.0 broke the project up into smaller packages and the name changed as well. "pyobjc-core" and I think "pyobjc-framework-cocoa" are the packages required to build the PyObjC examples that were of interest to me.<br>
<br>Phew, I'm so glad this is finally working. Good luck with the py2app tests. 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"><<a href="mailto:ronaldoussoren@mac.com" target="_blank">ronaldoussoren@mac.com</a>></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 "ImportError: No module named PyObjCTools" 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't duplicate his results on mine.<br>
<br>
py2app needs some serious attention on the 10.5.6 stack and I'm willing to help get it going -- I just don't have the domain knowledge to get the ball rolling though I'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'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 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'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'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'm have a little trouble with py2app when building an app for distribution. I'll give an example using one of the py2app/pyobjc2 examples, ICSharingWatcher. 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 "python setup.py py2app", I get the following error message:<br>
<br>
pkg_resources.DistributionNotFound: pyobjc<br>
<br>
If I modify "setup.py" and change "install_requires=["pyobjc"]," to "install_requires=["pyobjc-core"]," or just comment out the line, then I can successfully build the example. However, on startup it complains "ImportError: No module named PyObjCTools".<br>
<br>
I can clean up the build and dist directories, execute "python setup.py py2app -A" with this modified setup.py and the example runs just fine. I can run MacPort's python and import PyObjCTools without a problem. So, it seems that I'm just not telling py2app how to correctly include PyObjCTools.<br>
<br>
Any ideas why the "pyobjc" package cannot be found? I'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>
data_files=['MainMenu.nib'],<br>
app=['ICSharingWatcher.py'],<br>
install_requires=["pyobjc"],<br>
setup_requires=["py2app"],<br>
)<br>
_______________________________________________<br>
Pythonmac-SIG maillist - <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 - <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>