Update MetaTools/buildTableList.py for recent changes

This commit is contained in:
Behdad Esfahbod 2015-04-14 00:17:52 -07:00
parent 60f13a55df
commit 5cd4e51450
2 changed files with 17 additions and 5 deletions

View File

@ -1,3 +1,4 @@
# DON'T EDIT! This file is generated by MetaTools/buildTableList.py.
def _moduleFinderHint():
"""Dummy function to let modulefinder know what tables may be

View File

@ -31,14 +31,25 @@ tables.sort()
file = open(os.path.join(tablesDir, "__init__.py"), "w")
file.write("# DON'T EDIT! This file is generated by MetaTools/buildTableList.py.\n")
file.write("def _moduleFinderHint():\n")
file.write('\t"""Dummy function to let modulefinder know what tables may be\n')
file.write('\tdynamically imported. Generated by MetaTools/buildTableList.py.\n')
file.write('\t"""\n')
file.write('''
# DON'T EDIT! This file is generated by MetaTools/buildTableList.py.
def _moduleFinderHint():
"""Dummy function to let modulefinder know what tables may be
dynamically imported. Generated by MetaTools/buildTableList.py.
>>> _moduleFinderHint()
"""
''')
for module in modules:
file.write("\tfrom . import %s\n" % module)
file.write('''
if __name__ == "__main__":
import doctest, sys
sys.exit(doctest.testmod().failed)
''')
file.close()