Mercurial > p > mysql-python > mysqldb-2
comparison setup_posix.py @ 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 | c9fd1a7932f4 |
children |
comparison
equal
deleted
inserted
replaced
76:17062a65fde9 | 77:6cc22ee607da |
---|---|
51 libraries = [ dequote(i[2:]) for i in libs if i.startswith(compiler_flag("l")) ] | 51 libraries = [ dequote(i[2:]) for i in libs if i.startswith(compiler_flag("l")) ] |
52 | 52 |
53 removable_compile_args = [ compiler_flag(f) for f in "ILl" ] | 53 removable_compile_args = [ compiler_flag(f) for f in "ILl" ] |
54 extra_compile_args = [ i.replace("%", "%%") for i in mysql_config("cflags") | 54 extra_compile_args = [ i.replace("%", "%%") for i in mysql_config("cflags") |
55 if i[:2] not in removable_compile_args ] | 55 if i[:2] not in removable_compile_args ] |
56 | |
57 # Copy the arch flags for linking as well | |
58 extra_link_args = list() | |
59 for i in range(len(extra_compile_args)): | |
60 if extra_compile_args[i] == '-arch': | |
61 extra_link_args += ['-arch', extra_compile_args[i + 1]] | |
62 | |
56 include_dirs = [ dequote(i[2:]) | 63 include_dirs = [ dequote(i[2:]) |
57 for i in mysql_config('include') | 64 for i in mysql_config('include') |
58 if i.startswith(compiler_flag('I')) ] | 65 if i.startswith(compiler_flag('I')) ] |
59 if not include_dirs: # fix for MySQL-3.23 | 66 if not include_dirs: # fix for MySQL-3.23 |
60 include_dirs = [ dequote(i[2:]) | 67 include_dirs = [ dequote(i[2:]) |
79 ext_options = dict( | 86 ext_options = dict( |
80 name = "_mysql", | 87 name = "_mysql", |
81 library_dirs = library_dirs, | 88 library_dirs = library_dirs, |
82 libraries = libraries, | 89 libraries = libraries, |
83 extra_compile_args = extra_compile_args, | 90 extra_compile_args = extra_compile_args, |
91 extra_link_args = extra_link_args, | |
84 include_dirs = include_dirs, | 92 include_dirs = include_dirs, |
85 extra_objects = extra_objects, | 93 extra_objects = extra_objects, |
86 define_macros = define_macros, | 94 define_macros = define_macros, |
87 ) | 95 ) |
88 return metadata, ext_options | 96 return metadata, ext_options |