Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit abbd115

Browse filesBrowse files
committed
Fix issue with PyPy on macOS
1 parent cfc01ce commit abbd115
Copy full SHA for abbd115

File tree

Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed

‎setupext.py

Copy file name to clipboardExpand all lines: setupext.py
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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

‎src/_macosx.m

Copy file name to clipboardExpand all lines: src/_macosx.m
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,9 @@ static void lazy_init(void) {
277277

278278
NSApp = [NSApplication sharedApplication];
279279

280+
#ifndef PYPY
280281
PyOS_InputHook = wait_for_stdin;
282+
#endif
281283

282284
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
283285
WindowServerConnectionManager* connectionManager = [WindowServerConnectionManager sharedManager];

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.