mirror of
https://github.com/nasa/trick.git
synced 2024-12-30 18:07:00 +00:00
b53c52ac33
Refs #392
21 lines
506 B
Python
Executable File
21 lines
506 B
Python
Executable File
#!/usr/bin/python
|
|
|
|
import os
|
|
|
|
with open('build/CP_instances') as cp_instances:
|
|
with open('build/top.i', 'w') as top:
|
|
path = os.path.abspath(os.getcwd())
|
|
instances = ''.join(cp_instances.readlines())
|
|
top.write(
|
|
'%module top\n'
|
|
'\n'
|
|
'%{\n'
|
|
'#include "../S_source.hh"\n'
|
|
'\n' +
|
|
instances + '\n'
|
|
'%}\n'
|
|
'\n'
|
|
'%import "build' + path + '/S_source_py.i"\n'
|
|
'\n' +
|
|
instances)
|