From abarnert at yahoo.com Fri Oct 25 01:50:38 2013 From: abarnert at yahoo.com (Andrew Barnert) Date: Thu, 24 Oct 2013 16:50:38 -0700 (PDT) Subject: [Pythonmac-SIG] Building extension modules with Xcode 5 Message-ID: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> If you use a binary installer of Python 2.7.5, 3.3.2, or 3.4.0a4 from python.org on either 10.8 or 10.9, and you have Xcode 5, you can't build any C extension modules, because you don't have a compiler named "gcc-4.2". What should users be doing until this is fixed? The workaround that everyone suggests,?setting CC=clang CXX=clang++, does not work for many packages because they depend on other variables (MAINCC, LINKCC, or, worst of all, CONFIG_ARGS, which you don't want to try passing on the command line). The best workarounds that I've discovered are:?(1) use a Homebrew or manually-built Python instead of the installers from python.org, or?(2) keep an old machine around (ideally with OS X 10.6.8 and Xcode 3.2.6, but at least with OS X 10.8.5 and Xcode 4.6.3) and build all your Python extensions there. Neither one of these seems very novice-friendly. You can also hack up?/Library/Frameworks/Python.framework/Versions/X.Y/lib/pythonX.Y/config-X.Ym/Makefile, or create a bunch of symlinks to trick the dev environment into working, but those seem much less like good ideas. Meanwhile, what's the plan to fix this? I've seen?http://bugs.python.org/issue19019, but that doesn't seem likely to be resolved soon, or to be ported back to 3.3 and 2.7. If there isn't one,?I think there may be a simple solution: Change the default darwin compiler from gcc-4.2 to gcc or cc; make new builds of 2.7.5, 3.3.2, and 3.4.0a4; test and ship. I believe that may break Xcode 3.1, but not Xcode 3.2, because Xcode 3.2's gcc and cc are both gcc 4.2, not gcc 4.0. (Unfortunately, I do not have a test machine at the moment to verify this.)?Meanwhile, in Xcode 4.2-4.6.3, gcc and cc are both llvm-gcc-4.2, and in 5.0-5.0.1, they're both clang, but since those are the closest things those environment have to gcc 4.2 anyway, that's not a problem. What I have verified is this: On OS X 10.7.5, with Xcode 4.1.0, build Python 3.3.2 with gcc and the 10.6 SDK. Install the result on a machine with OS X 10.9.0 and Xcode 5.0.1. Use it to install and test numpy, lxml, and appscript. From abarnert at yahoo.com Fri Oct 25 01:58:37 2013 From: abarnert at yahoo.com (Andrew Barnert) Date: Thu, 24 Oct 2013 16:58:37 -0700 (PDT) Subject: [Pythonmac-SIG] Building redistributable binaries with Xcode 4.4+ In-Reply-To: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> References: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> Message-ID: <1382659117.96447.YahooMailNeo@web184704.mail.ne1.yahoo.com> There's a related issue, using the 10.6 SDK. This one is over a year old, but as far as I know still has no solution. Xcode 4.4+ have no 10.6 SDK.?This doesn't actually stop you from building extensions; they just falls back to building for your machine when it can't find the SDK. But that means you can't build binary distributions of your extensions (or py2app executables, etc.).?So, if you want to create useful Python binaries, you have to either keep an old development machine around, or build Python yourself. From a quick test, building Python to use a later SDK, but macosx-version-min=10.6, seems to work. As I mentioned in my previous email, I don't actually have a 10.6/3.2 machine to test, but here's what _did_ work: Building Python on a 10.7.5/4.6.2 machine with the 10.8 SDK and?macosx-version-min=10.6. Install the result on a 10.8.5/5.0.1 machine. Build an extension on the 10.8 machine. Install the extension on the 10.7 machine. Use it. However, I haven't done much testing. And I've definitely seen other cases where setting macosx-version-min lower than the SDK doesn't work, despite assurances from Apple that the bugs I'm seeing are impossible, so I'm not sure how far to trust this. From kw at codebykevin.com Fri Oct 25 03:14:13 2013 From: kw at codebykevin.com (Kevin Walzer) Date: Thu, 24 Oct 2013 21:14:13 -0400 Subject: [Pythonmac-SIG] Building extension modules with Xcode 5 In-Reply-To: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> References: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> Message-ID: <5269C5E5.9020204@codebykevin.com> On 10/24/13 7:50 PM, Andrew Barnert wrote: > What should users be doing until this is fixed? Build Python yourself, in my view. Python is one of the easiest scripting languages to build. And once you do that, building extensions is just a matter of sudo easy_install foo. What we're seeing here is a conflict between Python's unfortunate insistence on using the same compiler toolchain for the main interpreter and any compiled extensions, and Apple's remorseless dropping of stuff it no longer supports. I don't believe there is a way to resolve this conflict. Eventually clang will have been the standard compiler for three or four versions of OS X, and that will resolve it. Until then there will be several different compilers in the wild--gcc-4.2, gcc-llvm, and clang, and we'll have these headaches with incompatibility. Ronald and Ned can speak in a more official capacity, as the maintainers, but that's my two cents. --Kevin -- Kevin Walzer Code by Kevin/Mobile Code by Kevin http://www.codebykevin.com http://www.wtmobilesoftware.com From abarnert at yahoo.com Fri Oct 25 03:47:57 2013 From: abarnert at yahoo.com (Andrew Barnert) Date: Thu, 24 Oct 2013 18:47:57 -0700 (PDT) Subject: [Pythonmac-SIG] Building extension modules with Xcode 5 In-Reply-To: <5269C5E5.9020204@codebykevin.com> References: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> <5269C5E5.9020204@codebykevin.com> Message-ID: <1382665677.4566.YahooMailNeo@web184704.mail.ne1.yahoo.com> > From: Kevin Walzer > Sent: Thursday, October 24, 2013 6:14 PM > > On 10/24/13 7:50 PM, Andrew Barnert wrote: >> What should users be doing until this is fixed? > > Build Python yourself, in my view. Python is one of the easiest scripting > languages to build. And once you do that, building extensions is just a matter > of sudo easy_install foo. Well, as I said, I personally build it myself, either manually or via Homebrew.?And I've told novices to "use Homebrew" with a link to brew.sh and they've figured it out themselves. (And that also gives them up-to-date setuptools and pip, and the only problem they ever run into is figuring out that you need to "brew install gfortran" before "pip install numpy scipy", which is not hard to explain.) But I've gotten resistance from others telling me I shouldn't be telling novices to do that. And really, if this is the answer, there shouldn't be binary installers on python.org in the first place. > What we're seeing here is a conflict between Python's unfortunate? > insistence on using the same compiler toolchain for the main interpreter and any > compiled extensions, and Apple's remorseless dropping of stuff it no longer > supports. Also Python having a single binary for 10.6+.?I understand that decision?the only alternatives are to tell 10.6 users they're stuck with 2.7.5/3.3.2 forever, or to double the number of builds and double the packagers' work. But Apple consistently and intentionally makes it hard to support more than 3 (sometimes even 2) major OS X versions at a time, and they do a good job of that. > I don't believe there is a way to resolve this conflict. Eventually clang > will have been the standard compiler for three or four versions of OS X, and > that will resolve it. Until then there will be several different compilers in > the wild--gcc-4.2, gcc-llvm, and clang, and we'll have these headaches with > incompatibility. I think the only reason we're explicitly using gcc 4.2 is because it was required with Xcode 3.0 on OS X 10.5, or something like that. If that workaround is no longer relevant, and is now causing problems, why not just drop it? And if I'm right, then there is an easy way to resolve this conflict. (The 10.6 SDK thing is less solvable, but also less critical. Most people need to pip install packages; only a few need to redistribute those packages as binaries.) From nad at acm.org Fri Oct 25 04:12:40 2013 From: nad at acm.org (Ned Deily) Date: Thu, 24 Oct 2013 19:12:40 -0700 Subject: [Pythonmac-SIG] Building extension modules with Xcode 5 References: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> Message-ID: In article <1382658638.14083.YahooMailNeo at web184703.mail.ne1.yahoo.com>, Andrew Barnert wrote: > If you use a binary installer of Python 2.7.5, 3.3.2, or 3.4.0a4 from > python.org on either 10.8 or 10.9, and you have Xcode 5, you can't build any > C extension modules, because you don't have a compiler named "gcc-4.2". This should not be the case. Can you show an example of how this is failing? As long as you do not manually override by setting environment variables like CC and LDSHARED, Distutils on currently released python.org Pythons (2.7.5, 3.3.2, and 3.4.0a4) should continue to do the right thing and substitute clang if the compile it was built with is not present. In fact, Distutils explicitly blacklisted the llvm-gcc shipped with Xcode 4. -- Ned Deily, nad at acm.org From nad at acm.org Fri Oct 25 04:29:50 2013 From: nad at acm.org (Ned Deily) Date: Thu, 24 Oct 2013 19:29:50 -0700 Subject: [Pythonmac-SIG] Building extension modules with Xcode 5 References: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> <5269C5E5.9020204@codebykevin.com> <1382665677.4566.YahooMailNeo@web184704.mail.ne1.yahoo.com> Message-ID: In article <1382665677.4566.YahooMailNeo at web184704.mail.ne1.yahoo.com>, Andrew Barnert wrote: > Also Python having a single binary for 10.6+.?I understand that decision?the > only alternatives are to tell 10.6 users they're stuck with 2.7.5/3.3.2 > forever, or to double the number of builds and double the packagers' work. > But Apple consistently and intentionally makes it hard to support more than 3 > (sometimes even 2) major OS X versions at a time, and they do a good job of > that. I'm really confused here. Using the current 2.7.5 64-bit installer (from May) on 10.8.5 with Xcode 5.0.1 works just fine for me. Perhaps you are seeing problems because you are trying to override Distutils defaults? If you don't set any of CC or LDSHARED or other DIstutils environment variables, Distutils should do the right thing. If you do set the env variables, Distutils assumes you know what you are doing and honors the values you supply. -- Ned Deily, nad at acm.org From nad at acm.org Fri Oct 25 04:41:27 2013 From: nad at acm.org (Ned Deily) Date: Thu, 24 Oct 2013 19:41:27 -0700 Subject: [Pythonmac-SIG] Building redistributable binaries with Xcode 4.4+ References: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> <1382659117.96447.YahooMailNeo@web184704.mail.ne1.yahoo.com> Message-ID: In article <1382659117.96447.YahooMailNeo at web184704.mail.ne1.yahoo.com>, Andrew Barnert wrote: > There's a related issue, using the 10.6 SDK. This one is over a year old, but > as far as I know still has no solution. > > Xcode 4.4+ have no 10.6 SDK.?This doesn't actually stop you from building > extensions; they just falls back to building for your machine when it can't > find the SDK. But that means you can't build binary distributions of your > extensions (or py2app executables, etc.).?So, if you want to create useful > Python binaries, you have to either keep an old development machine around, > or build Python yourself. I agree this is a shortcoming of the current Distutils processing in the currently Python releases. If you really do need to build with a different SDK, it would be nice if Distutils made it easier to do. As it stands now, you need to manually override Distutils settings by using sysconfig to get the current configuration variable values for CFLAGS and LDSHARED, possibly others, and then edit them to insert the desired value for "-isysroot " and set the corresponding environment variables as well as MACOSX_DEPLOYMENT_TARGET. It's not elegant. But it should work. I would like to add something to make that easier. -- Ned Deily, nad at acm.org From ronaldoussoren at mac.com Fri Oct 25 09:20:42 2013 From: ronaldoussoren at mac.com (Ronald Oussoren) Date: Fri, 25 Oct 2013 07:20:42 +0000 (GMT) Subject: [Pythonmac-SIG] Building extension modules with Xcode 5 In-Reply-To: <1382665677.4566.YahooMailNeo@web184704.mail.ne1.yahoo.com> Message-ID: On Oct 25, 2013, at 03:47 AM, Andrew Barnert wrote: What we're seeing here is a conflict between Python's unfortunate? insistence on using the same compiler toolchain for the main interpreter and any compiled extensions, and Apple's remorseless dropping of stuff it no longer supports. Also Python having a single binary for 10.6+.?I understand that decision?the only alternatives are to tell 10.6 users they're stuck with 2.7.5/3.3.2 forever, or to double the number of builds and double the packagers' work. But Apple consistently and intentionally makes it hard to support more than 3 (sometimes even 2) major OS X versions at a time, and they do a good job of that. ? The only thing that's hard at the moment is supporting PowerPC machines, to do that you need to have an old machine where you can use Xcode 3. ?Building Intel binaries that work on OSX 10.4 and later is easy, although you must be somewhat careful to avoid using APIs that are not available on older machines (especially when using configure scripts). I regularly do builds of Python and some 3the party extensions on 10.8 (up to now with Xcode 4, but soon with Xcode 5) that get deployed to a 10.5 machine and that works just fine. ? You do NOT have to use a 10.5 SDK to build binaries that can be deployed to 10.5. Regards, ? ?Ronald -------------- next part -------------- An HTML attachment was scrubbed... URL: From nad at acm.org Sat Oct 26 01:26:59 2013 From: nad at acm.org (Ned Deily) Date: Fri, 25 Oct 2013 16:26:59 -0700 Subject: [Pythonmac-SIG] Building extension modules with Xcode 5 References: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> <5269C5E5.9020204@codebykevin.com> <1382665677.4566.YahooMailNeo@web184704.mail.ne1.yahoo.com> Message-ID: In article , Ned Deily wrote: > I'm really confused here. Using the current 2.7.5 64-bit installer (from > May) on 10.8.5 with Xcode 5.0.1 works just fine for me. Perhaps you are > seeing problems because you are trying to override Distutils defaults? If > you > don't set any of CC or LDSHARED or other DIstutils environment variables, > Distutils should do the right thing. If you do set the env variables, > Distutils assumes you know what you are doing and honors the values you > supply. Ah, while my comment above is accurate concerning the current 64-bit installers, it did slip my mind that there *is* an Xcode 5-related problem when using the legacy *32-bit-only* installers for Python 3.3.2 and 2.7.5 on 10.8 or 10.9 with Xcode 5. Basically, the problem is that the test that Distutils currently uses during extension module builds to detect whether the compiler supports PPC architectures fails due to behavior changes in Xcode 5. The problem was already fixed in the 3.4.0a4 installer and will be fixed in 3.3.3 and 2.7.6, for which release candidate installers should be available by Monday. To highlight the issue, I have created Issue19400 which describes the problem in more detail and documents a workaround, i.e. using the ARCHFLAGS environment variable to override universal architectures for ext module builds. Perhaps this is the problem people have been seeing with Xcode 5? My apologies for not thinking of it earlier. Otherwise, I am not aware of any other problems with using Xcode 5 for extension module builds. Please open issues on the Python bug tracker if you find any problems! http://bugs.python.org/issue19400 -- Ned Deily, nad at acm.org From nad at acm.org Sat Oct 26 02:24:43 2013 From: nad at acm.org (Ned Deily) Date: Fri, 25 Oct 2013 17:24:43 -0700 Subject: [Pythonmac-SIG] Python interactive segfaults on OS X 10.9 Mavericks Message-ID: SInce OS X 10.9 Mavericks is now out, people are running into a severe problem when using some Python interpreters interactively. The symptom is that the interpreter in interactive mode crashes after typing two lines: $ python3.3 Python 3.3.2 (v3.3.2:d047928ae3f6, May 13 2013, 13:52:24) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> "Hello" # first line OK 'Hello' >>> "World" # second line causes crash Segmentation fault: 11 It does not matter what is entered on the two lines; the interpreter crashes after the second line. The problem is caused by an upstream change in the OS X 10.9 editline library, libedit. Most recent versions of the python.org installers dynamically link to the system-provided libedit and are susceptible to the problem. These include Pythons from the following current installers: 3.3.2 64-bit/32-bit 10.6+ 3.3.2 32-bit-only 10.5+ 2.7.5 64-bit/32-bit 10.6+ Older releases of similar installers are also susceptible. 2.7.x Pythons from the 32-bit-only installers are not susceptible because they do not use libedit. Pythons using GNU readline, including those with the PyPI readline distribution installed should not have problems. The problem is described in Issue18458. It describes a workaround: disabling the readline extension by renaming or deleting it. It also provides a script that can be downloaded to automate this "patching". The fix for the problem has been released in the current 3.4.0a4 installers. It will be available in the installers for Python 3.3.3 and 2.7.6, which are expected to be released in the near future. Release candidate installers for both should be available by Monday. http://bugs.python.org/issue18458 Otherwise, for the most part, the transition to OS X 10.9 appears to be relatively problem-free so far. Please open issues on the Python bug tracker for any new problems you encounter (after doing a quick search to see if it has already been reported!). -- Ned Deily, nad at acm.org From nad at acm.org Mon Oct 28 09:58:19 2013 From: nad at acm.org (Ned Deily) Date: Mon, 28 Oct 2013 01:58:19 -0700 Subject: [Pythonmac-SIG] Python interactive segfaults on OS X 10.9 Mavericks References: Message-ID: In article , Ned Deily wrote: > SInce OS X 10.9 Mavericks is now out, people are running into a severe > problem > when using some Python interpreters interactively. The symptom is that the > interpreter in interactive mode crashes after typing two lines: [...] > The fix for the problem has been released in the current 3.4.0a4 installers. > It will be available in the installers for Python 3.3.3 and 2.7.6, which are > expected to be released in the near future. Release candidate installers for > both should be available by Monday. > > http://bugs.python.org/issue18458 > > Otherwise, for the most part, the transition to OS X 10.9 appears to be > relatively problem-free so far. Please open issues on the Python bug tracker > for any new problems you encounter (after doing a quick search to see if it > has already been reported!). Update: Release candidate installers for 3.3.3 and 2.7.6 are now available: http://www.python.org/download/releases/3.3.3/ http://www.python.org/download/releases/2.7.6/ In addition, a problem in the Tk 8.5 gui library that may affect users of IDLE or other tkinter-based applications running on OS X 10.9 has been fixed upstream. "rc1_rev1" installers including the fixed Tk library should be available shortly. -- Ned Deily, nad at acm.org From micko at wagsoft.com Mon Oct 28 10:40:12 2013 From: micko at wagsoft.com (Michael O'Donnell) Date: Mon, 28 Oct 2013 10:40:12 +0100 Subject: [Pythonmac-SIG] Python interactive segfaults on OS X 10.9 Mavericks In-Reply-To: References: Message-ID: Hi Ned, Actually, the IDLE and Tkinter problems seem to be fixed in the rc1 release. At least, when I install it and run it, all functions as it should. Idle windows update as expected, and my tkinter application works again. Mick On 28 October 2013 09:58, Ned Deily wrote: > In article , > Ned Deily wrote: > > SInce OS X 10.9 Mavericks is now out, people are running into a severe > > problem > > when using some Python interpreters interactively. The symptom is that > the > > interpreter in interactive mode crashes after typing two lines: > [...] > > The fix for the problem has been released in the current 3.4.0a4 > installers. > > It will be available in the installers for Python 3.3.3 and 2.7.6, which > are > > expected to be released in the near future. Release candidate > installers for > > both should be available by Monday. > > > > http://bugs.python.org/issue18458 > > > > Otherwise, for the most part, the transition to OS X 10.9 appears to be > > relatively problem-free so far. Please open issues on the Python bug > tracker > > for any new problems you encounter (after doing a quick search to see if > it > > has already been reported!). > > Update: Release candidate installers for 3.3.3 and 2.7.6 are now available: > > http://www.python.org/download/releases/3.3.3/ > http://www.python.org/download/releases/2.7.6/ > > In addition, a problem in the Tk 8.5 gui library that may affect users of > IDLE > or other tkinter-based applications running on OS X 10.9 has been fixed > upstream. "rc1_rev1" installers including the fixed Tk library should be > available shortly. > > -- > Ned Deily, > nad at acm.org > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > https://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG > > > _______________________________________________________ > Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting > http://www.doteasy.com > -------------- next part -------------- An HTML attachment was scrubbed... URL: From micko at wagsoft.com Mon Oct 28 10:54:46 2013 From: micko at wagsoft.com (Michael O'Donnell) Date: Mon, 28 Oct 2013 10:54:46 +0100 Subject: [Pythonmac-SIG] Python interactive segfaults on OS X 10.9 Mavericks In-Reply-To: References: Message-ID: Ooops, I spoke too soon. To repeat, 3.3.3 rc1 works fine with Maverick. However, after installing python 2.7.6rc1, Idle crashes on launch (right click on a .py file, and select "Open with..." and then select Idle "(2.7.6rc1)". The idle window pops up for less than a second then disappears. No error window appears. Opening console, I see a line: 28/10/2013 10:53:22.382 com.apple.launchd.peruser.501[137]: (org.python.IDLE.32416[1792]) Exited with code: 1 Mick On 28 October 2013 10:40, Michael O'Donnell wrote: > Hi Ned, > > Actually, the IDLE and Tkinter problems seem to > be fixed in the rc1 release. > > At least, when I install it and run it, all functions as > it should. Idle windows update as expected, and > my tkinter application works again. > > Mick > > > On 28 October 2013 09:58, Ned Deily wrote: > >> In article , >> Ned Deily wrote: >> > SInce OS X 10.9 Mavericks is now out, people are running into a severe >> > problem >> > when using some Python interpreters interactively. The symptom is that >> the >> > interpreter in interactive mode crashes after typing two lines: >> [...] >> > The fix for the problem has been released in the current 3.4.0a4 >> installers. >> > It will be available in the installers for Python 3.3.3 and 2.7.6, >> which are >> > expected to be released in the near future. Release candidate >> installers for >> > both should be available by Monday. >> > >> > http://bugs.python.org/issue18458 >> > >> > Otherwise, for the most part, the transition to OS X 10.9 appears to be >> > relatively problem-free so far. Please open issues on the Python bug >> tracker >> > for any new problems you encounter (after doing a quick search to see >> if it >> > has already been reported!). >> >> Update: Release candidate installers for 3.3.3 and 2.7.6 are now >> available: >> >> http://www.python.org/download/releases/3.3.3/ >> http://www.python.org/download/releases/2.7.6/ >> >> In addition, a problem in the Tk 8.5 gui library that may affect users of >> IDLE >> or other tkinter-based applications running on OS X 10.9 has been fixed >> upstream. "rc1_rev1" installers including the fixed Tk library should be >> available shortly. >> >> -- >> Ned Deily, >> nad at acm.org >> >> _______________________________________________ >> Pythonmac-SIG maillist - Pythonmac-SIG at python.org >> https://mail.python.org/mailman/listinfo/pythonmac-sig >> unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG >> >> >> _______________________________________________________ >> Unlimited Disk, Data Transfer, PHP/MySQL Domain Hosting >> http://www.doteasy.com >> > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From abarnert at yahoo.com Mon Oct 28 19:46:48 2013 From: abarnert at yahoo.com (Andrew Barnert) Date: Mon, 28 Oct 2013 11:46:48 -0700 Subject: [Pythonmac-SIG] Building extension modules with Xcode 5 In-Reply-To: References: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> <5269C5E5.9020204@codebykevin.com> <1382665677.4566.YahooMailNeo@web184704.mail.ne1.yahoo.com> Message-ID: <89B09A1A-6A6A-4024-A5CB-AA8D3C62E552@yahoo.com> Sorry, I've been trying to reproduce this, and I haven't identified exactly what the problem is, except that you have to upgrade Xcode from 4.x to 5.0.1 after upgrading to 10.9 and without upgrading/reinstalling Python. If I do that, _sometimes_ it doesn't work, with failures looking for gcc-4.2. If I do any other sequence, it always succeeds. I'll keep trying to figure out the repro case. Sent from a random iPhone On Oct 24, 2013, at 19:29, Ned Deily wrote: > In article <1382665677.4566.YahooMailNeo at web184704.mail.ne1.yahoo.com>, > Andrew Barnert wrote: >> Also Python having a single binary for 10.6+. I understand that decision?the >> only alternatives are to tell 10.6 users they're stuck with 2.7.5/3.3.2 >> forever, or to double the number of builds and double the packagers' work. >> But Apple consistently and intentionally makes it hard to support more than 3 >> (sometimes even 2) major OS X versions at a time, and they do a good job of >> that. > > I'm really confused here. Using the current 2.7.5 64-bit installer (from > May) on 10.8.5 with Xcode 5.0.1 works just fine for me. Perhaps you are > seeing problems because you are trying to override Distutils defaults? If you > don't set any of CC or LDSHARED or other DIstutils environment variables, > Distutils should do the right thing. If you do set the env variables, > Distutils assumes you know what you are doing and honors the values you supply. > > -- > Ned Deily, > nad at acm.org > > _______________________________________________ > Pythonmac-SIG maillist - Pythonmac-SIG at python.org > https://mail.python.org/mailman/listinfo/pythonmac-sig > unsubscribe: https://mail.python.org/mailman/options/Pythonmac-SIG From nad at acm.org Mon Oct 28 20:31:31 2013 From: nad at acm.org (Ned Deily) Date: Mon, 28 Oct 2013 12:31:31 -0700 Subject: [Pythonmac-SIG] Building extension modules with Xcode 5 In-Reply-To: <89B09A1A-6A6A-4024-A5CB-AA8D3C62E552@yahoo.com> References: <1382658638.14083.YahooMailNeo@web184703.mail.ne1.yahoo.com> <5269C5E5.9020204@codebykevin.com> <1382665677.4566.YahooMailNeo@web184704.mail.ne1.yahoo.com> <89B09A1A-6A6A-4024-A5CB-AA8D3C62E552@yahoo.com> Message-ID: On Oct 28, 2013, at 11:46 , Andrew Barnert wrote: > Sorry, I've been trying to reproduce this, and I haven't identified exactly what the problem is, except that you have to upgrade Xcode from 4.x to 5.0.1 after upgrading to 10.9 and without upgrading/reinstalling Python. If I do that, _sometimes_ it doesn't work, with failures looking for gcc-4.2. If I do any other sequence, it always succeeds. I'll keep trying to figure out the repro case. Thanks, Andrew, for your efforts! I *really* want to get to the bottom of this issue. I assume you know this but, for the benefit of others new to Xcode 5 and Mavericks: Apple has changed some things about the Command Line Tools component. The new way to install the CLT in 10.9 is: xcode-select --install TL;DR Just run xcode-select --install. For some time now (long before Xcode 5), OS X has not shipped with a full set of the usual header files, development libraries, and build tools installed, e.g. not in /usr/include, /System/Library/Frameworks/.., /usr/bin etc. They are provided in SDKs, one for each OS X release. If you are using Xcode.app to build a project, Xcode takes care of supplying the correct locations of header files in SDKs and various build tools. One advantage of not installing files and depending on a fixed path to them is that it simplifies building projects for different target platforms: different versions of OS X or, more importantly, iOS vs OS X. Because of that, Apple has seen fit to change the locations of things between Xcode releases. However, many open source projects, like Python, expect things to be in their "traditional" Unix file system locations, like /usr/bin/cc or /usr/include/stdio.h. To accommodate such usage, Xcode has also long provided an option to install these files from an SDK into their tradition location under the system root, /. This component has had various names within Xcode and in the past was selected by an installer option then more recently via an Xcode.app -> Preferences option. Also, in Xcode 4, bowing to popular demand for a smaller download, Apple made available a standalone version of the Command Line Tools that could be downloaded and installed without the need for downloading all of Xcode. Python, like most similar open source projects, requires the Command Line Tools to be installed, either via Xcode or via the standalone installer. More accurately, Python requires the CLT for two purposes: 1. building C or C++ extension modules with Distutils; 2. building Python itself. If you are using a binary-installed Python and don't need to install any third-party extension modules from source, you don't actually need the CLT. For Mavericks, a big initial source of confusion has been how the CLT get installed. 10.9 comes with a set of stub files for the CLT build tools, like /usr/bin/cc, /usr/bin/gcc, /usr/bin/clang, /usr/bin/make. The first time you try to run one of these tools, a pop-up window appears and asks if you want to install the Command Line Tools or install all of Xcode. If you pick the CLT option, an installer package will be automatically downloaded and installed via the system installer and, in the future, should be updated via the standard Software Update mechanism like other parts of OS X. When it works, it's very slick. If for some reason, it doesn't work, you may be stumped as to what to do. In the Xcode 5 app, there no longer appears to be a Preferences option to install the CLT component. This has led to a lot of confusion when people look for things in /usr/include and find nothing there: "Apple has broken everything. No /usr/include". (This was exacerbated by a misstep by Apple during the Mavericks development cycle that was changed before the release.) The solution to this problem and many other problems is to force the install of the CLT and the new way to do it in 10.9 Mavericks is: xcode-select --install. -- Ned Deily nad at acm.org -- [] From nad at acm.org Mon Oct 28 23:35:23 2013 From: nad at acm.org (Ned Deily) Date: Mon, 28 Oct 2013 15:35:23 -0700 Subject: [Pythonmac-SIG] Python interactive segfaults on OS X 10.9 Mavericks References: Message-ID: In article , "Michael O'Donnell" wrote: > Ooops, I spoke too soon. > > To repeat, 3.3.3 rc1 works fine with Maverick. > > However, after installing python 2.7.6rc1, Idle crashes > on launch (right click on a .py file, and select "Open with..." > and then select Idle "(2.7.6rc1)". > > The idle window pops up for less than a second then disappears. > No error window appears. > > Opening console, I see a line: > > 28/10/2013 10:53:22.382 com.apple.launchd.peruser.501[137]: > (org.python.IDLE.32416[1792]) Exited with code: 1 Oh, nasty! The good news is: it's not a Mavericks or even an OS X specific bug in IDLE. Looks like any attempt at opening a file in IDLE 2.7.6rc1 will cause IDLE to crash or hang. That's rather embarrassing! I've opened a release blocker issue for the problem here: http://bugs.python.org/issue19426 Thanks very much, Michael, for noticing it! If you find any other problems, please open issues for them on the Python bug tracker if there isn't already an issue there. -- Ned Deily, nad at acm.org