#50 ✓fixed
Randy Becker

Difficulty building on Mac OS X 10.5 Leopard

Reported by Randy Becker | August 15th, 2009 @ 11:30 PM

PyObjC 1.4 and not newer is listed as a prerequisite to building moneyGuru, but Mac OS X 10.5 ships with PyObjC 2.0, and 1.4 won't compile properly. I tried was able to successfully compile moneyGuru without PyObjC 1.4, but none of the inner UI appears when it opens a file.

Comments and changes to this ticket

  • Virgil Dupras

    Virgil Dupras August 16th, 2009 @ 12:55 AM

    You're right, I can't compile the 1.4 branch either. I can't remember how I got my current installation of PyObjC 1.4, I think at some point it was available, compiled, for download from the website. Unfortunately, it's not anymore. The attached zip file is what I have in my site-package. I think that dropping it in yours should do the trick.

    I'll update the building page with that attachment as well.

  • Randy Becker

    Randy Becker August 16th, 2009 @ 04:05 AM

    I'm dropped the zip file into /Library/Frameworks/Python.framework/2.6/lib/python2.6/site-packages, but got the same result. Is there a good way (besides getting the app to work properly) to test that I have the prerequisites installed properly?

    There were a few things I had to do that weren't in the instructions in order to get the code to build without errors, including (1) installing Sparkle into /Library/Frameworks, and (2) creating a /Library/Frameworks/Python.framework/2.6/Resources/version.plist file based on info I found online.

  • Virgil Dupras

    Virgil Dupras August 16th, 2009 @ 09:42 AM

    You must unzip the file before putting it in site-package. The zip contains a PyObjC folder and a PyObjC.pth file (linking to inside the folder).

    If you want to verify that PyObjC is correctly installed, start Python and type import objc, then print objc.__version__.

    Thanks for letting me know about these problems. It's not everyday that I set up a build machine for my apps.

  • Randy Becker

    Randy Becker August 16th, 2009 @ 04:37 PM

    I'm making progress! Now I get a window with all of the UI present, but it throws an error on launch, and whenever I try to open a file - either my own, or the example one:

    Application Identifier: com.hardcoded_software.moneyguru
    Application Version: 1.5.4
    
    Traceback (most recent call last):
      File "/Users/rbecker1/Desktop/moneyguru/cocoa/build/Release/moneyGuru.app/Contents/Resources/mg_cocoa.plugin/Contents/Resources/mg_cocoa.py", line 237, in loadFromFile_
      File "moneyguru/document/__init__.pyc", line 834, in load_from_xml
      File "moneyguru/loader/base.pyc", line 152, in parse
      File "moneyguru/loader/native.pyc", line 22, in _parse
    AttributeError: 'module' object has no attribute 'parse'
    
    Relevant Console logs:
    

    Also, after I commit a new transaction, it disappears, although the accounts are created.

  • Virgil Dupras

    Virgil Dupras August 16th, 2009 @ 04:50 PM

    It's strange. This is a line where the parse method from ElementTree (which is in Python's stdlib) is called. What version of Python do you have? What happens when you try this?

    Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) 
    [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import xml.etree.cElementTree as ET
    >>> ET.parse
    

    Do you also get an AttributeError? If not, maybe it's an issue with py2app not correctly packaging mg_cocoa.plugin. Try re-gen/rebuild with a -A switch in py/gen.py (so you end up with print_and_do('python -u setup.py py2app -A')). It will build mg_cocoa.plugin in "alias mode". If the problem is a packaging one, this switch should fix it.

  • Randy Becker

    Randy Becker August 16th, 2009 @ 04:58 PM

    Is ElementTree also required? I installed it, but I'm still get the same error.

  • Virgil Dupras

    Virgil Dupras August 16th, 2009 @ 05:00 PM

    No, ElementTree is a part of the stdlib since python 2.5.

  • Randy Becker

    Randy Becker August 16th, 2009 @ 05:16 PM

    I don't get an AttributeError, I get:

    $ python
    Python 2.6.2 (r262:71600, Apr 16 2009, 09:17:39) 
    [GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import xml.etree.cElementTree as ET
    >>> ET.parse
    <function parse at 0xe5a70>
    >>>
    

    Adding the -A flag fixed it. It opens up my file, and shows all the pretty graphs and everything. Thanks!

  • Virgil Dupras

    Virgil Dupras August 16th, 2009 @ 05:20 PM

    If the -A flag fix it, it must be some weird py2app issue (I've had my share of them as well...). Do you have the version 0.4.2 installed? Have you installed it with easy_install or from source?

  • Randy Becker

    Randy Becker August 16th, 2009 @ 05:38 PM

    I installed it with easy_install. The py2app instructions said to ensure that I had a recent version of setuptools, but I didn't bother, since easy_install appeared to work correctly. My site-packages contains version 0.3.6, which is the version referenced in the linked documentation for py2app. 0.4.2 is referenced in the NEWS.txt in their svn trunk, however. Should I have installed it from source?

  • Virgil Dupras

    Virgil Dupras August 16th, 2009 @ 05:48 PM

    Yeah, I think that you have to install it from source (I have 0.4.2 installed, so I think that is what I did)

  • Randy Becker

    Randy Becker August 16th, 2009 @ 06:06 PM

    I installed py2app from source, which resulted put 4.2 into site-packages. To get it, I ran into this bug which required that I separately checkout and build modulegraph from source. Then, moneyGuru build perfectly without the -A flag.

  • Virgil Dupras

    Virgil Dupras August 16th, 2009 @ 06:13 PM

    Great! Thanks for documenting your installation process, it makes a great reference ticket.

  • Virgil Dupras

    Virgil Dupras August 16th, 2009 @ 06:14 PM

    • State changed from “new” to “fixed”

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Shared Ticket Bins

People watching this ticket

Attachments

Tags

Pages