MCPcopy Index your code
hub / github.com/numpy/numpy / _make_source

Function _make_source

numpy/testing/_private/extbuild.py:169–182  ·  view source on GitHub ↗

Combines the code fragments into source code ready to be compiled

(name, init, body)

Source from the content-addressed store, hash-verified

167
168
169def _make_source(name, init, body):
170 """ Combines the code fragments into source code ready to be compiled
171 """
172 code = f"""
173 #include <Python.h>
174
175 {body}
176
177 PyMODINIT_FUNC
178 PyInit_{name}(void) {{
179 {init}
180 }}
181 """
182 return code
183
184
185def _c_compile(cfile, outputfilename, include_dirs, libraries,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…