gov.llnl.babel.backend.python
Class SetupGenerator
java.lang.Object
gov.llnl.babel.backend.python.SetupGenerator
- BuildGenerator, ContextAware, FileListener
public class SetupGenerator
extends java.lang.Object
This class writes a setup.py
file to build all the
Python extension modules and implementation code.
createAll
public void createAll()
throws IOException
Generate the setup.py to build the Python extension modules.
- createAll in interface BuildGenerator
newFile
public void newFile(SymbolID id,
int type,
String role,
String dir,
String name)
This method is called by the
FileManager
for each new file it creates. This object caches the information it
needs to setup.py creation later.
- newFile in interface FileListener
id
- the file is related to this symbol ID.type
- indicates the type of the symbol ID (one of the
constants from Type
.role
- this describes the role the file plays. For example,
the file could be a STUBSRCS
file or a
IMPLSRCS
file. The role strings used
are determined by the backend.dir
- the path (relative or absolute) of the directory where
the file will be created.name
- the name of the file not including any directory
information. The complete name of the file should
be dir + name
.