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

Function _make_source

numpy/testing/_private/extbuild.py:163–178  ·  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

161
162
163def _make_source(name, init, body):
164 """ Combines the code fragments into source code ready to be compiled
165 """
166 code = """
167 #include <Python.h>
168
169 %(body)s
170
171 PyMODINIT_FUNC
172 PyInit_%(name)s(void) {
173 %(init)s
174 }
175 """ % dict(
176 name=name, init=init, body=body,
177 )
178 return code
179
180
181def _c_compile(cfile, outputfilename, include_dirs=[], libraries=[],

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected