[Pythonmac-SIG] MachoPython 2.2.2 build question

Brian Lenihan brian_l@mac.com
Wed, 6 Nov 2002 21:06:12 -0800


On Wednesday, November 6, 2002, at 10:03  AM, Russell E Owen wrote:
>
> Thank you very much. That pretty much did the trick.
>
> However, most of my files start with #!/usr/local/bin/python. Is there 
> any way to get that to work? At present, running such files as 
> commands leads to unusable windows, an ugly pitfall.

Change your Tk scripts to use #!/usr/local/bin/pythonw or 
#!/usr/bin/env pythonw


> I tried the obvious (delete /usr/local/bin/python and rename 
> /usr/local/bin/pythonw to it); typing python at the prompt does bring 
> up a copy of python that can be used for Tkinter. However, any files 
> that start with #!/usr/local/bin/python will *NOT* run (and it looks 
> as if the #! line is totally failing to run).

You want to leave /usr/local/bin/python alone so regular scripts can 
run.  Make a symlink to python in /usr/local/bin

ln -sf /Library/Frameworks/Python.framework/Versions/2.2/bin/python

> While I'm on the subject of 2.2.2, should I be worried that test_sax 
> and test_pyexpat are unexpectedly skipped after a "make test"? I fear 
> this means that the xml stuff is broken, but am not certain. (I'm not 
> using xml anyway, but do want to be sure that any unknown bugs are 
> reported.)
>
> I'm thrilled to finally have aqua Tk support working (though still 
> hope to get execution-as-a-command working again). I have posted 
> instructions for building Python 2.2.2 with readlines and aqua Tkinter 
> support on MacOS 10.2; see the link at: 
> <http://www.astro.washington.edu/owen>.
>
> -- Russell
>
> P.S. when Python is via exec... it claims to be Python 2.3a0 (#1, Sep 
> 6 2002, 20:20:16), even though I built 2.2.2. I suspect this is a 
> quirk of the 2.2.2 source code.

Are you sure you don't have 2.3 installed?  Did you do ./configure 
--enable-framework? I'm guessing you have pythonw using 2.3 and your 
2.2.2 binary was in /usr/local/bin (the libs would be in 
/usr/local/lib/python2.2)

Take a peek in /Library/Frameworks/Python.framework/Versions