MCPcopy Create free account
hub / github.com/numpy/numpy / lib_opts

Function lib_opts

numpy/random/setup.py:66–77  ·  view source on GitHub ↗

Add flags that depend on the compiler. We can't see which compiler we are using in our scope, because we have not initialized the distutils build command, so use this deferred calculation to run when we are building the library.

(build_cmd)

Source from the content-addressed store, hash-verified

64 ]
65
66 def lib_opts(build_cmd):
67 """ Add flags that depend on the compiler.
68
69 We can't see which compiler we are using in our scope, because we have
70 not initialized the distutils build command, so use this deferred
71 calculation to run when we are building the library.
72 """
73 opts = lib_opts_if_msvc(build_cmd)
74 if build_cmd.compiler.compiler_type != 'msvc':
75 # Some bit generators require c99
76 opts.append('-std=c99')
77 return opts
78
79 config.add_installed_library('npyrandom',
80 sources=npyrandom_sources,

Callers

nothing calls this directly

Calls 1

lib_opts_if_msvcFunction · 0.90

Tested by

no test coverage detected