File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -1270,6 +1270,8 @@ def get_extension(self):
12701270
12711271 ext = make_extension ('matplotlib.backends._macosx' , sources )
12721272 ext .extra_link_args .extend (['-framework' , 'Cocoa' ])
1273+ if platform .python_implementation ().lower () == 'pypy' :
1274+ ext .extra_compile_args .append ('-DPYPY=1' )
12731275 return ext
12741276
12751277
Original file line number Diff line number Diff line change 33#include < sys/socket.h>
44#include < Python.h>
55
6+ #ifndef PYPY
67/* Remove this once Python is fixed: https://bugs.python.org/issue23237 */
78#define PYOSINPUTHOOK_REPETITIVE 1
9+ #endif
810
911/* Proper way to check for the OS X version we are compiling for, from
1012 http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_development */
@@ -277,7 +279,9 @@ static void lazy_init(void) {
277279
278280 NSApp = [NSApplication sharedApplication ];
279281
282+ #ifndef PYPY
280283 PyOS_InputHook = wait_for_stdin;
284+ #endif
281285
282286 NSAutoreleasePool * pool = [[NSAutoreleasePool alloc ] init ];
283287 WindowServerConnectionManager* connectionManager = [WindowServerConnectionManager sharedManager ];
You can’t perform that action at this time.
0 commit comments