MCPcopy Index your code
hub / github.com/go-python/gopy / genPre

Method genPre

bind/gen.go:511–527  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

509}
510
511func (g *pyGen) genPre() {
512 g.gofile = &printer{buf: new(bytes.Buffer), indentEach: []byte("\t")}
513 g.leakfile = &printer{buf: new(bytes.Buffer), indentEach: []byte("\t")}
514 g.pybuild = &printer{buf: new(bytes.Buffer), indentEach: []byte("\t")}
515 if !NoMake {
516 g.makefile = &printer{buf: new(bytes.Buffer), indentEach: []byte("\t")}
517 }
518 g.genGoPreamble()
519 g.genPyBuildPreamble()
520 if !NoMake {
521 g.genMakefile()
522 }
523 oinit, err := os.Create(filepath.Join(g.cfg.OutputDir, "__init__.py"))
524 g.err.Add(err)
525 err = oinit.Close()
526 g.err.Add(err)
527}
528
529func (g *pyGen) genPrintOut(outfn string, pr *printer) {
530 of, err := os.Create(filepath.Join(g.cfg.OutputDir, outfn))

Callers 1

genMethod · 0.95

Calls 4

genGoPreambleMethod · 0.95
genPyBuildPreambleMethod · 0.95
genMakefileMethod · 0.95
AddMethod · 0.80

Tested by

no test coverage detected