| msg56132 - (view) |
Author: Bill Janssen (janssen) *  |
Date: 2007-09-25 16:29 |
| If you build Python with --disable-toolbox-glue on OS X, the attempt to import ctypes fails because it critically depends on "gestalt", one of the modules in the toolbox. It only uses this to check whether the OS level is 10.4 or something earlier, and only once, at load. Might be a good idea to substitute a check which doesn't require the toolbox, such as looking at platform.release(). |
|
|
| msg56133 - (view) |
Author: Thomas Heller (theller) *  |
Date: 2007-09-25 16:49 |
| Would you like to prepare a patch? I have no idea how the return values of gestalt.gestalt("sysv") and platform.release() relate to each other... |
|
|
| msg56134 - (view) |
Author: Bill Janssen (janssen) *  |
Date: 2007-09-25 16:54 |
| Here's a patch against the trunk. I've only tried it on OS X 10.4.10, and only with test_ctypes. Ideally, we should test on an earlier version of OS X, but I don't have one handy. |
|
|
| msg56135 - (view) |
Author: Thomas Heller (theller) *  |
Date: 2007-09-25 17:02 |
| On the mac where I have access to platform.release() returns the string '8.10.0'. gestalt.gestalt("sysv") returns 0x1049. Your patch does not look correct to me. |
|
|
| msg56137 - (view) |
Author: Bill Janssen (janssen) *  |
Date: 2007-09-25 17:30 |
| Sorry, you're absolutely right. Here's a corrected patch. |
|
|
| msg56139 - (view) |
Author: Thomas Heller (theller) *  |
Date: 2007-09-25 19:16 |
| This patch looks better. However, the 'os.uname()' function seems to return the information that we need; so I updated the patch to use this instead. Can you please proofread it (osx.patch) ? |
|
|
| msg56216 - (view) |
Author: Bill Janssen (janssen) *  |
Date: 2007-10-02 16:18 |
| Yes, that works too. It seems to be another way of accessing the same information; it's not clear to me which is preferable. Bill On 9/25/07, Thomas Heller <report@bugs.python.org> wrote: > > Thomas Heller added the comment: > > This patch looks better. However, the 'os.uname()' function seems to > return the information that we need; so I updated the patch to use this > instead. Can you please proofread it (osx.patch) ? > > __________________________________ > Tracker <report@bugs.python.org> > <http://bugs.python.org/issue1203> > __________________________________ > |
|
|
| msg56349 - (view) |
Author: Thomas Heller (theller) *  |
Date: 2007-10-11 19:52 |
| IMO os.uname() is preferable. Committed as SVN rev 58415 in trunk. Thanks. |
|
|