(self,
verbose=0,
dry_run=0,
force=0)
| 50 | compiler_type = 'mingw32' |
| 51 | |
| 52 | def __init__ (self, |
| 53 | verbose=0, |
| 54 | dry_run=0, |
| 55 | force=0): |
| 56 | |
| 57 | distutils.cygwinccompiler.CygwinCCompiler.__init__ (self, verbose, |
| 58 | dry_run, force) |
| 59 | |
| 60 | # **changes: eric jones 4/11/01 |
| 61 | # 1. Check for import library on Windows. Build if it doesn't exist. |
| 62 | |
| 63 | build_import_library() |
| 64 | |
| 65 | # Check for custom msvc runtime library on Windows. Build if it doesn't exist. |
| 66 | msvcr_success = build_msvcr_library() |
| 67 | msvcr_dbg_success = build_msvcr_library(debug=True) |
| 68 | if msvcr_success or msvcr_dbg_success: |
| 69 | # add preprocessor statement for using customized msvcr lib |
| 70 | self.define_macro('NPY_MINGW_USE_CUSTOM_MSVCR') |
| 71 | |
| 72 | # Define the MSVC version as hint for MinGW |
| 73 | msvcr_version = msvc_runtime_version() |
| 74 | if msvcr_version: |
| 75 | self.define_macro('__MSVCRT_VERSION__', '0x%04i' % msvcr_version) |
| 76 | |
| 77 | # MS_WIN64 should be defined when building for amd64 on windows, |
| 78 | # but python headers define it only for MS compilers, which has all |
| 79 | # kind of bad consequences, like using Py_ModuleInit4 instead of |
| 80 | # Py_ModuleInit4_64, etc... So we add it here |
| 81 | if get_build_architecture() == 'AMD64': |
| 82 | self.set_executables( |
| 83 | compiler='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall', |
| 84 | compiler_so='gcc -g -DDEBUG -DMS_WIN64 -O0 -Wall ' |
| 85 | '-Wstrict-prototypes', |
| 86 | linker_exe='gcc -g', |
| 87 | linker_so='gcc -g -shared') |
| 88 | else: |
| 89 | self.set_executables( |
| 90 | compiler='gcc -O2 -Wall', |
| 91 | compiler_so='gcc -O2 -Wall -Wstrict-prototypes', |
| 92 | linker_exe='g++ ', |
| 93 | linker_so='g++ -shared') |
| 94 | # added for python2.3 support |
| 95 | # we can't pass it through set_executables because pre 2.2 would fail |
| 96 | self.compiler_cxx = ['g++'] |
| 97 | |
| 98 | # Maybe we should also append -mthreads, but then the finished dlls |
| 99 | # need another dll (mingwm10.dll see Mingw32 docs) (-mthreads: Support |
| 100 | # thread-safe exception handling on `Mingw32') |
| 101 | |
| 102 | # no additional libraries needed |
| 103 | #self.dll_libraries=[] |
| 104 | return |
| 105 | |
| 106 | # __init__ () |
| 107 |
nothing calls this directly
no test coverage detected