[Pythonmac-SIG] Py2App 0.1.7

Bob Ippolito bob at redivi.com
Fri Dec 31 01:15:23 CET 2004


On Dec 30, 2004, at 5:25 PM, Chris Barker wrote:

> I just installed Py2App with the installer, but when I tried to use it 
> I got:
>
> Traceback (most recent call last):
>   File "setup.py", line 21, in ?
>     import py2app
>   File "/purelib/py2app/py2app/__init__.py", line 33, in ?
>   File "/purelib/py2app/py2app/install.py", line 15, in ?
>   File "/purelib/py2app/py2app/command/__init__.py", line 1, in ?
>   File "/purelib/py2app/py2app/build_app.py", line 20, in ?
>   File "/purelib/py2app/modulegraph/find_modules.py", line 21, in ?
>   File "/purelib/py2app/modulegraph/modulegraph.py", line 15, in ?
> ImportError: No module named ObjectGraph
>
>
> My first question was:
>
> "where the heck is /purelib ?"

That's an artifact of how the distutils install command compiles .py 
files under bdist_mpkg, eventually I'll fix that.

> So, am I right that those older versions of altgraph and macholib were 
> installed by an older Py2app?

Yes, probably 0.1.5.  It has been in the py2app directory since 0.1.6.

> If so, some sort of waring should be put in about that.

I think that they should've been removed by the installer..  Oh well, 
there probably isn't much I can do about it now.  Hopefully most people 
are already up to date or don't have it installed.

> Also, while it's probably a good idea that you're now putting those 
> packages inside the Py2app directory, it would probably be better to 
> load them as:
>
> from Py2app.macholib import MachOGraph
>
> So that you know you're getting the version you installed for Py2app.

py2app is not a package, it's just a directory pointed to by a pth.  I 
"own" all these packages, so this is not a problem, except in the 
rare-ish case where an old version is installed.

> By the way, if I needed altgraph for something else, I'd now be kind 
> of screwed. Tome, this supports the argument I've been making for 
> versioning. If we had a standard approach for versioning python 
> packages, you could have the Py2app installer install the version of 
> altgraph (and whatever else) it needs, and not screw up an exiting 
> installation that other folk's code might be depending on.

The packages altgraph (my fork of "graphlib"), modulegraph, bdist_mpkg, 
macholib, and py2app are all exclusively maintained by me, and are only 
released as part of py2app.  You don't need them for "something else", 
especially an older version.

-bob



More information about the Pythonmac-SIG mailing list