()
| 98 | |
| 99 | |
| 100 | def main(): |
| 101 | print("[cython_setup.py] Python version: {ver} {arch}" |
| 102 | .format(ver=platform.python_version(), arch=ARCH_STR)) |
| 103 | print("[cython_setup.py] Python executable: %s" % sys.executable) |
| 104 | print("[cython_setup.py] Cython version: %s" % Cython.__version__) |
| 105 | |
| 106 | global FAST_FLAG |
| 107 | if "--fast" in sys.argv: |
| 108 | # Fast mode disables optimization flags |
| 109 | print("[cython_setup.py] FAST mode enabled") |
| 110 | FAST_FLAG = True |
| 111 | sys.argv.remove("--fast") |
| 112 | |
| 113 | global ENABLE_PROFILING |
| 114 | if "--enable-profiling" in sys.argv: |
| 115 | print("[cython_setup.py] cProfile profiling enabled") |
| 116 | ENABLE_PROFILING = True |
| 117 | sys.argv.remove("--enable-profiling") |
| 118 | |
| 119 | global ENABLE_LINE_TRACING |
| 120 | if "--enable-line-tracing" in sys.argv: |
| 121 | print("[cython_setup.py] cProfile line tracing enabled") |
| 122 | ENABLE_LINE_TRACING = True |
| 123 | sys.argv.remove("--enable-line-tracing") |
| 124 | |
| 125 | if len(sys.argv) <= 1: |
| 126 | print(__doc__) |
| 127 | sys.exit(1) |
| 128 | |
| 129 | compile_time_constants() |
| 130 | options = dict() |
| 131 | set_compiler_options(options) |
| 132 | options["include_dirs"] = get_include_dirs() |
| 133 | options["library_dirs"] = get_library_dirs() |
| 134 | options["libraries"] = get_libraries() |
| 135 | |
| 136 | print("[cython_setup.py] Execute setup()") |
| 137 | setup( |
| 138 | name="cefpython_py{pyver}".format(pyver=PYVERSION), |
| 139 | cmdclass={"build_ext": build_ext}, |
| 140 | ext_modules=get_ext_modules(options) |
| 141 | ) |
| 142 | |
| 143 | |
| 144 | def get_winsdk_lib(): |
no test coverage detected