mirror of
https://github.com/triqs/dft_tools
synced 2024-11-01 03:33:50 +01:00
243d4a798b
- a module can use the converters used by another with the use_module('A') command. In which case : - the generate converter header for A will be included. - the header, at the top, now contains a simple list of all wrapped types, which is then included in the wrapped_types of the module for proper code generation. - simplify the code generation : just generate_code. - all arguments are analyzed from sys.argv at the import of the wrap_generator module. In any case, the xx_desc.py will be called from the corresponding cmake command, hence with the right arguments. - Added a dependencies in my_module_B of wrap_test to show how to make the dependencies in the cmake file, if needed.
18 lines
757 B
Python
18 lines
757 B
Python
from wrap_generator import *
|
|
|
|
# The module
|
|
module = module_(full_name = "pytriqs.wrap_test.test_g", doc = " Doc of my_module ")
|
|
module.add_include("<triqs/../pytriqs/wrap_test/g.hpp>")
|
|
module.add_include("<pytriqs/converters/gf.hpp>")
|
|
|
|
module.add_function (name = "make_bgf", signature = "block_gf_view<imfreq> (double a)", doc = "DOC of print_a")
|
|
module.add_function (name = "pass_bgf", signature = "void (block_gf_view<imfreq> g) ", doc = "DOC of print_a")
|
|
|
|
module.add_function (name = "make_sgf", signature = "gf_view<imfreq,scalar_valued> (double a)", doc = "DOC of print_a")
|
|
module.add_function (name = "pass_sgf", signature = "void (gf_view<imfreq,scalar_valued> g)", doc = "DOC of print_a")
|
|
|
|
|
|
if __name__ == '__main__' :
|
|
module.generate_code()
|
|
|