Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Mac Programming / September 2004



Tip: Looking for answers? Try searching our database.

Python framework installation: test_macostools failed failed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sven Hilmahr - 24 Sep 2004 16:08 GMT
Hello. I hope this is the right place for my question. It's about
python, but it is OS X specific, and in python forums noone could help
me yet. 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
Paul Donovan - 24 Sep 2004 16:55 GMT
> Hello. I hope this is the right place for my question. It's about
> python, but it is OS X specific, and in python forums noone could help
> me yet.

I suggest you post your question to the Pythonmac-SIG mailing list[1].
The experts in Mac python all subscribe so you're likely to get a good
answer.

[1] http://mail.python.org/mailman/listinfo/pythonmac-sig

Cheers,

Paul

Signature

Paul Donovan
Senior Programmer, SCEE Cambridge

Sven Hilmahr - 24 Sep 2004 20:59 GMT
> I suggest you post your question to the Pythonmac-SIG mailing list[1].
> The experts in Mac python all subscribe so you're likely to get a good
> answer.

thanks for the link, I will try that.
Sven
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.