From 059b9bb78e6a4e43dfcc0dee20ac15178789a758 Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Mon, 13 Aug 2018 07:22:42 -0700 Subject: [PATCH 1/2] FIX: macosx framework check --- src/_macosx.m | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/_macosx.m b/src/_macosx.m index 416cf6a583e3..d64125934372 100644 --- a/src/_macosx.m +++ b/src/_macosx.m @@ -2565,24 +2565,10 @@ static void context_cleanup(const void* info) static bool verify_framework(void) { -#ifdef COMPILING_FOR_10_6 - NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; - NSRunningApplication* app = [NSRunningApplication currentApplication]; - NSApplicationActivationPolicy activationPolicy = [app activationPolicy]; - [pool release]; - switch (activationPolicy) { - case NSApplicationActivationPolicyRegular: - case NSApplicationActivationPolicyAccessory: - return true; - case NSApplicationActivationPolicyProhibited: - break; - } -#else ProcessSerialNumber psn; if (CGMainDisplayID()!=0 && GetCurrentProcess(&psn)==noErr && SetFrontProcess(&psn)==noErr) return true; -#endif PyErr_SetString(PyExc_ImportError, "Python is not installed as a framework. The Mac OS X backend will " "not be able to function correctly if Python is not installed as a " From db64c09341ac1ec5061abd9f74b03c69a7bb12e6 Mon Sep 17 00:00:00 2001 From: Jody Klymak Date: Tue, 14 Aug 2018 13:31:25 -0700 Subject: [PATCH 2/2] FIX: macosx framework check --- src/_macosx.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/_macosx.m b/src/_macosx.m index d64125934372..119fc1b8d622 100644 --- a/src/_macosx.m +++ b/src/_macosx.m @@ -2566,6 +2566,8 @@ static void context_cleanup(const void* info) static bool verify_framework(void) { ProcessSerialNumber psn; + /* These methods are deprecated, but they don't require the app to + have started */ if (CGMainDisplayID()!=0 && GetCurrentProcess(&psn)==noErr && SetFrontProcess(&psn)==noErr) return true;