[Pythonmac-SIG] python 2.3.4 framework installation: test_macostools failed

Sven Hilmahr shilmahr at gmx.de
Sat Sep 25 10:59:32 CEST 2004


Hello, I'm new on this list. I tried to do a Python 2.3.4 framework 
installation on my Mac OS
X 10.3.5. I configured as described in the ReadMe:

./configure --enable-framework

But on make test, one test failed:

test test_macostools failed -- Traceback (most recent call last):
   File "/Users/sven/Downloads/Python-2.3.4/Lib/test/test_macostools.py",
line 78, in test_mkalias_relative
     macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix)
   File "/Users/sven/Downloads/Python-2.3.4/Lib/plat-mac/macostools.py",
line 39, in mkalias
     relativefsr = File.FSRef(relative)
Error: (-43, 'File not found')

Here is the content of the files mentioned in the error notification:

/Users/sven/Downloads/Python-2.3.4/Lib/test/test_macostools.py: (see
line 78)

73    def test_mkalias_relative(self):
74        try:
75           os.unlink(TESTFN2)
76        except:
77            pass
78        macostools.mkalias(test_support.TESTFN, TESTFN2, sys.prefix)
79        fss, _, _ = Carbon.File.ResolveAliasFile(TESTFN2, 0)
80        self.assertEqual(fss.as_pathname(),
os.path.realpath(test_support.TESTFN))


/Users/sven/Downloads/Python-2.3.4/Lib/plat-mac/macostools.py: (see line
39)

27 # Not guaranteed to be correct or stay correct (Apple doesn't tell
you
28 # how to do this), but it seems to work.
29 #
30 def mkalias(src, dst, relative=None):
31     """Create a finder alias"""
32     srcfsr = File.FSRef(src)
33     # The next line will fail under unix-Python if the destination
34     # doesn't exist yet. We should change this code to be
fsref-based.
35     dstdir, dstname = os.path.split(dst)
36     if not dstdir: dstdir = os.curdir
37     dstdirfsr = File.FSRef(dstdir)
38     if relative:
39         relativefsr = File.FSRef(relative)


I have no idea how to fix this. Does the comment "The next line will
fail under unix-Python if the destination doesn't exist yet"? mean that
I have ro create some directory first? Which one?

If I do a ./configure without the --enable-framework option, no tests
fail. Can you help me?

Thanks, Sven



More information about the Pythonmac-SIG mailing list