| 798 | |
| 799 | _distutils_gen_lib_options = gen_lib_options |
| 800 | def gen_lib_options(compiler, library_dirs, runtime_library_dirs, libraries): |
| 801 | # the version of this function provided by CPython allows the following |
| 802 | # to return lists, which are unpacked automatically: |
| 803 | # - compiler.runtime_library_dir_option |
| 804 | # our version extends the behavior to: |
| 805 | # - compiler.library_dir_option |
| 806 | # - compiler.library_option |
| 807 | # - compiler.find_library_file |
| 808 | r = _distutils_gen_lib_options(compiler, library_dirs, |
| 809 | runtime_library_dirs, libraries) |
| 810 | lib_opts = [] |
| 811 | for i in r: |
| 812 | if is_sequence(i): |
| 813 | lib_opts.extend(list(i)) |
| 814 | else: |
| 815 | lib_opts.append(i) |
| 816 | return lib_opts |
| 817 | ccompiler.gen_lib_options = gen_lib_options |
| 818 | |
| 819 | # Also fix up the various compiler modules, which do |