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 93637dd

Browse filesBrowse files
author
kylev
committed
We need to copy the -arch compile flags to link-time flags in order to have a
chance of building on OS X.
1 parent ab6f294 commit 93637dd
Copy full SHA for 93637dd

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

+8
-0
lines changed

‎MySQLdb/setup_posix.py

Copy file name to clipboardExpand all lines: MySQLdb/setup_posix.py
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ def get_config():
5555
removable_compile_args = [ compiler_flag(f) for f in "ILl" ]
5656
extra_compile_args = [ i.replace("%", "%%") for i in mysql_config("cflags")
5757
if i[:2] not in removable_compile_args ]
58+
59+
# Copy the arch flags for linking as well
60+
extra_link_args = list()
61+
for i in range(len(extra_compile_args)):
62+
if extra_compile_args[i] == '-arch':
63+
extra_link_args += ['-arch', extra_compile_args[i + 1]]
64+
5865
include_dirs = [ dequote(i[2:])
5966
for i in mysql_config('include')
6067
if i.startswith(compiler_flag('I')) ]
@@ -83,6 +90,7 @@ def get_config():
8390
library_dirs = library_dirs,
8491
libraries = libraries,
8592
extra_compile_args = extra_compile_args,
93+
extra_link_args = extra_link_args,
8694
include_dirs = include_dirs,
8795
extra_objects = extra_objects,
8896
define_macros = define_macros,

0 commit comments

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