Re: [Pythonmac-SIG] Building 32-bit on Snow Leopard with tkinter/IDLE (was: Recommended Tcl/Tk with Py-2.6.x)
Tom, Thanks for the summary. Tom Loredo wrote: I should have added: If you're happy with 32-bit Python on Snow Leopard and have no need to build from source, just do as Chris recommended earlier: Use Python.org's installer. It is built on an earlier OS than SL and links against Apple's Tcl/Tk 8.4, so when you install it on SL, it finds the 8.4 version that Apple includes in SL for backward compatibility. And also works with wxPython, MPL, scipy, numpy, and many many other third part packages. -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Building 32-bit on Snow Leopard with tkinter/IDLE (was: Recommended Tcl/Tk with Py-2.6.x)
> If you are willing to install a new Tcl/Tk, you can have success but > you have to be careful. Both ActiveTcl 8.4 and 8.5 (the current > version) will produce a working IDLE. Both of these are only 32-bit > in the free versions, so you will have to do some undocumented installation > trickery (in my earlier post) to build a 32-bit Python-2.6 on 10.6 to > mate with ActiveTcl, but at least you can avoid patching setup.py. I should have added: If you're happy with 32-bit Python on Snow Leopard and have no need to build from source, just do as Chris recommended earlier: Use Python.org's installer. It is built on an earlier OS than SL and links against Apple's Tcl/Tk 8.4, so when you install it on SL, it finds the 8.4 version that Apple includes in SL for backward compatibility. -Tom - This mail sent through IMP: http://horde.org/imp/ ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Building 32-bit on Snow Leopard with tkinter/IDLE (was: Recommended Tcl/Tk with Py-2.6.x)
Ned- No need to apologize; I realize the Python developers are juggling many balls right now! But I'll apologize---for always replying in a way that starts yet another thread. I reply to emails or web archive versions of the posts, and as far as I can tell, there is no way to respond in a manner that continues a thread. I've looked for info on this, and from what I can tell it's a capability that is being considered for *future* Mailman web interfaces. If anyone knows of a way to accomplish this right now, please let me know. Regarding my setup.py hack to allow building 32-bit on 10.6 with Tcl/Tk 8.4: > The last time I played with the 10.6 Tk 8.4, it worked just fine, so, > yeah, if you only need a 32-bit Tk on 10.6 that should be OK. Just to clarify: I think the situation is a little worse than some may infer from this. As I understand things, if you want to build Python 2.6 on 10.6 with a working Tkinter and IDLE, and without installing a new Tcl/Tk, your only option is build a 32-bit Python that links against Apple's Tcl/Tk 8.4, and this cannot be done with the existing installer. I just want other readers not to infer from your comment that if you're happy with Python's default 64-bit build, all is fine. If you are willing to install a new Tcl/Tk, you can have success but you have to be careful. Both ActiveTcl 8.4 and 8.5 (the current version) will produce a working IDLE. Both of these are only 32-bit in the free versions, so you will have to do some undocumented installation trickery (in my earlier post) to build a 32-bit Python-2.6 on 10.6 to mate with ActiveTcl, but at least you can avoid patching setup.py. I've also found that the current Tcl/Tk Aqua "de-carbon" 8.5 commit at GitHub seems to work fine with Py-2.6.5rc1, both 32-bit *and* 64-bit (I built universal frameworks, so with one install you can support either 32- or 64-bit Python). 64-bit Python's "make test" will crash when it reaches test_tcl, but if you run the test all alone, it passes, and IDLE works fine. I don't understand what regrtest.py does that affects the test when it's not run in isolation. BTW, with Tcl/Tk de-carbon, I have finally built a 64-bit Python with 64-bit numpy/scipy/matplotlib, with mpl's TkAgg front end working fine for the examples I've tried so far. I'm setting up a Homebrew fork to duplicate these installs; if anyone is interested in it, drop me a line; it would be great to have verification that it works elsewhere. -Tom - This mail sent through IMP: http://horde.org/imp/ ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
Re: [Pythonmac-SIG] Building 32-bit on Snow Leopard with tkinter/IDLE (was: Recommended Tcl/Tk with Py-2.6.x)
In article <1267993653.4b940c35c6...@astrosun2.astro.cornell.edu>, Tom Loredo wrote: > Regarding building 32-bit *alone* on Snow Leopard, I've been having > luck with this, based on a post in a Python bug tracker issue on > readline problems: > > ./configure --prefix=/usr/local/tmp --enable-framework\ > BASECFLAGS="-arch i386" \ > CFLAGS="-arch i386" \ > LDFLAGS="-arch i386" \ > MACOSX_DEPLOYMENT_TARGET=10.6 > > (of course, set the prefix as you need to). > > It also works deploying for 10.5. I'm not setting the universalsdk > here, since I'm not building a universal binary; I hope I'm right > that it's not necessary. In any case, it's passing the expected > tests. I'm using Py-2.6.5rc1. That looks like it should cover all the bases regarding "-arch" and should work. As long as you are targeting the build just for the build machine and its current os level, you shouldn't need the sdk. It might be nice to have a simpler configure option for this. It wasn't a problem prior to 10.6 because everything ran by default in 32-bit mode so the explicit setting of -arch wasn't needed. > I was really asking about how to build, on Snow Leopard, a 32-bit > version with a *working* tkinter and IDLE. I finally figured out > a way to modify setup.py to do this (building against Apple's > Tcl/Tk 8.4). It gives an i386 Python framework that passes the tcl > tests, with a working IDLE. I'll post the details shortly in case > it's of use to anyone, but it's a kind of ugly hack. I don't know > if this is interesting enough that I should post the patch on > the Python issue tracker; if so, I'd appreciate a pointer to a > relevant thread. The last time I played with the 10.6 Tk 8.4, it worked just fine, so, yeah, if you only need a 32-bit Tk on 10.6 that should be OK. Earlier versions of Aqua Tk shipped with some previous versions of OS X were known to have problems so the standard workaround for that was to make sure the OS X installer was built on a machine with ActiveState's newer Tk 8.4 installed (in /Library/Frameworks/{Tcl,Tk}.frameworks). Then on the installed machine when Tkinter is imported, OS X looks first in /Library/Frameworks/Tk... and, if necessary, falls backs to /System/Library/Frameworks/Tk... Because the python.org installers are targeted to run on 10.3.9 through 10.6, they are still built this way. But, as Ronald points out, a more flexible scheme of dynamically using either 8.5 or 8.4 would be better. (Sorry for the delay in responding: with 2.6.5, 3.1.2, and the final 2.7 alpha releases all in play right now, it's been a little hectic trying to clear out some of the more pressing issues.) -- Ned Deily, n...@acm.org ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG
[Pythonmac-SIG] Building 32-bit on Snow Leopard with tkinter/IDLE (was: Recommended Tcl/Tk with Py-2.6.x)
Quoting Ronald Oussoren : > > If we *deploy* for 10.4 or 10.5 > > while building on Snow Leopard, can we get a 32-bit intel executable > > via a universal ppc/i386 build? > > configure --enable-framework --enable-universalsdk > make > make install > > This builds a framework install that contains ppc and i386 code. Thanks, Ronald. According to the Mac/README file, "--enable-universalsdk" should set a path to an appropriate SDK when used on 10.5 or later. "--enable-universalsdk=/" should find an appropriate default, but Ned alerted me that it isn't guaranteed to work in all combinations (there are so many different option combinations in the configuration that I suspect not all have been tested/verified). He suggested that, to play it safe, the configure command should specify the SDK explicitly (full path to the 10.4, 10.5, or 10.6 SDK), as well as set --with-universal-archs (choices are in the Mac/README) and MACOSX_DEPLOYMENT_TARGET (which unfortunately isn't discussed in the README). Regarding building 32-bit *alone* on Snow Leopard, I've been having luck with this, based on a post in a Python bug tracker issue on readline problems: ./configure --prefix=/usr/local/tmp --enable-framework\ BASECFLAGS="-arch i386" \ CFLAGS="-arch i386" \ LDFLAGS="-arch i386" \ MACOSX_DEPLOYMENT_TARGET=10.6 (of course, set the prefix as you need to). It also works deploying for 10.5. I'm not setting the universalsdk here, since I'm not building a universal binary; I hope I'm right that it's not necessary. In any case, it's passing the expected tests. I'm using Py-2.6.5rc1. I was really asking about how to build, on Snow Leopard, a 32-bit version with a *working* tkinter and IDLE. I finally figured out a way to modify setup.py to do this (building against Apple's Tcl/Tk 8.4). It gives an i386 Python framework that passes the tcl tests, with a working IDLE. I'll post the details shortly in case it's of use to anyone, but it's a kind of ugly hack. I don't know if this is interesting enough that I should post the patch on the Python issue tracker; if so, I'd appreciate a pointer to a relevant thread. -Tom - This mail sent through IMP: http://horde.org/imp/ ___ Pythonmac-SIG maillist - Pythonmac-SIG@python.org http://mail.python.org/mailman/listinfo/pythonmac-sig unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG