[Pythonmac-SIG] py2app trying to create a symlink that already exists

Kevin Dangoor dangoor at gmail.com
Fri Aug 12 17:16:50 CEST 2005


I believe I ran into this before, but I didn't document it properly so
I'm doomed to repeat it. (I'll document it this time!)

I have an app that is running fine (and py2app is building it fine) on
Tiger. I'm working on getting a Panther build put together. On both
Tiger and Panther, I'm using Bob's unofficial official Python 2.4.1.
I'm using PyObjC 1.3.7 (downloaded the package for Panther, built from
source for Tiger), and the included py2app (0.2.1).

I'm using the embedded version of the Firebird database, and that is
where the problem is coming in. I built Firebird myself on both Tiger
and Panther. I've looked at /Library/Frameworks/Firebird.framework in
both and they look the same. So, now to what the problem is...

Looking through py2app's output, the first framework copied is
Firebird.framework, picked up as a dependency of kinterbasdb. As
py2app continues copying stuff over, it eventually hits
linking /Users/tazzzzz/projects/app/dist/myapp.app/Contents/Frameworks/Firebird.framework/Firebird
-> Versions/Current/Firebird

which runs into this problem:
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/py2app/py2app/build_app.py",
line 1064, in copy_tree
    condition=condition)
  File "/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/py2app/py2app/util.py",
line 351, in copy_tree
    os.symlink(link_dest, dst_name)
OSError: [Errno 17] File exists
> /Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/py2app/py2app/util.py(351)copy_tree()

Look at what's in myapp.app, the Firebird.framework in there doesn't
have a Versions/Current yet. It does, however, have a Firebird at the
top of the framework directory, which is not a symlink but the real
file. In my Tiger build, that Firebird at the top is a symlink to
Versions/Current/Firebird, which is also the case in
/Library/Frameworks/Firebird.framework on both machines.

I seem to remember seeing this problem when I first started using
Firebird, and I really wish I had written down how the problem was
solved. I did a clean checkout and build under Tiger to ensure that
the two OSes are really running the same things.

Any ideas?

Thanks!
Kevin


More information about the Pythonmac-SIG mailing list