Mercurial > p > mysql-python > mysqldb-2
changeset 77:6cc22ee607da MySQLdb
Copy compile -arch args to link args so we work on OS X
author | kylev@localhost6.localdomain6 |
---|---|
date | Thu, 17 Jun 2010 00:41:20 -0700 |
parents | 17062a65fde9 |
children | d9bb912776a5 |
files | setup_posix.py |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/setup_posix.py Mon Feb 22 16:21:05 2010 -0800 +++ b/setup_posix.py Thu Jun 17 00:41:20 2010 -0700 @@ -53,6 +53,13 @@ removable_compile_args = [ compiler_flag(f) for f in "ILl" ] extra_compile_args = [ i.replace("%", "%%") for i in mysql_config("cflags") if i[:2] not in removable_compile_args ] + + # Copy the arch flags for linking as well + extra_link_args = list() + for i in range(len(extra_compile_args)): + if extra_compile_args[i] == '-arch': + extra_link_args += ['-arch', extra_compile_args[i + 1]] + include_dirs = [ dequote(i[2:]) for i in mysql_config('include') if i.startswith(compiler_flag('I')) ] @@ -81,6 +88,7 @@ library_dirs = library_dirs, libraries = libraries, extra_compile_args = extra_compile_args, + extra_link_args = extra_link_args, include_dirs = include_dirs, extra_objects = extra_objects, define_macros = define_macros,