| 101 | # to why someone started preparing to replace init with configure rules. |
| 102 | |
| 103 | def init(version = None, command = None, options = None): |
| 104 | # When initialized from |
| 105 | # using msvc : x.0 ; |
| 106 | # we get version as a single element list i.e. ['x.0'], |
| 107 | # but when specified from the command line we get a string i.e. 'x.0'. |
| 108 | # We want to work with a string, so unpack the list if needed. |
| 109 | is_single_element_list = (isinstance(version,list) and len(version) == 1) |
| 110 | assert(version==None or isinstance(version,str) or is_single_element_list) |
| 111 | if is_single_element_list: |
| 112 | version = version[0] |
| 113 | |
| 114 | options = to_seq(options) |
| 115 | command = to_seq(command) |
| 116 | |
| 117 | if command: |
| 118 | options.append("<command>"+command) |
| 119 | configure(version,options) |
| 120 | |
| 121 | def configure(version=None, options=None): |
| 122 | if version == "all": |