[Pythonmac-SIG] py2app - After building for distribution, No module named PyObjCTools
ronaldoussoren at mac.com
Tue Feb 10 11:40:21 CET 2009
On 8 Feb, 2009, at 17:25, s s wrote:
> 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.
> 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.
> 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.
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:
* A PyObjC application
* A wxWidgets application
* Applications using matplotlib
* Applications using other libraries that sometimes cause problems.
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.
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).
> On Feb 8, 2009, at 2:32 AM, Jacob wrote:
>> Hi guys,
>> 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:
>> py25-bdist_mpkg @0.4.3_0 (active)
>> py25-macholib-devel @1.2_0 (active)
>> py25-modulegraph-devel @0.7.2_0 (active)
>> py25-py2app-devel @0.4.2_1 (active)
>> py25-pyobjc2 @2.0_1 (active)
>> py25-pyobjc2-cocoa @2.0_1 (active)
>> py25-setuptools @0.6c9_0 (active)
>> py25-zlib @2.5.4_0 (active)
>> python25 @2.5.4_0+darwin_9+macosx (active)
>> python_select @0.2.1_0+darwin_9 (active)
>> * Some other modules were removed for brevity.
>> With the MacPorts version selected, in the ICSharingWatcher
>> example, if I execute "python setup.py py2app", I get the following
>> error message:
>> pkg_resources.DistributionNotFound: pyobjc
>> 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".
>> 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.
>> Any ideas why the "pyobjc" package cannot be found? I'm running
>> 10.5.6 and have XCode 3.1.2 installed.
>> For reference, the setup.py in the example looks like:
>> from setuptools import setup
>> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
> Pythonmac-SIG maillist - Pythonmac-SIG at python.org
More information about the Pythonmac-SIG