2
0
mirror of https://github.com/boostorg/python.git synced 2026-01-26 06:42:27 +00:00

- Fixed bug where the order of instantiations in the --multiple mode could end up wrong

[SVN r18198]
This commit is contained in:
Bruno da Silva de Oliveira
2003-04-07 18:15:50 +00:00
parent 82721c77a1
commit f7f089d2d4
11 changed files with 53 additions and 27 deletions

View File

@@ -10,7 +10,7 @@ from SmartFile import SmartFile
class MultipleCodeUnit(object):
'''
Represents a bunch of cpp files, where each cpp file represents a header
to be exported by pyste. Another header, named _main.cpp is created too.
to be exported by pyste. Another cpp, named <module>.cpp is created too.
'''
def __init__(self, modulename, outdir):
@@ -23,6 +23,7 @@ class MultipleCodeUnit(object):
def _FunctionName(self, code_unit_name):
return '_Export_%s' % utils.makeid(code_unit_name)
def _FileName(self, code_unit_name):
filename = os.path.basename(code_unit_name)
@@ -84,7 +85,7 @@ class MultipleCodeUnit(object):
codeunit.Merge(__all__)
codeunit.Save()
# generate the main cpp
filename = os.path.join(self.outdir, '_main.cpp')
filename = os.path.join(self.outdir, self.modulename + '.cpp')
fout = SmartFile(filename, 'w')
fout.write(utils.left_equals('Include'))
fout.write('#include <boost/python.hpp>\n\n')